From 5e625d414712869a039880290eca7fcca49901cf Mon Sep 17 00:00:00 2001 From: liangtongchuan Date: Mon, 7 Dec 2020 20:27:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BB=E5=AE=9D=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=8C=B9=E9=85=8D=E6=9C=BA=E5=99=A8=E4=BA=BA=E5=BC=80=E6=88=98?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=AF=BB=E5=AE=9D=E6=9C=AA=E5=BC=80=E5=A7=8B?= =?UTF-8?q?=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/servers/battle/handler/comBattleHandler.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/game-server/app/servers/battle/handler/comBattleHandler.ts b/game-server/app/servers/battle/handler/comBattleHandler.ts index 63c7b8902..ad38920d9 100644 --- a/game-server/app/servers/battle/handler/comBattleHandler.ts +++ b/game-server/app/servers/battle/handler/comBattleHandler.ts @@ -251,7 +251,12 @@ export class ComBattleHandler { } // 机器人队伍 3 秒直接开战 setTimeout(async () => { - await ComBattleTeamModel.updateStatus(teamCode, COM_TEAM_STATUS.FIGHTING); + let t = await ComBattleTeamModel.updateStatus(teamCode, COM_TEAM_STATUS.FIGHTING); + let memT = thiz.teamMap.get(teamCode); + if (!t || !memT) { + return; + } + memT.status = COM_TEAM_STATUS.FIGHTING; channelService.pushMessageByUids('onComBtlStart', {teamCode, roleStatus: comTeam.roleStatus}, [{uid: roleId, sid}]); }, 3000); }, COM_BTL_CONST.ASSIST_TIME);