From 9209f23b14249fe988f050fef8b5a7c0c5e33dc7 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 8 Sep 2022 13:56:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=91=E6=88=98=E6=AC=A1=E6=95=B0=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hunting/api_challenge.go | 2 +- modules/viking/api_challenge.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 }