diff --git a/EXILED/Exiled.Events/Patches/Generic/ArmorDropPatch.cs b/EXILED/Exiled.Events/Patches/Fixes/ArmorDropPatch.cs similarity index 98% rename from EXILED/Exiled.Events/Patches/Generic/ArmorDropPatch.cs rename to EXILED/Exiled.Events/Patches/Fixes/ArmorDropPatch.cs index f02a9b8b2..a924f6808 100644 --- a/EXILED/Exiled.Events/Patches/Generic/ArmorDropPatch.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/ArmorDropPatch.cs @@ -5,7 +5,7 @@ // // ----------------------------------------------------------------------- -namespace Exiled.Events.Patches.Generic +namespace Exiled.Events.Patches.Fixes { using System.Collections.Generic; using System.Reflection.Emit; diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp173FirstKillPatch.cs b/EXILED/Exiled.Events/Patches/Fixes/Scp173FirstKillPatch.cs similarity index 87% rename from EXILED/Exiled.Events/Patches/Generic/Scp173FirstKillPatch.cs rename to EXILED/Exiled.Events/Patches/Fixes/Scp173FirstKillPatch.cs index fddda38f6..f66d35058 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp173FirstKillPatch.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Scp173FirstKillPatch.cs @@ -5,7 +5,7 @@ // // ----------------------------------------------------------------------- -namespace Exiled.Events.Patches.Generic +namespace Exiled.Events.Patches.Fixes { using System.Collections.Generic; using System.Reflection.Emit; @@ -33,11 +33,11 @@ private static IEnumerable Transpiler(IEnumerable x.opcode == OpCodes.Ldc_I4_0); newInstructions[index].WithLabels(continueLabel); - // TODO: NRE ON LEFT CLICK (KICK PLAYER) - DO NOT PUSH newInstructions.InsertRange(index, new CodeInstruction[] { - // if (hub.playerEffectController.GetEffect().IsEnabled) return false; - new(OpCodes.Ldarg_1), + // if (hitboxIdentity.TargetHub.playerEffectController.GetEffect().IsEnabled) return false; + new(OpCodes.Ldloc_2), + new(OpCodes.Callvirt, PropertyGetter(typeof(HitboxIdentity), nameof(HitboxIdentity.TargetHub))), new(OpCodes.Ldfld, Field(typeof(ReferenceHub), nameof(ReferenceHub.playerEffectsController))), new(OpCodes.Callvirt, Method(typeof(PlayerEffectsController), nameof(PlayerEffectsController.GetEffect), generics: new[] { typeof(SpawnProtected) })), new(OpCodes.Callvirt, PropertyGetter(typeof(StatusEffectBase), nameof(StatusEffectBase.IsEnabled))), diff --git a/EXILED/Exiled.Events/Patches/Generic/Scp173SecondKillPatch.cs b/EXILED/Exiled.Events/Patches/Fixes/Scp173SecondKillPatch.cs similarity index 98% rename from EXILED/Exiled.Events/Patches/Generic/Scp173SecondKillPatch.cs rename to EXILED/Exiled.Events/Patches/Fixes/Scp173SecondKillPatch.cs index 71ba20528..2b6dcb028 100644 --- a/EXILED/Exiled.Events/Patches/Generic/Scp173SecondKillPatch.cs +++ b/EXILED/Exiled.Events/Patches/Fixes/Scp173SecondKillPatch.cs @@ -5,7 +5,7 @@ // // ----------------------------------------------------------------------- -namespace Exiled.Events.Patches.Generic +namespace Exiled.Events.Patches.Fixes { using System.Collections.Generic; using System.Reflection.Emit;