From 3c709311d82dd4a86bb0893d574763a52e4103c0 Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 21 Oct 2023 21:24:14 +0100 Subject: [PATCH] Correctly save statusTimer values into profile --- project/src/controllers/InraidController.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/project/src/controllers/InraidController.ts b/project/src/controllers/InraidController.ts index a8d0f167..19007822 100644 --- a/project/src/controllers/InraidController.ts +++ b/project/src/controllers/InraidController.ts @@ -310,7 +310,17 @@ export class InraidController { this.logger.warning(`Quest: ${quest.qid} found in PMC profile has different status/statustimer. Scav: ${quest.status} vs PMC: ${pmcQuest.status}`); pmcQuest.status = QuestStatus[quest.status]; + + // Copy status timers over + fix bad enum key for each pmcQuest.statusTimers = quest.statusTimers; + for (const statusTimerKey in quest.statusTimers) + { + if (!Number(statusTimerKey)) + { + quest.statusTimers[QuestStatus[statusTimerKey]] = quest.statusTimers[statusTimerKey]; + delete quest.statusTimers[statusTimerKey]; + } + } } }