任务:修复推送

This commit is contained in:
luying
2021-11-17 19:21:22 +08:00
parent 08fffc2b54
commit 47ab6b35ee
2 changed files with 5 additions and 5 deletions
@@ -796,7 +796,7 @@ export class ComBattleHandler {
return resResult(STATUS.COM_BLUEPRT_COUNT_ERROR); return resResult(STATUS.COM_BLUEPRT_COUNT_ERROR);
} }
// 添加寻宝币 // 添加寻宝币
original.concat(dicCompose.coinNum); original.push(...dicCompose.coinNum);
// 消耗藏宝图和寻宝币 // 消耗藏宝图和寻宝币
let costResult = await handleCost(roleId, sid, original); let costResult = await handleCost(roleId, sid, original);
+4 -4
View File
@@ -39,7 +39,7 @@ export async function checkTaskWithRoles(serverId: number, taskType: number, rol
for (let role of roles) { for (let role of roles) {
if (role) { if (role) {
let singlePush = await checkTaskWithRole(serverId, role.roleId, taskType, role); let singlePush = await checkTaskWithRole(serverId, role.roleId, taskType, role);
pushMessage.concat(singlePush); pushMessage.push(...singlePush);
} }
} }
return pushMessage return pushMessage
@@ -221,12 +221,12 @@ export async function checkTaskWithArgs(roleId: string, taskType: number, args:
if (putOnJewel > 0) { if (putOnJewel > 0) {
let dicGood = gameData.goods.get(putOnJewel); let dicGood = gameData.goods.get(putOnJewel);
let push = await checkTask(roleId, taskType, 1, true, { stage: dicGood.lvLimited }); let push = await checkTask(roleId, taskType, 1, true, { stage: dicGood.lvLimited });
pushMessage.concat(push); pushMessage.push(...push);
} }
if (putOffJewel > 0) { if (putOffJewel > 0) {
let dicGood = gameData.goods.get(putOffJewel); let dicGood = gameData.goods.get(putOffJewel);
let push = await checkTask(roleId, taskType, -1, true, { stage: dicGood.lvLimited }); let push = await checkTask(roleId, taskType, -1, true, { stage: dicGood.lvLimited });
pushMessage.concat(push); pushMessage.push(...push);
} }
} }
else if (taskType == TASK_TYPE.CHAT) { 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) { if (taskType == TASK_TYPE.COM_BATTLE_DROP) {
for (let { id, count } of goods) { for (let { id, count } of goods) {
let push = await checkTask(roleId, taskType, count, true, { gid: id }); let push = await checkTask(roleId, taskType, count, true, { gid: id });
pushMessage.concat(push); pushMessage.push(...push);
} }
} }
return pushMessage return pushMessage