diff --git a/modules/hunting/api_challenge.go b/modules/hunting/api_challenge.go index 41def23c1..fd3e31254 100644 --- a/modules/hunting/api_challenge.go +++ b/modules/hunting/api_challenge.go @@ -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 } diff --git a/modules/viking/api_challenge.go b/modules/viking/api_challenge.go index 535aa689a..108912f57 100644 --- a/modules/viking/api_challenge.go +++ b/modules/viking/api_challenge.go @@ -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 }