From e9ad1c50a0695223291083c6d89e0fa1bd098fea Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 17 Feb 2024 10:13:19 +0000 Subject: [PATCH] Fixed quest completion check not working for quests that have string values inside its `AvailableForStart` status array --- project/src/controllers/QuestController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/project/src/controllers/QuestController.ts b/project/src/controllers/QuestController.ts index 774dc4f9..bdc8444b 100644 --- a/project/src/controllers/QuestController.ts +++ b/project/src/controllers/QuestController.ts @@ -147,7 +147,8 @@ export class QuestController } // Prereq does not have its status requirement fulfilled - if (!conditionToFulfil.status.includes(prerequisiteQuest.status)) + // Some bsg status ids are strings, MUST convert to number before doing includes check + if (!conditionToFulfil.status.map((status) => Number(status)).includes(prerequisiteQuest.status)) { haveCompletedPreviousQuest = false; break;