From 3820b975314d62aa13ef3c17325df5019311dd9e Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 23 Jul 2024 09:07:07 +0100 Subject: [PATCH] Added null protected to `playerLevelFulfillsQuestRequirement()` (cherry picked from commit c90b8670f2c2f170669c3e93cd0da5f4fafbcc5e) --- project/src/controllers/QuestController.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/project/src/controllers/QuestController.ts b/project/src/controllers/QuestController.ts index adf65d26..f38be134 100644 --- a/project/src/controllers/QuestController.ts +++ b/project/src/controllers/QuestController.ts @@ -215,6 +215,12 @@ export class QuestController */ protected playerLevelFulfillsQuestRequirement(quest: IQuest, playerLevel: number): boolean { + if (!quest.conditions) + { + // No conditions + return true; + } + const levelConditions = this.questConditionHelper.getLevelConditions(quest.conditions.AvailableForStart); if (levelConditions.length) {