diff --git a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs index e6a53933a0..075c365fa1 100644 --- a/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs +++ b/EXILED/Exiled.Events/Patches/Events/Scp914/UpgradingPlayer.cs @@ -114,17 +114,19 @@ private static IEnumerable Transpiler(IEnumerable x.opcode == OpCodes.Stloc_S && x.operand is LocalBuilder { LocalIndex: 10 }) + offset; - ConstructorInfo plugin_api_constructor = typeof(LabApi.Events.Arguments.Scp914Events.Scp914ProcessingInventoryItemEventArgs) - .GetConstructor(new[] { - typeof(InventorySystem.Items.ItemBase), - typeof(Scp914KnobSetting), - typeof(ReferenceHub) - }); - index = newInstructions.FindIndex(x => x.Is(OpCodes.Newobj, plugin_api_constructor)) + offset; - //ridtp lcz914 - //noclip - //give tuxwonder7 47 + + // index = newInstructions.FindIndex(x => x.opcode == OpCodes.Stloc_S && x.operand is LocalBuilder { LocalIndex: 10 }) + offset; + ConstructorInfo pluginApiConstructor = typeof(LabApi.Events.Arguments.Scp914Events.Scp914ProcessingInventoryItemEventArgs) + .GetConstructor( + new[] + { + typeof(InventorySystem.Items.ItemBase), + typeof(Scp914KnobSetting), + typeof(ReferenceHub), + }); + + index = newInstructions.FindIndex(x => x.Is(OpCodes.Newobj, pluginApiConstructor)) + offset; + newInstructions.InsertRange( index, new CodeInstruction[] @@ -132,34 +134,34 @@ private static IEnumerable Transpiler(IEnumerable