feat: implement arcane adapters (#187)

This commit is contained in:
Sainan 2024-05-09 00:59:44 +02:00 committed by GitHub
parent 852fdcfc0e
commit bc3fca8ccf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,6 +35,17 @@ export const upgradesController: RequestHandler = async (req, res) => {
} }
} }
break; break;
case "/Lotus/Types/Items/MiscItems/WeaponPrimaryArcaneUnlocker":
case "/Lotus/Types/Items/MiscItems/WeaponSecondaryArcaneUnlocker":
case "/Lotus/Types/Items/MiscItems/WeaponMeleeArcaneUnlocker":
for (const item of inventory[payload.ItemCategory as TGenericItemKey] as IGenericItemDatabase[]) {
if (item._id.toString() == payload.ItemId.$oid) {
item.Features ??= 0;
item.Features |= 32;
break;
}
}
break;
default: default:
throw new Error("Unsupported upgrade: " + operation.UpgradeRequirement); throw new Error("Unsupported upgrade: " + operation.UpgradeRequirement);
} }