将 web-server 和 game-server 中的公共文件改为链接

This commit is contained in:
liangtongchuan
2020-09-10 17:20:27 +08:00
parent f8ac401c67
commit dbff02f5a6
32 changed files with 126 additions and 861 deletions

View File

@@ -1,9 +1,9 @@
import { RoleModel } from '../../../../../shared/db/Role';
import { UserModel } from '../../../../../shared/db/User';
import { EquipModel } from './../../../db/Equip';
import { RoleModel } from './../../../db/Role';
import { UserModel } from '../../../db/User';
import { Application, Session } from 'pinus';
import {FrontendSession} from 'pinus';
import Hero from '../../../../../shared/db/Hero';
import Equip from '../../../../../shared/db/Equip';
import { HeroModel } from './../../../db/Hero';
export default function (app: Application) {
return new EntryHandler(app);
@@ -70,8 +70,8 @@ export class EntryHandler {
// put user into channel
let users = await self.app.rpc.chat.chatRemote.add.route(session)(role.roleId, self.app.get('serverId'), rid, true);
let heros = await Hero.findByRole(role.roleId);
let equips = await Equip.findbyRole(role.roleId);
let heros = await HeroModel.findByRole(role.roleId);
let equips = await EquipModel.findbyRole(role.roleId);
role['heros'] = heros;
role['equips'] = equips;
return {