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