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(); }