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);