fix: don't try to subtract MiscItems for polarity swap #1633

Merged
Sainan merged 2 commits from free-swap into main 2025-04-15 06:16:08 -07:00
Showing only changes of commit f6ca96ca39 - Show all commits

View File

@ -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") {