挑战次数问题

This commit is contained in:
meixiongfeng 2022-09-08 13:56:58 +08:00
parent 9fdc8d9264
commit 9209f23b14
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.HuntingChallen
code = pb.ErrorCode_PagodaNotFound
return
}
if hunting.ChallengeCount+hunting.BuyCount > this.module.configure.GetGlobalConf().HuntingNum {
if hunting.ChallengeCount > this.module.configure.GetGlobalConf().HuntingNum+hunting.BuyCount {
code = pb.ErrorCode_HuntingMaxChallengeCount
return
}

View File

@ -37,7 +37,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng
return
}
if viking.ChallengeCount+viking.BuyCount > this.module.configure.GetGlobalConf().VikingNum {
if viking.ChallengeCount > this.module.configure.GetGlobalConf().VikingNum+viking.BuyCount {
code = pb.ErrorCode_VikingMaxChallengeCount
return
}