手动结束秘境 清除指定道具
This commit is contained in:
parent
28da971b5d
commit
560cb4a421
@ -130,6 +130,10 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
|||||||
bWin := false
|
bWin := false
|
||||||
errdata, bWin = this.module.battle.CheckBattleReport(session, req.Report)
|
errdata, bWin = this.module.battle.CheckBattleReport(session, req.Report)
|
||||||
if errdata != nil {
|
if errdata != nil {
|
||||||
|
// 战斗失败埋点处理
|
||||||
|
var szTask []*pb.BuriedParam
|
||||||
|
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype225, 1))
|
||||||
|
go this.module.ModuleBuried.TriggerBuried(session.Clone(), szTask...)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !bWin { // 战斗失败直接返回
|
if !bWin { // 战斗失败直接返回
|
||||||
@ -419,8 +423,9 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
|||||||
for k := range stone.Rooms.Eventid { // 首次触发指定ID的事件
|
for k := range stone.Rooms.Eventid { // 首次触发指定ID的事件
|
||||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype215, k))
|
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype215, k))
|
||||||
}
|
}
|
||||||
|
var totalhp int32
|
||||||
//上阵英雄都为指定职业
|
//上阵英雄都为指定职业
|
||||||
if eventConf.EventType == EventType14 || eventConf.EventType == EventType28 { // 必须是战斗类型才可以触发
|
if eventConf.EventType == EventType28 { // 必须是战斗类型才可以触发
|
||||||
var job int32
|
var job int32
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
if h, err := this.module.ModuleTools.GetHeroConfig(v.HeroID); err != nil {
|
if h, err := this.module.ModuleTools.GetHeroConfig(v.HeroID); err != nil {
|
||||||
@ -432,6 +437,8 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
maxHp := v.Property[battle.AttributesTransBase("hp")]
|
||||||
|
totalhp += v.Currhp * 1000 / maxHp
|
||||||
}
|
}
|
||||||
if job != 0 { // 上阵英雄都为指定职业
|
if job != 0 { // 上阵英雄都为指定职业
|
||||||
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype216, job, stone.StageID)) //上阵英雄都为指定职业,击败石阵秘境中指定关卡的首领
|
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype216, job, stone.StageID)) //上阵英雄都为指定职业,击败石阵秘境中指定关卡的首领
|
||||||
@ -464,6 +471,8 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
|||||||
|
|
||||||
//击败指定关卡的首领时,背包中指定道具数量≥指定数量
|
//击败指定关卡的首领时,背包中指定道具数量≥指定数量
|
||||||
//this.module.ModuleItems.CleanItems()
|
//this.module.ModuleItems.CleanItems()
|
||||||
|
//击败石阵秘境中指定关卡的首领时,每名上阵英雄血量≤比例(千分比)
|
||||||
|
szTask = append(szTask, comm.GetBuriedParam(comm.Rtype224, totalhp, stone.StageID))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 强化商店
|
// 强化商店
|
||||||
|
@ -62,6 +62,8 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.StonehengeFinishR
|
|||||||
stone.Addweight = make(map[int32]int32, 0)
|
stone.Addweight = make(map[int32]int32, 0)
|
||||||
update["addweight"] = stone.Addweight
|
update["addweight"] = stone.Addweight
|
||||||
|
|
||||||
|
// 清除指定类型道具 item,10000036 该货币在关卡结算时,清空
|
||||||
|
this.module.ModuleItems.CleanItemById(session, "10000036") // 策划强烈要求这样写
|
||||||
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
|
this.module.modelStonehenge.ChangeStonehengeData(session.GetUserId(), update)
|
||||||
session.SendMsg(string(this.module.GetType()), "finish", &pb.StonehengeFinishResp{
|
session.SendMsg(string(this.module.GetType()), "finish", &pb.StonehengeFinishResp{
|
||||||
Data: stone,
|
Data: stone,
|
||||||
|
Loading…
Reference in New Issue
Block a user