don't store settings until conquest is unlocked
All checks were successful
Build / build (18) (push) Successful in 1m19s
Build / build (20) (push) Successful in 38s
Build / build (22) (push) Successful in 1m7s
Build / build (18) (pull_request) Successful in 40s
Build / build (20) (pull_request) Successful in 1m7s
Build / build (22) (pull_request) Successful in 39s

the client could just not send the request in this case but whatever...
This commit is contained in:
Sainan 2025-03-22 21:58:38 +01:00
parent a082331632
commit 92013aad67

View File

@ -19,11 +19,11 @@ export const entratiLabConquestModeController: RequestHandler = async (req, res)
const weekEnd = weekStart + 604800000;
inventory.EntratiVaultCountLastPeriod = 0;
inventory.EntratiVaultCountResetDate = new Date(weekEnd);
if ("EntratiLabConquestUnlocked" in inventory) {
if (inventory.EntratiLabConquestUnlocked) {
inventory.EntratiLabConquestUnlocked = 0;
inventory.EntratiLabConquestActiveFrameVariants = [];
}
if ("EchoesHexConquestUnlocked" in inventory) {
if (inventory.EchoesHexConquestUnlocked) {
inventory.EchoesHexConquestUnlocked = 0;
inventory.EchoesHexConquestActiveFrameVariants = [];
inventory.EchoesHexConquestActiveStickers = [];
@ -38,11 +38,15 @@ export const entratiLabConquestModeController: RequestHandler = async (req, res)
}
}
if (body.IsEchoesDeepArchemedea) {
if (inventory.EchoesHexConquestUnlocked) {
inventory.EchoesHexConquestActiveFrameVariants = body.EchoesHexConquestActiveFrameVariants!;
inventory.EchoesHexConquestActiveStickers = body.EchoesHexConquestActiveStickers!;
}
} else {
if (inventory.EntratiLabConquestUnlocked) {
inventory.EntratiLabConquestActiveFrameVariants = body.EntratiLabConquestActiveFrameVariants!;
}
}
await inventory.save();
res.json({
EntratiVaultCountResetDate: toMongoDate(inventory.EntratiVaultCountResetDate),