From 69d158320aa95fac578e33dcc9febbf472f6d4e7 Mon Sep 17 00:00:00 2001 From: MaikyM <51415805+MaikyM@users.noreply.github.com> Date: Fri, 14 Jun 2019 15:17:10 -0600 Subject: [PATCH] Fixed challenge counter of '...a single match' --- FModel/Methods/ChallengeGenerator/BundleInfos.cs | 5 ++++- FModel/Parser/Quests/QuestParser.cs | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/FModel/Methods/ChallengeGenerator/BundleInfos.cs b/FModel/Methods/ChallengeGenerator/BundleInfos.cs index 7c5eeeaa..930984eb 100644 --- a/FModel/Methods/ChallengeGenerator/BundleInfos.cs +++ b/FModel/Methods/ChallengeGenerator/BundleInfos.cs @@ -1,4 +1,4 @@ -using csharp_wick; +using csharp_wick; using FModel.Parser.Challenges; using FModel.Parser.Items; using FModel.Parser.Quests; @@ -96,6 +96,9 @@ namespace FModel string newQuest = questParser[x].Objectives[p].Description; long newCount = questParser[x].Objectives[p].Count; + if (questParser[x].BAthenaMustCompleteInSingleMatch != false && questParser[x].ObjectiveCompletionCount > 0) + newCount = questParser[x].ObjectiveCompletionCount; + if (newQuest != oldQuest && newCount != oldCount) { if (questParser[x].Rewards != null) diff --git a/FModel/Parser/Quests/QuestParser.cs b/FModel/Parser/Quests/QuestParser.cs index a4dbc31b..de411b0c 100644 --- a/FModel/Parser/Quests/QuestParser.cs +++ b/FModel/Parser/Quests/QuestParser.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using Newtonsoft.Json; using Newtonsoft.Json.Converters; @@ -12,11 +12,14 @@ namespace FModel.Parser.Quests [JsonProperty("QuestType")] public string QuestType { get; set; } + [JsonProperty("bAthenaMustCompleteInSingleMatch")] + public bool BAthenaMustCompleteInSingleMatch { get; set; } + [JsonProperty("bIncludedInCategories")] public bool BIncludedInCategories { get; set; } [JsonProperty("ObjectiveCompletionCount")] - public string ObjectiveCompletionCount { get; set; } + public long ObjectiveCompletionCount { get; set; } [JsonProperty("Rewards")] public Reward[] Rewards { get; set; }