战力显示缩小

This commit is contained in:
luying
2020-12-24 10:53:23 +08:00
parent cc1a91ed09
commit 4bfc92f8cf
6 changed files with 66 additions and 28 deletions

View File

@@ -6,9 +6,9 @@ import { GMUserModel } from '../../../db/GMUser';
import { Application, Session } from 'pinus';
import {FrontendSession} from 'pinus';
import { HeroModel } from './../../../db/Hero';
import { resResult } from '../../../pubUtils/util';
import { resResult, returnHeroCeRatio, reduceCe } from '../../../pubUtils/util';
import { startEvent } from '../../../services/eventSercive';
import { EVENT_START_LV, FUNC_OPT_TYPE } from '../../../consts';
import { EVENT_START_LV, FUNC_OPT_TYPE, HERO_CE_RATIO } from '../../../consts';
import { getAp } from '../../../services/actionPointService';
import Actor from '../../../pubUtils/actor';
import { ItemModel } from '../../../db/Item';
@@ -79,17 +79,13 @@ export class EntryHandler {
let equips = await EquipModel.findbyRole(role.roleId);
let items = await ItemModel.findbyRole(role.roleId);
// for(let i of heros) {
// for(let j of i.ePlace) {
// console.log(j.equip)
// }
// }
role['heros'] = heros;
role['heros'] = heros.map(cur => returnHeroCeRatio(cur));
role['equips'] = equips;
role['consumeGoods'] = items;
let apJson = await getAp(Date.now(), role.roleId);
role['apJson'] = apJson;
role['ce'] = reduceCe(role.ce);
await switchOnFunc(role.roleId, FUNC_OPT_TYPE.LEVEL_UP, role.lv, self.app, session);
return resResult(STATUS.SUCCESS, { role });