Update missionInventoryUpdateService.ts
All checks were successful
Build / build (pull_request) Successful in 59s

This commit is contained in:
AMelonInsideLemon 2025-11-02 22:06:51 +01:00
parent 65f6c7a439
commit 69d816e3ad

View File

@ -1542,19 +1542,11 @@ export const addMissionRewards = async (
}, },
{ endings: ["Jobs/NewbieJob"], amount: 200, tag: "CetusSyndicate" } { endings: ["Jobs/NewbieJob"], amount: 200, tag: "CetusSyndicate" }
]; ];
if (specialCase.some(rule => rule.endings.some(e => jobType.endsWith(e)))) { const match = specialCase.find(rule => rule.endings.some(e => jobType.endsWith(e)));
const specialCaseReward = specialCase.find( if (match) {
rule => const specialCaseReward = match.stage === undefined || rewardInfo.JobStage === match.stage ? match : null;
rule.endings.some(e => jobType.endsWith(e)) &&
(rule.stage === undefined || rewardInfo.JobStage === rule.stage)
);
if (specialCaseReward) { if (specialCaseReward) {
addStanding( addStanding(inventory, match.tag, Math.floor(match.amount / (rewardInfo.Q ? 0.8 : 1)), AffiliationMods);
inventory,
specialCaseReward.tag,
Math.floor(specialCaseReward.amount / (rewardInfo.Q ? 0.8 : 1)),
AffiliationMods
);
} }
} else if (syndicateEntry && syndicateEntry.Jobs) { } else if (syndicateEntry && syndicateEntry.Jobs) {
let currentJob = syndicateEntry.Jobs[rewardInfo.JobTier!]; let currentJob = syndicateEntry.Jobs[rewardInfo.JobTier!];