diff --git a/package-lock.json b/package-lock.json index a858a5d0..e84d1c57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "morgan": "^1.10.0", "ncp": "^2.0.0", "typescript": "^5.5", - "warframe-public-export-plus": "^0.5.54", + "warframe-public-export-plus": "^0.5.55", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0" @@ -3789,9 +3789,9 @@ } }, "node_modules/warframe-public-export-plus": { - "version": "0.5.54", - "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.54.tgz", - "integrity": "sha512-27r6qLErr3P8UVDiEzhDAs/BjdAS3vI2CQ58jSI+LClDlj6QL+y1jQe8va/npl3Ft2K8PywLkZ8Yso0j9YzvOA==" + "version": "0.5.55", + "resolved": "https://registry.npmjs.org/warframe-public-export-plus/-/warframe-public-export-plus-0.5.55.tgz", + "integrity": "sha512-Gnd4FCBVuxm2xWGfu8xxxqPIPSnnTqiEWlpP3rsFpVlQs09RNFnW2PEX9rCZt0f3SvHBv5ssDDrFlzgBHS1yrA==" }, "node_modules/warframe-riven-info": { "version": "0.1.2", diff --git a/package.json b/package.json index 008d5a18..58b231d3 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "morgan": "^1.10.0", "ncp": "^2.0.0", "typescript": "^5.5", - "warframe-public-export-plus": "^0.5.54", + "warframe-public-export-plus": "^0.5.55", "warframe-riven-info": "^0.1.2", "winston": "^3.17.0", "winston-daily-rotate-file": "^5.0.0" diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 2f78f65a..104eb460 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -1131,6 +1131,28 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo, tierOverride: number | u drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount }); } } + + if (RewardInfo.PurgatoryRewardQualifications) { + for (const encodedQualification of RewardInfo.PurgatoryRewardQualifications) { + const qualification = parseInt(encodedQualification) - 1; + if (qualification < 0 || qualification > 8) { + logger.error(`unexpected purgatory reward qualification: ${qualification}`); + } else { + const drop = getRandomRewardByChance( + ExportRewards[ + [ + "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryBlackTokenRewards", + "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryGoldTokenRewards", + "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryBlueTokenRewards" + ][qualification / 3] + ][qualification % 3] + ); + if (drop) { + drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount }); + } + } + } + } } return drops; }