Fix bad reward ids

This commit is contained in:
Chomp 2023-08-21 13:41:30 +01:00
parent 69a18f06f4
commit 67c1df8415

View File

@ -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;
}
}
}
}