diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs index c042b65f9e..defc59b9b6 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/InteractingEvents.cs @@ -14,9 +14,7 @@ namespace Exiled.Events.Patches.Events.Scp914 using Exiled.API.Features.Pools; using Exiled.Events.Attributes; using Exiled.Events.EventArgs.Scp914; - using global::Scp914; - using HarmonyLib; using static HarmonyLib.AccessTools; @@ -39,8 +37,8 @@ private static IEnumerable Transpiler(IEnumerable i.opcode == OpCodes.Stloc_1) + offset; + int offset = -3; + int index = newInstructions.FindLastIndex(i => i.OperandIs(GetDeclaredConstructors(typeof(LabApi.Events.Arguments.Scp914Events.Scp914KnobChangingEventArgs))[0])) + offset; newInstructions.InsertRange(index, new[] { @@ -75,7 +73,7 @@ private static IEnumerable Transpiler(IEnumerable i.opcode == OpCodes.Newobj) + offset; + index = newInstructions.FindLastIndex(i => i.OperandIs(GetDeclaredConstructors(typeof(LabApi.Events.Arguments.Scp914Events.Scp914ActivatingEventArgs))[0])) + offset; newInstructions.InsertRange(index, new[] {