always send back AffiliationMods since we apply it either way
All checks were successful
Build / build (pull_request) Successful in 1m16s

This commit is contained in:
Sainan 2025-09-13 17:32:03 +02:00
parent 429d1e555e
commit 294781ffc3

View File

@ -1097,10 +1097,12 @@ export const addMissionRewards = async (
}: IMissionInventoryUpdateRequest, }: IMissionInventoryUpdateRequest,
firstCompletion: boolean firstCompletion: boolean
): Promise<AddMissionRewardsReturnType> => { ): Promise<AddMissionRewardsReturnType> => {
AffiliationMods ??= [];
if (!rewardInfo) { if (!rewardInfo) {
//TODO: if there is a case where you can have credits collected during a mission but no rewardInfo, add credits needs to be handled earlier //TODO: if there is a case where you can have credits collected during a mission but no rewardInfo, add credits needs to be handled earlier
logger.debug(`Mission ${missions!.Tag} did not have Reward Info `); logger.debug(`Mission ${missions!.Tag} did not have Reward Info `);
return { MissionRewards: [], AffiliationMods: [] }; return { MissionRewards: [], AffiliationMods };
} }
//TODO: check double reward merging //TODO: check double reward merging
@ -1410,8 +1412,6 @@ export const addMissionRewards = async (
} }
} }
AffiliationMods ??= [];
if (rewardInfo.JobStage != undefined && rewardInfo.jobId) { if (rewardInfo.JobStage != undefined && rewardInfo.jobId) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
const [jobType, unkIndex, hubNode, syndicateMissionId] = rewardInfo.jobId.split("_"); const [jobType, unkIndex, hubNode, syndicateMissionId] = rewardInfo.jobId.split("_");