形象:修改好感度解锁逻辑
This commit is contained in:
@@ -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, {});
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ export default class Utils extends Service {
|
||||
return addEquips(roleId, roleName, weapon);
|
||||
}
|
||||
|
||||
public unlockFigure(roleId: string, conditions: {type: number, num: number}[], role?: RoleType) {
|
||||
public unlockFigure(roleId: string, conditions: {type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number}[], role?: RoleType) {
|
||||
return unlockFigure(roleId, conditions, role);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user