From 05c0c9909cec20af6866fcf43e73caf1e2735f96 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Thu, 3 Apr 2025 10:37:52 -0700 Subject: [PATCH] fix: ignore purchaseQuantity when giving mission rewards (#1446) Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1446 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/services/missionInventoryUpdateService.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index 97a04fe8..0ff1e1d4 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -537,7 +537,13 @@ export const addMissionRewards = async ( } for (const reward of MissionRewards) { - const inventoryChange = await handleStoreItemAcquisition(reward.StoreItem, inventory, reward.ItemCount); + const inventoryChange = await handleStoreItemAcquisition( + reward.StoreItem, + inventory, + reward.ItemCount, + undefined, + true + ); //TODO: combineInventoryChanges improve type safety, merging 2 of the same item? //TODO: check for the case when two of the same item are added, combineInventoryChanges should merge them, but the client also merges them //TODO: some conditional types to rule out binchanges?