fix: put vault medallion into correct place
All checks were successful
Build / build (pull_request) Successful in 57s

Re #2719
This commit is contained in:
AMelonInsideLemon 2025-08-29 22:01:39 +02:00
parent a2171c80a5
commit f0f492dd72

View File

@ -1476,7 +1476,7 @@ export const addMissionRewards = async (
if (vault) { if (vault) {
currentJob = vault; currentJob = vault;
if (jobType.endsWith("VaultBounty")) { if (jobType.endsWith("VaultBounty")) {
currentJob.xpAmounts = [currentJob.xpAmounts.reduce((partialSum, a) => partialSum + a, 0)]; currentJob.xpAmounts[rewardInfo.JobTier!] = currentJob.xpAmounts.reduce((s, a) => s + a, 0);
} }
} }
} }
@ -1493,6 +1493,7 @@ export const addMissionRewards = async (
medallionAmount = Math.floor(endlessJob.xpAmounts[index] * (1 + 0.15000001 * excess)); medallionAmount = Math.floor(endlessJob.xpAmounts[index] * (1 + 0.15000001 * excess));
} }
} }
if (typeof medallionAmount === "number" && !isNaN(medallionAmount)) {
await addItem(inventory, "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonB", medallionAmount); await addItem(inventory, "/Lotus/Types/Items/Deimos/EntratiFragmentUncommonB", medallionAmount);
MissionRewards.push({ MissionRewards.push({
StoreItem: "/Lotus/StoreItems/Types/Items/Deimos/EntratiFragmentUncommonB", StoreItem: "/Lotus/StoreItems/Types/Items/Deimos/EntratiFragmentUncommonB",
@ -1502,6 +1503,12 @@ export const addMissionRewards = async (
logger.debug( logger.debug(
`Giving ${medallionAmount} medallions for the ${rewardInfo.JobStage} stage of the ${rewardInfo.JobTier} tier bounty` `Giving ${medallionAmount} medallions for the ${rewardInfo.JobStage} stage of the ${rewardInfo.JobTier} tier bounty`
); );
} else {
logger.warning(
`${jobType} tried to give ${medallionAmount} medallions for ${rewardInfo.JobStage} (jobTier ${rewardInfo.JobTier})`
);
logger.warning(`currentJob`, { currentJob: currentJob });
}
} else { } else {
const specialCase = [ const specialCase = [
{ endings: ["Heists/HeistProfitTakerBountyOne"], stage: 2, amount: 1000 }, { endings: ["Heists/HeistProfitTakerBountyOne"], stage: 2, amount: 1000 },