合成藏宝图,消耗品单独开表

This commit is contained in:
luying
2020-11-25 20:31:42 +08:00
parent 3f3c716dc6
commit 169ba8cea7
17 changed files with 282 additions and 215 deletions

View File

@@ -11,6 +11,7 @@ import { startEvent } from '../../../services/eventSercive';
import { EVENT_START_LV } from '../../../consts/consts';
import { getAp } from '../../../services/actionPointService';
import Actor from '../../../pubUtils/actor';
import { ItemModel } from '../../../db/Item';
export default function (app: Application) {
return new EntryHandler(app);
@@ -82,6 +83,7 @@ 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);
let items = await ItemModel.findbyRole(role.roleId);
for(let hero of heros) {
let actor = new Actor();
@@ -91,6 +93,7 @@ export class EntryHandler {
role['heros'] = heros;
role['equips'] = equips;
role['consumeGoods'] = items;
let apJson = await getAp(Date.now(), role.roleId);
role['apJson'] = apJson;
return resResult(STATUS.SUCCESS, { role });