diff --git a/FModel/Methods/Assets/IconCreator/ChallengeID/ChallengeBundleInfos.cs b/FModel/Methods/Assets/IconCreator/ChallengeID/ChallengeBundleInfos.cs index 8643b148..cae3944b 100644 --- a/FModel/Methods/Assets/IconCreator/ChallengeID/ChallengeBundleInfos.cs +++ b/FModel/Methods/Assets/IconCreator/ChallengeID/ChallengeBundleInfos.cs @@ -1,4 +1,4 @@ -using FModel.Methods.Utilities; +using FModel.Methods.Utilities; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using PakReader; @@ -138,19 +138,33 @@ namespace FModel.Methods.Assets.IconCreator.ChallengeID { try { - //checking the whole array for the reward - //ignoring all Quest and Token until he find the reward - JToken targetChecker = rewardsDataArray.Where(x => - !string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Quest") && - !string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Token")) + JToken targetChecker = null; + JToken targetQuantity = null; + + // It's individual, other challenges with tokens must be displayed? + // It's checked if it remains a token because it can change in the future + bool isToken = rewardsDataArray.Where(x => string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Token")).Any(); + if (string.Equals(System.IO.Path.GetFileName(assetPath), "Quest_S11_AlterEgo_08") && isToken) + { + targetChecker = rewardsDataArray.FirstOrDefault()["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][1]["tag_data"]; + targetQuantity = rewardsDataArray.FirstOrDefault()["struct_type"]["properties"][1]["tag_data"]; + } + else + { + //checking the whole array for the reward + //ignoring all Quest and Token until he find the reward + targetChecker = rewardsDataArray.Where(x => + !string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Quest") && + !string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Token")) .FirstOrDefault()["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][1]["tag_data"]; - //checking the whole array for the reward quantity - //ignoring all Quest and Token until he find the reward quantity - JToken targetQuantity = rewardsDataArray.Where(x => - !string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Quest") && - !string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Token")) + //checking the whole array for the reward quantity + //ignoring all Quest and Token until he find the reward quantity + targetQuantity = rewardsDataArray.Where(x => + !string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Quest") && + !string.Equals(x["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"]["struct_type"]["properties"][0]["tag_data"].Value(), "Token")) .FirstOrDefault()["struct_type"]["properties"][1]["tag_data"]; + } if (targetChecker != null) {