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
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if value, ok := viking.Boos[req.BossType]; !ok { // 类型校验
|
// 类型校验
|
||||||
code = pb.ErrorCode_VikingBoosType
|
boosData := this.configure.GetVikingBossConfigData(req.BossType, req.Difficulty)
|
||||||
return
|
if boosData != nil {
|
||||||
} else {
|
if value, ok := viking.Boos[req.BossType]; !ok { // 类型校验
|
||||||
if value < req.Difficulty {
|
viking.Boos[req.BossType] = 0
|
||||||
if value+1 != req.Difficulty {
|
if value < req.Difficulty {
|
||||||
code = pb.ErrorCode_VikingLvErr
|
if value+1 != req.Difficulty {
|
||||||
return
|
code = pb.ErrorCode_VikingLvErr
|
||||||
|
return
|
||||||
|
}
|
||||||
|
newChallenge = true
|
||||||
|
} else { // 挑战历史
|
||||||
|
newChallenge = false
|
||||||
}
|
}
|
||||||
newChallenge = true
|
|
||||||
} else { // 挑战历史
|
|
||||||
newChallenge = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user