战斗:参数改为使用系统参数表

This commit is contained in:
luying
2021-08-30 16:54:31 +08:00
parent 4078508505
commit 1e722c59d4
12 changed files with 76 additions and 81 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, KING_EXP_RATIO_TYPE, LINEUP_NUM, TASK_TYPE } from '../../../consts';
import { 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';
@@ -15,6 +15,7 @@ import { resResult } from '../../../pubUtils/util';
import { checkBattleHeroes, roleLevelup } from '../../../services/normalBattleService';
import { checkActivityTask, checkTask, checkTaskInBattleEnd } from '../../../services/taskService';
import { gameData } from '../../../pubUtils/data';
import * as dicParam from '../../../pubUtils/dicParam';
export default function (app: Application) {
new HandlerService(app, {});
@@ -226,7 +227,7 @@ export class ExpeditionBattleHandler {
$set: { status: isSuccess ? 1 : 2, star }
}, true);
// 更新点数
role = await RoleModel.increaseExpeditionPoint(roleId, isSuccess ? EXPEDITION_CONST.INCREASE_POINT : 0);
role = await RoleModel.increaseExpeditionPoint(roleId, isSuccess ? dicParam.EXPEDITION_CONST.EXPEDITION_CONST_POINTS : 0);
let { expeditionPoint = 0 } = role;
// 关卡奖励