diff --git a/project/Aki.Custom/AkiCustomPlugin.cs b/project/Aki.Custom/AkiCustomPlugin.cs index 578096c..e3062ef 100644 --- a/project/Aki.Custom/AkiCustomPlugin.cs +++ b/project/Aki.Custom/AkiCustomPlugin.cs @@ -65,7 +65,8 @@ namespace Aki.Custom new BTREndRaidItemDeliveryPatch().Enable(); new BTRDestroyAtRaidEndPatch().Enable(); new BTRVehicleMovementSpeedPatch().Enable(); - } + new ScavItemCheckmarkPatch().Enable(); + } catch (Exception ex) { Logger.LogError($"A PATCH IN {GetType().Name} FAILED. SUBSEQUENT PATCHES HAVE NOT LOADED"); diff --git a/project/Aki.Custom/Patches/ScavItemCheckmarkPatch.cs b/project/Aki.Custom/Patches/ScavItemCheckmarkPatch.cs new file mode 100644 index 0000000..7093524 --- /dev/null +++ b/project/Aki.Custom/Patches/ScavItemCheckmarkPatch.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Aki.Reflection.Patching; +using Aki.Reflection.Utils; +using EFT.UI.DragAndDrop; +using HarmonyLib; + +namespace Aki.Custom.Patches +{ + + public class ScavItemCheckmarkPatch : ModulePatch + { + protected override MethodBase GetTargetMethod() + { + return AccessTools.Method(typeof(QuestItemViewPanel), nameof(QuestItemViewPanel.smethod_0)); + } + + [PatchPrefix] + public static void PatchPreFix(ref IEnumerable quests) + { + var pmcQuests = PatchConstants.BackEndSession.Profile.QuestsData; + var scavQuests = PatchConstants.BackEndSession.ProfileOfPet.QuestsData; + + quests = pmcQuests.Concat(scavQuests); + } + } +} \ No newline at end of file