结算获取消耗品和金币
This commit is contained in:
@@ -107,7 +107,7 @@ export class EventBattleHandler {
|
||||
eventCode: result.eventCode,
|
||||
eventId: result.eventId,
|
||||
status: result.status,
|
||||
goods
|
||||
...goods
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -232,7 +232,7 @@ export class ExpeditionBattleHandler {
|
||||
expeditionCode, expeditionId,
|
||||
battleCode, battleId,
|
||||
battleStatus: expeditionWarRecord.battleStatus,
|
||||
goods: reward,
|
||||
...reward,
|
||||
apJson,
|
||||
expeditionPoint
|
||||
});
|
||||
@@ -273,7 +273,7 @@ export class ExpeditionBattleHandler {
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
expeditionCode, expeditionId,
|
||||
battleId, battleCode, battleStatus, received,
|
||||
goods
|
||||
...goods
|
||||
});
|
||||
|
||||
}
|
||||
@@ -315,7 +315,7 @@ export class ExpeditionBattleHandler {
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
pointRewards,
|
||||
goods
|
||||
...goods
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ export class NormalBattleHandler {
|
||||
// towerBonus: 天梯每隔几层的额外宝箱
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
battleCode, battleId, status, towerStatus,
|
||||
goods: reward, towerBonus, towerReward,
|
||||
...reward, towerBonus, towerReward,
|
||||
apJson,
|
||||
dailyNum,
|
||||
heroes: curHeroes,
|
||||
@@ -262,7 +262,7 @@ export class NormalBattleHandler {
|
||||
|
||||
return resResult(STATUS.SUCCESS, {
|
||||
battleId, count,
|
||||
goods: result,
|
||||
...result,
|
||||
apJson,
|
||||
dailyNum,
|
||||
...actordata
|
||||
|
||||
@@ -85,7 +85,7 @@ export class TowerBattleHandler {
|
||||
}
|
||||
const goods = await handleFixedReward(roleId, roleName, timeReward, multi);
|
||||
const newRec = await HangUpRecordModel.updateRec(roleId, roleName, endLv, endTime);
|
||||
return resResult(STATUS.SUCCESS, { endTime, goods, hangUpRec: newRec });
|
||||
return resResult(STATUS.SUCCESS, { endTime, ...goods, hangUpRec: newRec });
|
||||
}
|
||||
|
||||
async hangUpSpeedUp(msg: {speedUpCnt: number}, session: BackendSession) {
|
||||
@@ -106,7 +106,7 @@ export class TowerBattleHandler {
|
||||
}
|
||||
const spdUpRec = await HangUpSpdUpRecModel.updateRec(roleId, roleName, multi, endLv);
|
||||
const goods = await handleFixedReward(roleId, roleName, timeReward, multi);
|
||||
return resResult(STATUS.SUCCESS, { goods, rewardLv: endLv, spdUpRec });
|
||||
return resResult(STATUS.SUCCESS, { ...goods, rewardLv: endLv, spdUpRec });
|
||||
}
|
||||
|
||||
async getTasks(msg: {}, session: BackendSession) {
|
||||
@@ -186,11 +186,11 @@ export class TowerBattleHandler {
|
||||
if (task.sendTime && task.sendTime.getTime() + completeTime * 1000 < curTime.getTime()) {
|
||||
compTasks.push(task.taskCode);
|
||||
const rewardGoods = await handleFixedReward(roleId, roleName, reward, 1);
|
||||
goods = goods.concat(rewardGoods);
|
||||
goods = goods.concat(rewardGoods.goods);
|
||||
if(bonusCondition) {
|
||||
const res = checkTaskConditions(roleId, task.heroes, bonusCondition);
|
||||
const bonusGoods = await handleFixedReward(roleId, roleName, bonus, 1);
|
||||
goods = goods.concat(bonusGoods);
|
||||
goods = goods.concat(bonusGoods.goods);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user