nope, this doesn't work because UOT_ABILITY_OVERRIDE does have non-empty UpgradeRequirement (sometimes)
All checks were successful
Build / build (push) Successful in 1m29s
Build / build (pull_request) Successful in 1m22s

This commit is contained in:
Sainan 2025-04-14 19:26:57 +02:00
parent f6ca96ca39
commit 162f1f69b3

View File

@ -25,16 +25,19 @@ export const upgradesController: RequestHandler = async (req, res) => {
operation.UpgradeRequirement == "/Lotus/Types/Items/MiscItems/CustomizationSlotUnlocker"
) {
updateCurrency(inventory, 10, true);
} else if (operation.UpgradeRequirement) {
} 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,
ItemCount: -1
} satisfies IMiscItem
]);
} else {
// UOT_SWAP_POLARITY - free operation
// UOT_ABILITY_OVERRIDE - handled below
}
if (operation.OperationType == "UOT_ABILITY_OVERRIDE") {