From 8940751facfe7a5bbffdc8ab1526c6f5dd0c90fc Mon Sep 17 00:00:00 2001 From: Chomp Date: Wed, 12 Jan 2022 11:48:23 +0000 Subject: [PATCH] Skip start condition lookup from original quest file if it cant be found, show warning if this occurs --- GenerateQuestFile/Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GenerateQuestFile/Program.cs b/GenerateQuestFile/Program.cs index 77697ed..6395a69 100644 --- a/GenerateQuestFile/Program.cs +++ b/GenerateQuestFile/Program.cs @@ -66,6 +66,12 @@ namespace GenerateQuestFile var originalQuest = existingQuestData.FirstOrDefault(x => x.Key == quest.Key).Value; + if (originalQuest is null) + { + LoggingHelpers.LogWarning($"Cant check for original start conditions. Unable to find original quest {quest.Key} {QuestHelper.GetQuestNameById(quest.Key)}. skipping."); + continue; + } + // quest has start conditions, check to ensure they're carried over if (originalQuest.conditions.AvailableForStart.Count > 0) {