远征本主界面及匹配机器人

This commit is contained in:
luying
2020-10-13 19:16:58 +08:00
parent 682e95561d
commit 7652f63414
15 changed files with 568 additions and 17 deletions
@@ -1,6 +1,7 @@
import { CounterModel } from '../../../db/Counter';
import { HeroModel } from '../../../db/Hero';
import { EquipModel } from '../../../db/Equip';
import { calculateCE } from '../../../util/util';
import {Application, BackendSession, createTcpMailBox} from 'pinus';
export default function(app: Application) {
@@ -27,12 +28,14 @@ export class RoleHandler {
async initHeros(roleId: string, roleName: string) {
const seqId = await CounterModel.getNewCounter('hid');
let ce = calculateCE({hid: 1, lv: 1});
const heroInfo = {
roleId,
roleName,
hid: 1,
hName: '曹操',
seqId
seqId,
ce
}
await HeroModel.createHero(heroInfo);
}