From 09fb6e67edaceef78a57a26c04c63d13acdcb808 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 4 Jan 2023 09:58:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=98=E6=96=97=E5=A4=B1=E8=B4=A5=E6=88=98?= =?UTF-8?q?=E6=8A=A5=E6=95=B0=E6=8D=AE=E4=B8=BA=E7=A9=BA=20=E7=94=B1?= =?UTF-8?q?=E4=B8=8B=E5=B1=82=E5=88=A4=E6=96=AD=E8=BE=93=E8=B5=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mainline/api_challengeover.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/mainline/api_challengeover.go b/modules/mainline/api_challengeover.go index 97062a0c3..e60614325 100644 --- a/modules/mainline/api_challengeover.go +++ b/modules/mainline/api_challengeover.go @@ -56,14 +56,11 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh } // 校验通过 - if req.Report != nil { // 战斗失败 - code, isWin = this.module.battle.CheckBattleReport(session, req.Report) - if code != pb.ErrorCode_Success { - return - } - } else { - isWin = false + code, isWin = this.module.battle.CheckBattleReport(session, req.Report) + if code != pb.ErrorCode_Success { + return } + if !isWin { // 战斗失败直接返回 // 返还 mainline.Ps = 0