From a27f1c5e017dcbcd1527138b5629b188d753f1c4 Mon Sep 17 00:00:00 2001 From: VampireKitten Date: Tue, 25 Feb 2025 10:08:27 -0800 Subject: [PATCH] fix: converting storeitems in missionRewards (#1017) Fixes the acquisition of blueprints as rewards, such as those rewarded by the Junctions. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1017 Co-authored-by: VampireKitten Co-committed-by: VampireKitten --- src/services/missionInventoryUpdateService.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/missionInventoryUpdateService.ts b/src/services/missionInventoryUpdateService.ts index d0e82376..2d393e22 100644 --- a/src/services/missionInventoryUpdateService.ts +++ b/src/services/missionInventoryUpdateService.ts @@ -351,7 +351,7 @@ export const addFixedLevelRewards = ( if (rewards.items) { for (const item of rewards.items) { MissionRewards.push({ - StoreItem: `/Lotus/StoreItems${item.substring("Lotus/".length)}`, + StoreItem: item.includes(`/StoreItems/`) ? item : `/Lotus/StoreItems${item.substring("Lotus/".length)}`, ItemCount: 1 }); } @@ -359,7 +359,9 @@ export const addFixedLevelRewards = ( if (rewards.countedItems) { for (const item of rewards.countedItems) { MissionRewards.push({ - StoreItem: `/Lotus/StoreItems${item.ItemType.substring("Lotus/".length)}`, + StoreItem: item.ItemType.includes(`/StoreItems/`) + ? item.ItemType + : `/Lotus/StoreItems${item.ItemType.substring("Lotus/".length)}`, ItemCount: item.ItemCount }); }