军团捐献,许愿池,装备,养成 注释

This commit is contained in:
mamengke01
2021-02-24 18:33:42 +08:00
parent 87d7bf6a8e
commit 88d5e26753
9 changed files with 152 additions and 73 deletions

View File

@@ -10,7 +10,7 @@ import { getTeraphAttr, getAtrrNameById } from '../../../consts/constModules/abi
import { findIndex } from 'underscore';
import { SclResultInter, SclPosInter } from '../../../pubUtils/interface';
import { SchoolModel } from '../../../db/School';
import { checkMaterialEnough } from '../../../services/roleService'
import { checkTeraphMaterialEnough } from '../../../services/roleService'
import { calPlayerCeAndSave, calAllHeroCe } from '../../../services/playerCeService';
import { HERO_SYSTEM_TYPE } from '../../../consts';
@@ -94,7 +94,7 @@ export class RoleHandler {
return resResult(STATUS.BATTLE_CONSUMES_NOT_ENOUGH);
await RoleModel.updateRoleInfo(roleId, { title });
let {ce} = await calAllHeroCe( sid, roleId, HERO_SYSTEM_TYPE.TITLE, [title]);
return resResult(STATUS.SUCCESS, { roleId, title, oldCe: reduceCe(oldCe), incRoleCe: ce - reduceCe(oldCe)});
return resResult(STATUS.SUCCESS, { roleId, title });
}
//神像强化
@@ -120,7 +120,7 @@ export class RoleHandler {
if (!attrs.length)
return resResult(STATUS.ROLE_TERAPH_NOT_STRENGTHEN);
// 随机神像中的一条属性并检查道具是否足够
let {attr, consumes} = checkMaterialEnough(count, attrs, teraphInfo, teraph);
let {attr, consumes} = checkTeraphMaterialEnough(count, attrs, teraphInfo, teraph);
for (let key in attr) {
teraph[key] += attr[key];
role.globalCeAttr[key].fixUp += attr[key];