From fe3c9863507eb1f210e1083a79af5ad531ebabee Mon Sep 17 00:00:00 2001 From: zhangxk Date: Wed, 12 Jul 2023 13:25:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=BF=9C=E5=BE=81):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=BF=9C=E5=BE=81=E5=85=B3=E5=8D=A1=E6=8C=91=E6=88=98=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/servers/battle/handler/expeditionBattleHandler.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/game-server/app/servers/battle/handler/expeditionBattleHandler.ts b/game-server/app/servers/battle/handler/expeditionBattleHandler.ts index 255d0e0ef..5c9ddbf2d 100644 --- a/game-server/app/servers/battle/handler/expeditionBattleHandler.ts +++ b/game-server/app/servers/battle/handler/expeditionBattleHandler.ts @@ -95,6 +95,11 @@ export class ExpeditionBattleHandler { // const roleName = session.get('roleName'); const { expeditionCode, expeditionId } = msg; + let expeditionWarRecord = await ExpeditionWarRecordModel.getRecordByCodeAndId(expeditionCode, expeditionId); + if (expeditionWarRecord && (expeditionWarRecord.battleStatus == EXPEDITION_WAR_RECORD_STATUS.SUCCESS)) { + return resResult(STATUS.EXPEDITION_DUPLICATE_CHALLENGE); + } + let { myCe } = await ExpeditionRecordModel.getExpeditionRecordByCode(expeditionCode); let curExpeditionWarRecord = await findOrCreateEnemies(roleId, myCe, expeditionCode, expeditionId, EXPEDITION_WAR_RECORD_STATUS.WAITING);