From f6ca96ca392fbf5f5e0b03322a63311f8337093c Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 14 Apr 2025 19:23:03 +0200 Subject: [PATCH] fix: don't try to subtract MiscItems for polarity swap --- src/controllers/api/upgradesController.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/upgradesController.ts b/src/controllers/api/upgradesController.ts index 855d2aa7..8a0648b1 100644 --- a/src/controllers/api/upgradesController.ts +++ b/src/controllers/api/upgradesController.ts @@ -25,13 +25,16 @@ export const upgradesController: RequestHandler = async (req, res) => { operation.UpgradeRequirement == "/Lotus/Types/Items/MiscItems/CustomizationSlotUnlocker" ) { updateCurrency(inventory, 10, true); - } else if (operation.OperationType != "UOT_ABILITY_OVERRIDE") { + } else if (operation.UpgradeRequirement) { addMiscItems(inventory, [ { ItemType: operation.UpgradeRequirement, ItemCount: -1 } satisfies IMiscItem ]); + } else { + // UOT_SWAP_POLARITY - free operation + // UOT_ABILITY_OVERRIDE - handled below } if (operation.OperationType == "UOT_ABILITY_OVERRIDE") {