创建武将

This commit is contained in:
陆莹
2022-03-25 14:14:36 +08:00
parent a394bae03e
commit 1bdace30f9
17 changed files with 747 additions and 357 deletions
@@ -367,7 +367,7 @@ export async function addSkin(roleId: string, roleName: string, sid: string, ski
if (hero) { // 有武将的,将皮肤链接到武将上
let curSkin = hero.skins.find(cur => cur.id == skinId);
if (!curSkin) {
hero.skins.push(new HeroSkin(skin.id, skin.skinId, skin._id, enable ));
hero.skins.push(new HeroSkin(skin, enable));
await HeroModel.updateHeroInfo(roleId, hero.hid, hero);
}
return hero;