From 5eae4a90a1a32c331b902ff74500fe56668dab5a Mon Sep 17 00:00:00 2001 From: x3rt Date: Thu, 1 Aug 2024 16:14:35 -0600 Subject: [PATCH] Comment transpilers --- EXILED/Exiled.Events/Patches/Events/Player/Verified.cs | 2 +- EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs b/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs index 6e3d072d0..ce6697b5d 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/Verified.cs @@ -68,11 +68,11 @@ private static IEnumerable Transpiler(IEnumerable x.opcode == OpCodes.Callvirt && x.OperandIs(Method(typeof(CharacterClassManager), nameof(CharacterClassManager.SyncServerCmdBinding)))) + offset; - // Verified.PlayerVerified(this._hub); newInstructions.InsertRange( index, new[] { + // Verified.PlayerVerified(this._hub); new CodeInstruction(OpCodes.Ldarg_0), new CodeInstruction(OpCodes.Ldfld, Field(typeof(NicknameSync), nameof(NicknameSync._hub))), new CodeInstruction(OpCodes.Call, Method(typeof(Verified), nameof(Verified.PlayerVerified))), diff --git a/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs b/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs index 17ecca37f..46c412dc3 100644 --- a/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs +++ b/EXILED/Exiled.Events/Patches/Generic/OfflineModeIds.cs @@ -69,17 +69,22 @@ private static IEnumerable Transpiler(IEnumerable), nameof(Dictionary.ContainsKey))), new(OpCodes.Brtrue_S, skipLabel), + + // Player.PlayersUserIds.Add(this.UserId, this._hub); new(OpCodes.Ldsfld, Field(typeof(PluginAPI.Core.Player), nameof(PluginAPI.Core.Player.PlayersUserIds))), new(OpCodes.Ldarg_0), new(OpCodes.Call, PropertyGetter(typeof(PlayerAuthenticationManager), nameof(PlayerAuthenticationManager.UserId))), new(OpCodes.Ldarg_0), new(OpCodes.Ldfld, Field(typeof(PlayerAuthenticationManager), nameof(PlayerAuthenticationManager._hub))), new(OpCodes.Callvirt, Method(typeof(Dictionary), nameof(Dictionary.Add))), + + // skip: new CodeInstruction(OpCodes.Nop).WithLabels(skipLabel), }); @@ -139,6 +144,7 @@ private static IEnumerable Transpiler(IEnumerable