🐞 fix(稷下学宫): 圣物解锁特性槽(仅解锁上阵学员)
This commit is contained in:
@@ -285,6 +285,8 @@ export class RougeHandler {
|
|||||||
* @param session
|
* @param session
|
||||||
*/
|
*/
|
||||||
async chooseNode(msg: { gameCode: string, layer: number, detailCode: string }, session: BackendSession) {
|
async chooseNode(msg: { gameCode: string, layer: number, detailCode: string }, session: BackendSession) {
|
||||||
|
let chooseNodeStartTime = Date.now();
|
||||||
|
|
||||||
let roleId = session.get('roleId');
|
let roleId = session.get('roleId');
|
||||||
const { gameCode, layer, detailCode } = msg;
|
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);
|
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;
|
if (!getHolyCardIsUse(this.holyMap.get(cardCode))) continue;
|
||||||
const randomNum = effectParam[0] || 0;
|
const randomNum = effectParam[0] || 0;
|
||||||
let unlockNum = effectParam[1] || 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) {
|
for (let val of charas) {
|
||||||
unlockNum = effectParam[1] || 0;
|
unlockNum = effectParam[1] || 0;
|
||||||
let { charaCode, cards = [] } = val;
|
let { charaCode, cards = [] } = val;
|
||||||
|
|||||||
Reference in New Issue
Block a user