fix: respect VaultsCracked when rolling droptable for level key rewards #1639

Merged
Sainan merged 3 commits from xoris-fix into main 2025-04-15 14:58:15 -07:00
Showing only changes of commit cf68201ce5 - Show all commits

View File

@ -871,7 +871,7 @@ export const addFixedLevelRewards = (
rewards: IMissionRewardExternal,
inventory: TInventoryDatabaseDocument,
MissionRewards: IMissionReward[],
rewardInfo: IRewardInfo
rewardInfo?: IRewardInfo
): number => {
let missionBonusCredits = 0;
if (rewards.credits) {
@ -903,7 +903,7 @@ export const addFixedLevelRewards = (
if (rewards.droptable in ExportRewards) {
const rotations: number[] = [];
// This makes it so that /Lotus/Types/Keys/ProteaQuest/ProteaQuestMissionFour gives all 3 Xoris parts
if (rewardInfo.VaultsCracked) {
if (rewardInfo?.VaultsCracked) {
for (let i = 0; i != rewardInfo.VaultsCracked; ++i) {
rotations.push(i);
}