forked from chomp/ChompQuestVerifier
Dont copy fail rewards if they already exist
This commit is contained in:
parent
4c2cb7dab3
commit
48cf20e8d4
@ -165,7 +165,16 @@ namespace GenerateQuestFile
|
|||||||
|
|
||||||
private static void AddMissingFailRewards(Quest originalQuest, KeyValuePair<string, Quest> quest)
|
private static void AddMissingFailRewards(Quest originalQuest, KeyValuePair<string, Quest> quest)
|
||||||
{
|
{
|
||||||
quest.Value.rewards.Fail.AddRange(originalQuest.rewards.Fail);
|
foreach (var originalFailReward in originalQuest.rewards.Fail)
|
||||||
|
{
|
||||||
|
// already has a fail reward of same type and target, skip
|
||||||
|
if (quest.Value.rewards.Fail.Any(x => x.type == originalFailReward.type && x.target == originalFailReward.target))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
quest.Value.rewards.Fail.Add(originalFailReward);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user