形象:修改好感度解锁逻辑
This commit is contained in:
@@ -151,7 +151,7 @@ export async function addItems(roleId: string, roleName: string, sid: string, go
|
||||
for (let id of figures) {//皮肤推送
|
||||
showItems.push({id, count: 1});
|
||||
}
|
||||
if (!!figureInfo) {
|
||||
if (!!figureInfo && (figureInfo.heads.length > 0 || figureInfo.frames.length > 0 || figureInfo.spines.length > 0)) {
|
||||
pinus.app.get('channelService').pushMessageByUids('onHeadChange', resResult(STATUS.SUCCESS, { ...figureInfo }), uids);
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ export async function addItems(roleId: string, roleName: string, sid: string, go
|
||||
}
|
||||
}
|
||||
if (!!skinInfos.length) {
|
||||
let unlockedType = addSkinIds.map(cur => { return { type: FIGURE_UNLOCK_CONDITION.GET_SKIN, num: cur } });
|
||||
let unlockedType = addSkinIds.map(cur => { return { type: FIGURE_UNLOCK_CONDITION.GET_SKIN, paramSkinId: cur } });
|
||||
await unlockFigure(sid, roleId, unlockedType);
|
||||
calAllHeroCe(HERO_SYSTEM_TYPE.ADD_SKIN, sid, roleId, {}, addSkinIds);
|
||||
pinus.app.get('channelService').pushMessageByUids('onHeroSkinChange', resResult(STATUS.SUCCESS, {skinInfos}), uids);
|
||||
@@ -284,10 +284,10 @@ export async function checkGoods(roleId: string, goodIds: Array<number>) {
|
||||
}
|
||||
|
||||
|
||||
export async function unlockFigure(sid: string, roleId: string, conditions: {type: number, num: number}[], role?: RoleType) {
|
||||
export async function unlockFigure(sid: string, roleId: string, conditions: { type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number }[], role?: RoleType) {
|
||||
let figureInfo = await pubUnlockFigure(roleId, conditions, role);
|
||||
|
||||
if (!!figureInfo) {
|
||||
if (!!figureInfo && (figureInfo.heads.length > 0 || figureInfo.frames.length > 0 || figureInfo.spines.length > 0)) {
|
||||
let uids = [{uid: roleId, sid}];
|
||||
pinus.app.get('channelService').pushMessageByUids('onHeadChange', resResult(STATUS.SUCCESS, { ...figureInfo }), uids);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user