From c508aac93a4cbf2b4bd5d8e74dfcd9800384babc Mon Sep 17 00:00:00 2001 From: MaikyM <51415805+MaikyM@users.noreply.github.com> Date: Fri, 20 Dec 2019 12:27:31 -0600 Subject: [PATCH] Fix Challenge stages (more): some must be repeated. --- .../ChallengeID/ChallengeBundleInfos.cs | 24 +++++++++---------- FModel/Methods/FVar.cs | 6 +++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/FModel/Methods/Assets/IconCreator/ChallengeID/ChallengeBundleInfos.cs b/FModel/Methods/Assets/IconCreator/ChallengeID/ChallengeBundleInfos.cs index a084365f..1a63ee3d 100644 --- a/FModel/Methods/Assets/IconCreator/ChallengeID/ChallengeBundleInfos.cs +++ b/FModel/Methods/Assets/IconCreator/ChallengeID/ChallengeBundleInfos.cs @@ -147,16 +147,16 @@ namespace FModel.Methods.Assets.IconCreator.ChallengeID rewardQuantity = targetQuantity.Value(); } - BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, rewardPath, rewardQuantity); - if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount)) + BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, rewardPath, rewardQuantity, assetPath); + if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount && string.Equals(item.TheAssetPath, currentData.TheAssetPath))) { BundleData.Add(currentData); } } else { - BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, "", ""); - if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount)) + BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, "", "", assetPath); + if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount && string.Equals(item.TheAssetPath, currentData.TheAssetPath))) { BundleData.Add(currentData); } @@ -184,8 +184,8 @@ namespace FModel.Methods.Assets.IconCreator.ChallengeID rewardQuantity = hiddenQuantityToken.Value(); } - BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, rewardPath, rewardQuantity); - if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount)) + BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, rewardPath, rewardQuantity, assetPath); + if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount && string.Equals(item.TheAssetPath, currentData.TheAssetPath))) { BundleData.Add(currentData); } @@ -194,8 +194,8 @@ namespace FModel.Methods.Assets.IconCreator.ChallengeID } else { - BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, "", ""); - if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount)) + BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, "", "", assetPath); + if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount && string.Equals(item.TheAssetPath, currentData.TheAssetPath))) { BundleData.Add(currentData); } @@ -239,8 +239,8 @@ namespace FModel.Methods.Assets.IconCreator.ChallengeID rewardQuantity = quantityToken["tag_data"].Value(); } - BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, rewardPath, rewardQuantity); - if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount)) + BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, rewardPath, rewardQuantity, assetPath); + if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount && string.Equals(item.TheAssetPath, currentData.TheAssetPath))) { BundleData.Add(currentData); } @@ -253,8 +253,8 @@ namespace FModel.Methods.Assets.IconCreator.ChallengeID } else { - BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, "", ""); - if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount)) + BundleInfosEntry currentData = new BundleInfosEntry(questDescription, questCount, unlockType, "", "", assetPath); + if (!BundleData.Any(item => item.TheQuestDescription.Equals(currentData.TheQuestDescription, StringComparison.InvariantCultureIgnoreCase) && item.TheQuestCount == currentData.TheQuestCount && string.Equals(item.TheAssetPath, currentData.TheAssetPath))) { BundleData.Add(currentData); } diff --git a/FModel/Methods/FVar.cs b/FModel/Methods/FVar.cs index a8fd59ec..2e05b703 100644 --- a/FModel/Methods/FVar.cs +++ b/FModel/Methods/FVar.cs @@ -1,4 +1,4 @@ -using PakReader; +using PakReader; using System; using System.Collections.Generic; using System.Runtime.InteropServices; @@ -98,14 +98,16 @@ namespace FModel.Methods public string TheQuestUnlockType { get; set; } public string TheRewardPath { get; set; } public string TheRewardQuantity { get; set; } + public string TheAssetPath { get; set; } - internal BundleInfosEntry(string MyQuestDescription, long MyQuestCount, string MyQuestUnlockType, string MyRewardPath, string MyRewardQuantity) + internal BundleInfosEntry(string MyQuestDescription, long MyQuestCount, string MyQuestUnlockType, string MyRewardPath, string MyRewardQuantity, string MyAssetPath) { TheQuestDescription = MyQuestDescription; TheQuestCount = MyQuestCount; TheQuestUnlockType = MyQuestUnlockType; TheRewardPath = MyRewardPath; TheRewardQuantity = MyRewardQuantity; + TheAssetPath = MyAssetPath; } bool IEquatable.Equals(BundleInfosEntry other)