From 2ff471e7540ca98e35208e3b7365f39b9cd72d65 Mon Sep 17 00:00:00 2001 From: Kaeno Date: Wed, 28 Feb 2024 20:34:15 +0000 Subject: [PATCH] Remove GClass Refs for cultist amulet patch --- project/Aki.Custom/Patches/CultistAmuletRemovalPatch.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/project/Aki.Custom/Patches/CultistAmuletRemovalPatch.cs b/project/Aki.Custom/Patches/CultistAmuletRemovalPatch.cs index 2d6db64..766dd4a 100644 --- a/project/Aki.Custom/Patches/CultistAmuletRemovalPatch.cs +++ b/project/Aki.Custom/Patches/CultistAmuletRemovalPatch.cs @@ -14,20 +14,19 @@ namespace Aki.Custom.Patches { public class CultistAmuletRemovalPatch : ModulePatch { - //Update GClass ref and Possibly name GClass protected override MethodBase GetTargetMethod() { return AccessTools.Method(typeof(CultistEventsClass), nameof(CultistEventsClass.method_4)); } [PatchPostfix] - private static void PatchPostfix(ref DamageInfo damageInfo, Player victim) + private static void PatchPostfix(DamageInfo damageInfo, Player victim) { var player = damageInfo.Player.iPlayer; - var amulet = damageInfo.Player.iPlayer.FindCultistAmulet(); + var amulet = player.FindCultistAmulet(); if (victim.Profile.Info.Settings.Role.IsSectant() && amulet != null) { - var list = (player.Profile.Inventory.Equipment.GetSlot(EquipmentSlot.Pockets).ContainedItem as GClass2683).Slots; + var list = (player.Profile.Inventory.Equipment.GetSlot(EquipmentSlot.Pockets).ContainedItem as SearchableItemClass).Slots; var amuletslot = list.Single(x => x.ContainedItem == amulet); amuletslot.RemoveItem(); }