优化:初始账号皮肤优化

This commit is contained in:
luying
2021-08-27 18:04:45 +08:00
parent fa3643c314
commit 03bf96a2c1
5 changed files with 49 additions and 28 deletions

View File

@@ -51,14 +51,19 @@ export class RoleHandler {
hid, lv: DEFAULT_HERO_LV, exp: getHeroExpByLv(DEFAULT_HERO_LV - 1) || 0
});
}
console.log('****** createHeroes before', Date.now())
await createHeroes(roleId, roleName, sid, serverId, funcs, heroInfos);
console.log('****** createHeroes after', Date.now())
session.set('roleName', roleName);
session.push('roleName', () => { });
let items = [].concat(DEFAULT_ITEMS, DEFAULT_EQUIPS, [getGoldObject(DEFAULT_GOLD)], [getCoinObject(DEFAULT_COIN)]);
await addItems(roleId, roleName, sid, items);
console.log('****** calAllHeroCe before', Date.now())
let calResult = await calAllHeroCe(HERO_SYSTEM_TYPE.INIT, sid, roleId, { hasInit: true, roleName });
console.log('****** calAllHeroCe after', Date.now())
let battleId = SCRIPT.SCRIPT_BATTLE_ID;
let warInfo = gameData.war.get(battleId);