武将初始装备栏
This commit is contained in:
@@ -83,10 +83,10 @@ export class EntryHandler {
|
||||
let equips = await EquipModel.findbyRole(role.roleId);
|
||||
let items = await ItemModel.findbyRole(role.roleId);
|
||||
|
||||
for(let hero of heros) {
|
||||
let actor = new Actor();
|
||||
actor.initHero(hero);
|
||||
actor.calculateCE();
|
||||
for(let i of heros) {
|
||||
for(let j of i.ePlace) {
|
||||
console.log(j.equip)
|
||||
}
|
||||
}
|
||||
|
||||
role['heros'] = heros;
|
||||
|
||||
@@ -26,7 +26,7 @@ export class RoleHandler {
|
||||
type: 1
|
||||
}
|
||||
const equip = await EquipModel.createEquip(equipInfo);
|
||||
await HeroModel.addEquip(roleId, 1, equip._id);
|
||||
await HeroModel.addEquip(roleId, 12, equip._id);
|
||||
}
|
||||
|
||||
async initHeros(roleId: string, roleName: string) {
|
||||
@@ -54,10 +54,10 @@ export class RoleHandler {
|
||||
await this.initHeros(roleId, roleName);
|
||||
}
|
||||
|
||||
let equips = await EquipModel.findbyRole(roleId);
|
||||
if (!equips || equips.length === 0) {
|
||||
// let equips = await EquipModel.findbyRole(roleId);
|
||||
// if (!equips || equips.length === 0) {
|
||||
await this.initEquips(roleId, roleName);
|
||||
}
|
||||
// }
|
||||
|
||||
console.log('initRole finish');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user