viking boss类型校验
This commit is contained in:
parent
66997a30ca
commit
455952d877
@ -41,18 +41,20 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
if value, ok := viking.Boos[req.BossType]; !ok { // 类型校验
|
||||
code = pb.ErrorCode_VikingBoosType
|
||||
return
|
||||
} else {
|
||||
if value < req.Difficulty {
|
||||
if value+1 != req.Difficulty {
|
||||
code = pb.ErrorCode_VikingLvErr
|
||||
return
|
||||
// 类型校验
|
||||
boosData := this.configure.GetVikingBossConfigData(req.BossType, req.Difficulty)
|
||||
if boosData != nil {
|
||||
if value, ok := viking.Boos[req.BossType]; !ok { // 类型校验
|
||||
viking.Boos[req.BossType] = 0
|
||||
if value < req.Difficulty {
|
||||
if value+1 != req.Difficulty {
|
||||
code = pb.ErrorCode_VikingLvErr
|
||||
return
|
||||
}
|
||||
newChallenge = true
|
||||
} else { // 挑战历史
|
||||
newChallenge = false
|
||||
}
|
||||
newChallenge = true
|
||||
} else { // 挑战历史
|
||||
newChallenge = false
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user