viking boss类型校验
This commit is contained in:
parent
66997a30ca
commit
455952d877
@ -41,10 +41,11 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
// 类型校验
|
||||
boosData := this.configure.GetVikingBossConfigData(req.BossType, req.Difficulty)
|
||||
if boosData != nil {
|
||||
if value, ok := viking.Boos[req.BossType]; !ok { // 类型校验
|
||||
code = pb.ErrorCode_VikingBoosType
|
||||
return
|
||||
} else {
|
||||
viking.Boos[req.BossType] = 0
|
||||
if value < req.Difficulty {
|
||||
if value+1 != req.Difficulty {
|
||||
code = pb.ErrorCode_VikingLvErr
|
||||
@ -55,6 +56,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
|
||||
newChallenge = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if newChallenge { // 新关卡挑战通过 发放首通奖励
|
||||
if code = this.module.DispenseRes(session, cfg.Firstprize, true); code != pb.ErrorCode_Success {
|
||||
|
Loading…
Reference in New Issue
Block a user