From 9a54411eb14fcc6f78626b3e13d335592bcd6aa4 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 30 Dec 2022 10:16:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/enchant/api_challenge.go | 2 +- modules/hunting/api_challenge.go | 2 +- modules/viking/api_challenge.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/enchant/api_challenge.go b/modules/enchant/api_challenge.go index 1aa9f51c1..cac07b4cd 100644 --- a/modules/enchant/api_challenge.go +++ b/modules/enchant/api_challenge.go @@ -10,7 +10,7 @@ import ( //参数校验 func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.EnchantChallengeReq) (code pb.ErrorCode) { - if req.BossType <= 0 || req.Battle != nil { + if req.BossType <= 0 || req.Battle == nil { code = pb.ErrorCode_ReqParameterError return } diff --git a/modules/hunting/api_challenge.go b/modules/hunting/api_challenge.go index cb0ba8bcb..85f335cec 100644 --- a/modules/hunting/api_challenge.go +++ b/modules/hunting/api_challenge.go @@ -10,7 +10,7 @@ import ( //参数校验 func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.HuntingChallengeReq) (code pb.ErrorCode) { - if req.BossType <= 0 && req.Difficulty > 0 || req.Battle != nil { + if req.BossType <= 0 && req.Difficulty > 0 || req.Battle == nil { code = pb.ErrorCode_ReqParameterError return } diff --git a/modules/viking/api_challenge.go b/modules/viking/api_challenge.go index b6961d95e..e86695bd1 100644 --- a/modules/viking/api_challenge.go +++ b/modules/viking/api_challenge.go @@ -10,7 +10,7 @@ import ( //参数校验 func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.VikingChallengeReq) (code pb.ErrorCode) { - if req.BossId <= 0 && req.Difficulty > 0 || req.Battle != nil { + if req.BossId <= 0 && req.Difficulty > 0 || req.Battle == nil { code = pb.ErrorCode_ReqParameterError return }