diff --git a/GenerateQuestFile/Program.cs b/GenerateQuestFile/Program.cs index d08e0ef..1027872 100644 --- a/GenerateQuestFile/Program.cs +++ b/GenerateQuestFile/Program.cs @@ -4,6 +4,7 @@ using QuestValidator.Common.Helpers; using QuestValidator.Common.Models; using QuestValidator.Helpers; using QuestValidator.Models; +using QuestValidator.Models.Output; using System; using System.Collections.Generic; using System.IO; @@ -348,6 +349,12 @@ namespace GenerateQuestFile item._id = originalItem._id; item.parentId = originalItem.parentId; } + + // Above changes can cause the target and first items id to become mismatched + if (reward.items.FirstOrDefault()._id != reward.target) + { + reward.target = reward.items.FirstOrDefault()._id; + } } } }