战力计算,远征战力筛选

This commit is contained in:
luying
2020-11-12 18:21:05 +08:00
parent 40c16587b3
commit b0a0bbc71b
34 changed files with 22812 additions and 15964 deletions
@@ -10,6 +10,7 @@ import { resResult } from '../../../pubUtils/util';
import { startEvent } from '../../../services/eventSercive';
import { EVENT_START_LV } from '../../../consts/consts';
import { getAp } from '../../../services/actionPointService';
import Actor from '../../../pubUtils/actor';
export default function (app: Application) {
return new EntryHandler(app);
@@ -64,6 +65,7 @@ export class EntryHandler {
session.on('closed', this.onUserLeave.bind(this));
if(role.lv >= EVENT_START_LV && !role.eventStatus) {
startEvent(self.app, session);
}
@@ -79,6 +81,12 @@ export class EntryHandler {
// let users = await self.app.rpc.chat.chatRemote.add.route(session)(role.roleId, self.app.get('serverId'), rid, true);
let heros = await HeroModel.findByRole(role.roleId);
let equips = await EquipModel.findbyRole(role.roleId);
for(let hero of heros) {
let actor = new Actor(hero);
actor.calculateCE();
}
role['heros'] = heros;
role['equips'] = equips;
let apJson = await getAp(Date.now(), role.roleId);