🐞 fix(稷下学宫): 圣物解锁特性槽(仅解锁上阵学员)
This commit is contained in:
@@ -285,6 +285,8 @@ export class RougeHandler {
|
||||
* @param session
|
||||
*/
|
||||
async chooseNode(msg: { gameCode: string, layer: number, detailCode: string }, session: BackendSession) {
|
||||
let chooseNodeStartTime = Date.now();
|
||||
|
||||
let roleId = session.get('roleId');
|
||||
const { gameCode, layer, detailCode } = msg;
|
||||
|
||||
@@ -321,7 +323,13 @@ export class RougeHandler {
|
||||
if (dbCurLayerChooseNode.preNodeIndexs.indexOf(dbPreLayerChooseNode.index) == -1) return resResult(STATUS.NODE_NO_CHOOSE);
|
||||
}
|
||||
|
||||
return resResult(STATUS.SUCCESS, { detailCode, layer, curNode: await chooseNode(dbRecord, dbCurLayerChooseNode, layer) })
|
||||
|
||||
let chooseNodeEndTime = Date.now();
|
||||
const curNode = await chooseNode(dbRecord, dbCurLayerChooseNode, layer)
|
||||
|
||||
console.log('*********************************nodeType=%s, chooseNodeTime=%s', curNode?.nodeType, chooseNodeEndTime - chooseNodeStartTime);
|
||||
|
||||
return resResult(STATUS.SUCCESS, { detailCode, layer, curNode })
|
||||
}
|
||||
|
||||
// 挑战关卡
|
||||
|
||||
@@ -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