From 47ab6b35ee924f8e1aea4a48865e279b82839002 Mon Sep 17 00:00:00 2001 From: luying Date: Wed, 17 Nov 2021 19:21:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=9A=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/servers/battle/handler/comBattleHandler.ts | 2 +- shared/pubUtils/taskUtil.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/game-server/app/servers/battle/handler/comBattleHandler.ts b/game-server/app/servers/battle/handler/comBattleHandler.ts index 264b69e7b..babbb1bad 100644 --- a/game-server/app/servers/battle/handler/comBattleHandler.ts +++ b/game-server/app/servers/battle/handler/comBattleHandler.ts @@ -796,7 +796,7 @@ export class ComBattleHandler { return resResult(STATUS.COM_BLUEPRT_COUNT_ERROR); } // 添加寻宝币 - original.concat(dicCompose.coinNum); + original.push(...dicCompose.coinNum); // 消耗藏宝图和寻宝币 let costResult = await handleCost(roleId, sid, original); diff --git a/shared/pubUtils/taskUtil.ts b/shared/pubUtils/taskUtil.ts index db7c2d2ac..b1baadc3b 100644 --- a/shared/pubUtils/taskUtil.ts +++ b/shared/pubUtils/taskUtil.ts @@ -39,7 +39,7 @@ export async function checkTaskWithRoles(serverId: number, taskType: number, rol for (let role of roles) { if (role) { let singlePush = await checkTaskWithRole(serverId, role.roleId, taskType, role); - pushMessage.concat(singlePush); + pushMessage.push(...singlePush); } } return pushMessage @@ -221,12 +221,12 @@ export async function checkTaskWithArgs(roleId: string, taskType: number, args: if (putOnJewel > 0) { let dicGood = gameData.goods.get(putOnJewel); let push = await checkTask(roleId, taskType, 1, true, { stage: dicGood.lvLimited }); - pushMessage.concat(push); + pushMessage.push(...push); } if (putOffJewel > 0) { let dicGood = gameData.goods.get(putOffJewel); let push = await checkTask(roleId, taskType, -1, true, { stage: dicGood.lvLimited }); - pushMessage.concat(push); + pushMessage.push(...push); } } else if (taskType == TASK_TYPE.CHAT) { @@ -297,7 +297,7 @@ export async function checkTaskWithGoods(roleId: string, taskType: number, goods if (taskType == TASK_TYPE.COM_BATTLE_DROP) { for (let { id, count } of goods) { let push = await checkTask(roleId, taskType, count, true, { gid: id }); - pushMessage.concat(push); + pushMessage.push(...push); } } return pushMessage