Fixed quest completion check not working for quests that have string values inside its AvailableForStart status array

This commit is contained in:
Dev 2024-02-17 10:13:19 +00:00
parent cc061b5381
commit e9ad1c50a0

View File

@ -147,7 +147,8 @@ export class QuestController
} }
// Prereq does not have its status requirement fulfilled // 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; haveCompletedPreviousQuest = false;
break; break;