结算获取消耗品和金币
This commit is contained in:
@@ -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