结算获取消耗品和金币
This commit is contained in:
@@ -6,9 +6,8 @@ import { BattleRecordModel } from './../db/BattleRecord';
|
||||
import { TowerRecordModel } from './../db/TowerRecord';
|
||||
import { RoleModel } from './../db/Role';
|
||||
import { getHeroInfoById, getJobInfoById, getTowerDataByLv, getLvByExp, getExpByLv } from "../pubUtils/gamedata"
|
||||
import { decodeArrayStr, shouldRefresh } from '../pubUtils/util';
|
||||
import { decodeArrayStr, shouldRefresh, resResult } from '../pubUtils/util';
|
||||
import { handleFixedReward } from './rewardService';
|
||||
import { resResult } from '../pubUtils/util';
|
||||
import { STATUS } from '../consts/statusCode';
|
||||
|
||||
export async function checkTowerWar(roleId: string, battleId: number, heroes: Array<number>) {
|
||||
@@ -75,10 +74,12 @@ export async function towerBattleEnd(channelService: ChannelService, sid: string
|
||||
}
|
||||
const { bonus, fixReward } = getTowerDataByLv(towerLv);
|
||||
if (bonus) {
|
||||
bonusReward = await handleFixedReward(roleId, roleName, bonus, 1);
|
||||
let result = await handleFixedReward(roleId, roleName, bonus, 1);
|
||||
bonusReward = result.goods;
|
||||
}
|
||||
if (fixReward) {
|
||||
towerReward = await handleFixedReward(roleId, roleName, fixReward, 1);
|
||||
let result = await handleFixedReward(roleId, roleName, fixReward, 1);
|
||||
towerReward = result.goods;
|
||||
}
|
||||
if (towerLv + 1 >= HANG_UP_CONSTS.ENABLE_LV) {
|
||||
await startHangUp(roleId, roleName);
|
||||
@@ -200,5 +201,5 @@ export async function roleLevelup(roleId: string, kingExp: number) {
|
||||
mostExp : cur
|
||||
})
|
||||
}
|
||||
return {actordata, lv, exp};
|
||||
return {actordata, lv, exp, kingExp};
|
||||
}
|
||||
Reference in New Issue
Block a user