🐞 fix(稷下学宫): 在battleEnd时主动将这层置为通过,防止端不调用nodeEnd接口
This commit is contained in:
@@ -485,6 +485,9 @@ export class RougeHandler {
|
|||||||
const layerReward = getLayerRewardOneData(dbRecord.type, dbRecord.grade, layer, newNodeType);
|
const layerReward = getLayerRewardOneData(dbRecord.type, dbRecord.grade, layer, newNodeType);
|
||||||
incCoin = Math.floor((layerReward.coin || 0) * (1 + coinRatio / 100) + coinAdd);
|
incCoin = Math.floor((layerReward.coin || 0) * (1 + coinRatio / 100) + coinAdd);
|
||||||
await RougelikeRecordModel.updateByGameCode(gameCode, { $inc: { coin: incCoin, coinTotal: incCoin } });
|
await RougelikeRecordModel.updateByGameCode(gameCode, { $inc: { coin: incCoin, coinTotal: incCoin } });
|
||||||
|
|
||||||
|
//battleEnd 主动将hasPass置为true
|
||||||
|
await RougelikeLayerModel.updateByGameCode(gameCode, layer, { $set: { hasPass: true } });
|
||||||
}
|
}
|
||||||
|
|
||||||
// let coinReward = rewards.find(cur => cur.rewardType == 0);
|
// let coinReward = rewards.find(cur => cur.rewardType == 0);
|
||||||
@@ -634,9 +637,10 @@ export class RougeHandler {
|
|||||||
|
|
||||||
groupStatus = ROUGE_LIKE_CHOOSE_REWARD.CHOOSE;
|
groupStatus = ROUGE_LIKE_CHOOSE_REWARD.CHOOSE;
|
||||||
|
|
||||||
await RougelikeLayerModel.updateByGameCode(gameCode, layer, { $set: { hasPass: true } })
|
if (nodeType == ROUGE_LIKE_NODE_TYPE.CHALLENGE) {
|
||||||
|
// 挑战关领奖更新
|
||||||
if (nodeType != ROUGE_LIKE_NODE_TYPE.CHALLENGE) {
|
await RougelikeLayerModel.updateByGameCode(gameCode, layer, { $set: { hasPass: true } })
|
||||||
|
} else {
|
||||||
// 更新进度
|
// 更新进度
|
||||||
await updateChalleng(dbRecord, roleId, sid, gameCode, layer, []); // 更新挑战进度
|
await updateChalleng(dbRecord, roleId, sid, gameCode, layer, []); // 更新挑战进度
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user