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

View File

@ -25,7 +25,13 @@ 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.OperationType != "UOT_SWAP_POLARITY" &&
operation.OperationType != "UOT_ABILITY_OVERRIDE"
) {
if (!operation.UpgradeRequirement) {
throw new Error(`${operation.OperationType} operation should be free?`);
}
addMiscItems(inventory, [
{
ItemType: operation.UpgradeRequirement,