战斗校验

This commit is contained in:
meixiongfeng 2022-10-13 14:14:15 +08:00
parent 729dd3823c
commit 504b0b8db3
3 changed files with 15 additions and 0 deletions

View File

@ -78,6 +78,12 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
this.module.modulerank.updatehuntingRankList(session, req.Difficulty, req.BossType, req.Report.Info.Redflist[0].Leadpos, sz, req.Report.Costtime)
}
}
// check
code, _ = this.module.battle.CheckBattleReport(session, req.Report)
if code != pb.ErrorCode_Success {
return
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
hunting.ChallengeCount++
mapData["challengeCount"] = hunting.ChallengeCount

View File

@ -65,6 +65,10 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
}
}
// 校验通过
code, _ = this.module.battle.CheckBattleReport(session, req.Report)
if code != pb.ErrorCode_Success {
return
}
// 加经验
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
for _, v := range req.Report.Info.Redflist[0].Team {
@ -140,6 +144,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
}
this.module.modulerank.addPagodaRankList(session, seasonPagoda, req.Report.Info.Redflist[0].Leadpos, sz, req.Report.Costtime)
}
// 挑战处理
seasonPagoda.PagodaId = conf.LayerNum
mapData["pagodaId"] = conf.LayerNum

View File

@ -81,6 +81,10 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
}
}
// 耗时校验 当前战斗胜利时间消耗小于之前刷新数据
code, _ = this.module.battle.CheckBattleReport(session, req.Report)
if code != pb.ErrorCode_Success {
return
}
viking.ChallengeCount++
mapData["challengeCount"] = viking.ChallengeCount