关卡:主公经验和等级挂钩

This commit is contained in:
luying
2021-08-27 14:40:43 +08:00
parent cbc4087a5b
commit d71767dfca
9 changed files with 49 additions and 38 deletions
@@ -6,7 +6,7 @@ import { ExpeditionPointModel } from '../../../db/ExpeditionPoint';
import { RoleModel } from '../../../db/Role';
import { calculateSumCE, genCode } from '../../../pubUtils/util';
import { getPointRewardStatus, getResetRemainCnt, findOrCreateEnemies, getExpeditionStatus } from '../../../services/expeditionService';
import { EXPEDITION_CONST, EXPEDITION_WAR_RECORD_STATUS, LINEUP_NUM, TASK_TYPE } from '../../../consts';
import { EXPEDITION_CONST, EXPEDITION_WAR_RECORD_STATUS, KING_EXP_RATIO_TYPE, LINEUP_NUM, TASK_TYPE } from '../../../consts';
import { WarReward } from '../../../services/warRewardService';
import { addItems } from '../../../services/rewardService';
import { getAp, setAp } from '../../../services/actionPointService';
@@ -233,7 +233,7 @@ export class ExpeditionBattleHandler {
let warReward = new WarReward(roleId, roleName, sid, battleId, isSuccess);
let reward = await warReward.saveReward(1);
let actordata = await roleLevelup(roleId, isSuccess ? warInfo.kingExp : 0, session);// 主公升级经验
let actordata = await roleLevelup(KING_EXP_RATIO_TYPE.BATTLE, roleId, isSuccess ? warInfo.kingExp : 0, session);// 主公升级经验
if (isSuccess) {
// 更新下一关状态
await ExpeditionWarRecordModel.updateStatus(expeditionCode, expeditionId + 1, EXPEDITION_WAR_RECORD_STATUS.WAITING);