武将:抽象武将创建接口

This commit is contained in:
luying
2021-04-23 19:32:02 +08:00
parent 2b246c4bc9
commit 0cd6939f5e
18 changed files with 213 additions and 95 deletions

View File

@@ -310,14 +310,11 @@ export default class Auth extends Service {
let dicHero = getHeroInfoById(hid);
if (!dicHero) break;
let { quality, initialStars: star, jobid: job, name: hName, initialSkin } = dicHero;
heroInfos.push({
roleId, roleName: role.roleName, hid, hName, star, quality, job, serverId: role.serverId,
skins: [{ id: initialSkin, enable: true }], lv: DEFAULT_HERO_LV, exp: getHeroExpByLv(DEFAULT_HERO_LV - 1) || 0
hid, lv: DEFAULT_HERO_LV, exp: getHeroExpByLv(DEFAULT_HERO_LV - 1) || 0
});
}
await createHeroes(roleId, heroInfos);
await createHeroes(roleId, role.roleName, serverId, heroInfos);
for (let { id, count } of DEFAULT_ITEMS) {
let dicGoods = gameData.goods.get(id);