小关通关条件校验

This commit is contained in:
meixiongfeng 2023-08-17 20:55:50 +08:00
parent 058f3b5ffd
commit 3cd85c4d91
2 changed files with 11 additions and 8 deletions

View File

@ -118,8 +118,8 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
}
return
}
case EventType14:
case EventType28: // 战斗事件
case EventType14, EventType28: // 战斗事件
if req.Report == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
@ -212,8 +212,8 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
}
return
}
case EventType17: // 英雄回血
case EventType18:
case EventType17, EventType18: // 英雄回血
var sz []int32 // 获取
var szHero []string
for _, v := range stone.Hero {
@ -268,8 +268,8 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
}
}
update["hero"] = stone.Hero
case EventType23: // 事件buff 强化
case EventType29: // 商店强化
case EventType23, EventType29: // 事件buff 强化// 商店强化
if num, err := strconv.Atoi(req.Param1); err == nil {
buffid := int32(num)
if _, ok := stone.Userbuff[buffid]; ok {

View File

@ -45,8 +45,11 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.StonehengeFinishR
}
}
stone.Reward[stone.StageID] = true
update["reward"] = stone.Reward
// 校验是否是通关
if conf := this.module.configure.GetStageConfByStageid(stone.StageID, stone.CurRoomIndes+1); conf == nil {
stone.Reward[stone.StageID] = true
update["reward"] = stone.Reward
}
stone.StageID = 0
update["stageID"] = stone.StageID