🐞 fix(稷下学宫): 圣物解锁特性槽(仅解锁上阵学员)
This commit is contained in:
@@ -170,7 +170,12 @@ export class RougeEffect {
|
||||
if (!getHolyCardIsUse(this.holyMap.get(cardCode))) continue;
|
||||
const randomNum = effectParam[0] || 0;
|
||||
let unlockNum = effectParam[1] || 0;
|
||||
let charas = getRandEelm(this.dbCharas.filter(cur => cur.cards.length < ROUGE_SLOT_LIMIT), randomNum);
|
||||
this.dbCharas.sort((a, b) => {
|
||||
if (a.seqId < b.seqId) return -1;
|
||||
if (a.seqId > b.seqId) return 1;
|
||||
return 0;
|
||||
});
|
||||
let charas = getRandEelm(this.dbCharas.slice(0, 6).filter(cur => cur.cards.length < ROUGE_SLOT_LIMIT), randomNum);
|
||||
for (let val of charas) {
|
||||
unlockNum = effectParam[1] || 0;
|
||||
let { charaCode, cards = [] } = val;
|
||||
@@ -212,7 +217,7 @@ export class RougeEffect {
|
||||
this.updateHolyMapUseCount(this.holyMap.get(cardCode));
|
||||
}
|
||||
}
|
||||
if(pushCards.length > 0){
|
||||
if (pushCards.length > 0) {
|
||||
await sendMessageToUserWithSuc(this.roleId, PUSH_ROUTE.ROUGE_PASSIVE_CARD_UP_LV, { upLvCards: pushCards }, this.sid);
|
||||
}
|
||||
}
|
||||
@@ -254,7 +259,7 @@ export class RougeEffect {
|
||||
}
|
||||
if (isUseCount) this.updateHolyMapUseCount(this.holyMap.get(cardCode));
|
||||
}
|
||||
if(pushCards.length > 0){
|
||||
if (pushCards.length > 0) {
|
||||
await sendMessageToUserWithSuc(this.roleId, PUSH_ROUTE.ROUGE_PASSIVE_CARD_UP_LV, { upLvCards: pushCards }, this.sid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user