形象:修改好感度解锁逻辑

This commit is contained in:
luying
2021-03-12 16:20:58 +08:00
parent df5d6ba92e
commit 6a7a3eadca
8 changed files with 67 additions and 43 deletions

View File

@@ -313,7 +313,7 @@ export default class Auth extends Service {
const role = await RoleModel.createRole(uid, serverId, { roleId, code, roleName, seqId, lv: DEFAULT_LV, exp: (getExpByLv(DEFAULT_LV - 1) || { sum: 0 }).sum || 0 });
if (role) {
let skinIds = new Array<number>();
let conditions = new Array<{type: number, num: number}>()
let conditions = new Array<{type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number }>()
for (let hid of DEFAULT_HEROES) {
let hero = await HeroModel.findByHidAndRole(hid, roleId);
@@ -332,8 +332,8 @@ export default class Auth extends Service {
skins: [{ id: initialSkin, enable: true }], lv: DEFAULT_HERO_LV, exp: getHeroExpByLv(DEFAULT_HERO_LV - 1) || 0
});
skinIds.push(initialSkin);
conditions.push({type: FIGURE_UNLOCK_CONDITION.GET_HERO, num: hid});
conditions.push({type: FIGURE_UNLOCK_CONDITION.GET_SKIN, num: initialSkin});
conditions.push({type: FIGURE_UNLOCK_CONDITION.GET_HERO, paramHid: hid});
conditions.push({type: FIGURE_UNLOCK_CONDITION.GET_SKIN, paramSkinId: initialSkin});
await calPlayerCeAndSave(HERO_SYSTEM_TYPE.INIT, roleId, hero, {});