Notice: Wrestling Empire is now using Steam Workshop for official mod support. This page is going to remain accessible, but it's likely the content is not going to be kept up to date.
Decompiled source of HealthCheats v1.3.0
plugins/HealthCheats.dll
Decompiled a year agousing System; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("HealthCheats")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("HealthCheats")] [assembly: AssemblyTitle("HealthCheats")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace HealthCheats { [BepInPlugin("GeeEm.WrestlingEmpire.HealthCheats", "HealthCheats", "1.3.0")] [HarmonyPatch] public class Plugin : BaseUnityPlugin { public enum CommandList { HealthMax, HealthMin, StunMax, StunMin, BlindMax, BlindMin, AdrenalineMax, AdrenalineMin, AdrenalineTimerMax, AdrenalineTimerMin, InjureMax, InjureMin, KOMax, KOMin, Explode } public const string PluginGuid = "GeeEm.WrestlingEmpire.HealthCheats"; public const string PluginName = "HealthCheats"; public const string PluginVer = "1.3.0"; internal static ManualLogSource Log; internal static readonly Harmony Harmony = new Harmony("GeeEm.WrestlingEmpire.HealthCheats"); internal static string PluginPath; public static ConfigEntry<string> ConfigTarget; public static ConfigEntry<string> ConfigHMax; public static ConfigEntry<string> ConfigHMin; public static ConfigEntry<string> ConfigSMax; public static ConfigEntry<string> ConfigSMin; public static ConfigEntry<string> ConfigBMax; public static ConfigEntry<string> ConfigBMin; public static ConfigEntry<string> ConfigAMax; public static ConfigEntry<string> ConfigAMin; public static ConfigEntry<string> ConfigAtMax; public static ConfigEntry<string> ConfigAtMin; public static ConfigEntry<string> ConfigInMax; public static ConfigEntry<string> ConfigInMin; public static ConfigEntry<string> ConfigKOMax; public static ConfigEntry<string> ConfigKOMin; public static ConfigEntry<string> ConfigBlowUp; public AcceptableValueList<string> KeyboardButtons = new AcceptableValueList<string>(new string[122] { "None", "Backspace", "Delete", "Tab", "Clear", "Return", "Pause", "Escape", "Space", "Quote", "Comma", "Minus", "Period", "Slash", "Alpha0", "Alpha1", "Alpha2", "Alpha3", "Alpha4", "Alpha5", "Alpha6", "Alpha7", "Alpha8", "Alpha9", "Semicolon", "Equals", "LeftBracket", "Backslash", "RightBracket", "BackQuote", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "Delete", "Keypad0", "Keypad1", "Keypad2", "Keypad3", "Keypad4", "Keypad5", "Keypad6", "Keypad7", "Keypad8", "Keypad9", "KeypadPeriod", "KeypadDivide", "KeypadMultiply", "KeypadMinus", "KeypadPlus", "KeypadEnter", "KeypadEquals", "UpArrow", "DownArrow", "RightArrow", "LeftArrow", "Insert", "Home", "End", "PageUp", "PageDown", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "F13", "F14", "F15", "Numlock", "CapsLock", "ScrollLock", "RightShift", "LeftShift", "RightControl", "LeftControl", "RightAlt", "LeftAlt", "RightCommand", "RightApple", "LeftCommand", "LeftApple", "LeftWindows", "RightWindows", "Print", "Menu", "Mouse0", "Mouse1", "Mouse2", "Mouse3", "Mouse4", "Mouse5", "Mouse6" }); public int PlayerNum; private void Awake() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Expected O, but got Unknown //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Expected O, but got Unknown //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Expected O, but got Unknown //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0258: Expected O, but got Unknown //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Expected O, but got Unknown //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Expected O, but got Unknown //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Expected O, but got Unknown //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; PluginPath = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); ConfigTarget = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "ApplyToTarget", "LeftAlt", new ConfigDescription("Applies the effect to target instead", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigHMax = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Max Health", "Q", new ConfigDescription("Sets health to max", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigHMin = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "0 Health", "W", new ConfigDescription("Sets health to 0", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigSMax = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Max Stun", "E", new ConfigDescription("Sets stun to max", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigSMin = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "0 Stun", "R", new ConfigDescription("Sets stun to 0", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigBMax = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Max Blindness", "T", new ConfigDescription("Sets \"blindness\" to max", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigBMin = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "0 Blindness", "Y", new ConfigDescription("Sets \"blindness\" to 0", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigAMax = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Max Adrenaline", "D", new ConfigDescription("Sets adrenaline to max", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigAMin = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "0 Adrenaline", "F", new ConfigDescription("Sets adrenaline to 0", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigAtMax = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Max Adrenaline Timer", "G", new ConfigDescription("Sets adrenaline timer to max", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigAtMin = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Adrenaline Timer End", "H", new ConfigDescription("Ends the adrenaline timer", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigInMax = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Injure the character", "J", new ConfigDescription("Injures the character", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigInMin = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Heal the injury", "K", new ConfigDescription("Removes the character injury", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigKOMax = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Knock out a target", "C", new ConfigDescription("Instantly knock out (and DQ) a target", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigKOMin = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Recover target from knockout", "V", new ConfigDescription("Recover target from knockout", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); ConfigBlowUp = ((BaseUnityPlugin)this).Config.Bind<string>("Controls", "Explode the target", "B", new ConfigDescription("Spawn an explosion on target", (AcceptableValueBase)(object)KeyboardButtons, Array.Empty<object>())); } private void OnEnable() { Harmony.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded HealthCheats!"); } private void OnDisable() { Harmony.UnpatchSelf(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Unloaded HealthCheats!"); } public int GetMainPlayerNum() { for (int i = 0; i <= HKJOAJOKOIJ.NGCNKGDDKGF; i++) { if (HKJOAJOKOIJ.NAADDLFFIHG[i].AHBNKMMMGFI > 0 && HKJOAJOKOIJ.NAADDLFFIHG[i].BPJFLJPKKJK >= 0 && HKJOAJOKOIJ.NAADDLFFIHG[i].FOAPDJMIFGP > 0 && HKJOAJOKOIJ.NAADDLFFIHG[i].FOAPDJMIFGP <= NJBJIIIACEP.NBBBLJDBLNM) { return HKJOAJOKOIJ.NAADDLFFIHG[i].FOAPDJMIFGP; } } return 0; } private void Update() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) try { if (Input.GetKey(Ulil.GetKeyCode(ConfigTarget.Value))) { SendCommand(targetInsteadOfSelf: true); } else { SendCommand(targetInsteadOfSelf: false); } } catch (Exception) { } } public void SendCommand(bool targetInsteadOfSelf) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKey(Ulil.GetKeyCode(ConfigHMax.Value))) { SendFurther(targetInsteadOfSelf, CommandList.HealthMax); } if (Input.GetKey(Ulil.GetKeyCode(ConfigHMin.Value))) { SendFurther(targetInsteadOfSelf, CommandList.HealthMin); } if (Input.GetKey(Ulil.GetKeyCode(ConfigSMax.Value))) { SendFurther(targetInsteadOfSelf, CommandList.StunMax); } if (Input.GetKey(Ulil.GetKeyCode(ConfigSMin.Value))) { SendFurther(targetInsteadOfSelf, CommandList.StunMin); } if (Input.GetKey(Ulil.GetKeyCode(ConfigBMax.Value))) { SendFurther(targetInsteadOfSelf, CommandList.BlindMax); } if (Input.GetKey(Ulil.GetKeyCode(ConfigBMin.Value))) { SendFurther(targetInsteadOfSelf, CommandList.BlindMin); } if (Input.GetKey(Ulil.GetKeyCode(ConfigAMax.Value))) { SendFurther(targetInsteadOfSelf, CommandList.AdrenalineMax); } if (Input.GetKey(Ulil.GetKeyCode(ConfigAMin.Value))) { SendFurther(targetInsteadOfSelf, CommandList.AdrenalineMin); } if (Input.GetKey(Ulil.GetKeyCode(ConfigAtMax.Value))) { SendFurther(targetInsteadOfSelf, CommandList.AdrenalineTimerMax); } if (Input.GetKey(Ulil.GetKeyCode(ConfigAtMin.Value))) { SendFurther(targetInsteadOfSelf, CommandList.AdrenalineTimerMin); } if (Input.GetKeyDown(Ulil.GetKeyCode(ConfigInMax.Value))) { SendFurther(targetInsteadOfSelf, CommandList.InjureMax); } if (Input.GetKeyDown(Ulil.GetKeyCode(ConfigInMin.Value))) { SendFurther(targetInsteadOfSelf, CommandList.InjureMin); } if (Input.GetKeyDown(Ulil.GetKeyCode(ConfigKOMax.Value))) { SendFurther(targetInsteadOfSelf, CommandList.KOMax); } if (Input.GetKeyDown(Ulil.GetKeyCode(ConfigKOMin.Value))) { SendFurther(targetInsteadOfSelf, CommandList.KOMin); } if (Input.GetKeyDown(Ulil.GetKeyCode(ConfigBlowUp.Value))) { SendFurther(targetInsteadOfSelf, CommandList.Explode); } } public void SendFurther(bool targetInsteadOfSelf, CommandList command) { PlayerNum = GetMainPlayerNum(); if (PlayerNum == 0) { return; } DFOGOCNBECG instance; if (targetInsteadOfSelf) { if (NJBJIIIACEP.OAAMGFLINOB[PlayerNum].NNMDEFLLNBF == 0) { return; } instance = NJBJIIIACEP.OAAMGFLINOB[NJBJIIIACEP.OAAMGFLINOB[PlayerNum].NNMDEFLLNBF]; } else { instance = NJBJIIIACEP.OAAMGFLINOB[PlayerNum]; } switch (command) { case CommandList.HealthMax: Health(instance, max: true); break; case CommandList.HealthMin: Health(instance, max: false); break; case CommandList.StunMax: Stun(instance, max: true); break; case CommandList.StunMin: Stun(instance, max: false); break; case CommandList.BlindMax: Blind(instance, max: true); break; case CommandList.BlindMin: Blind(instance, max: false); break; case CommandList.AdrenalineMax: Adrenaline(instance, max: true); break; case CommandList.AdrenalineMin: Adrenaline(instance, max: false); break; case CommandList.AdrenalineTimerMax: AdrenalineTimer(instance, max: true); break; case CommandList.AdrenalineTimerMin: AdrenalineTimer(instance, max: false); break; case CommandList.InjureMax: Injure(instance); break; case CommandList.InjureMin: Heal(instance); break; case CommandList.KOMax: KnockOut(instance); break; case CommandList.KOMin: Recover(instance); break; case CommandList.Explode: BlowUp(instance); break; } } public static void Health(DFOGOCNBECG instance, bool max) { if (max) { instance.HLGALFAGDGC = 2.1474836E+09f; instance.OIHGGHEDIFF = 2.1474836E+09f; } else { instance.HLGALFAGDGC = 0f; instance.OIHGGHEDIFF = 0f; } } public static void Stun(DFOGOCNBECG instance, bool max) { if (max) { instance.OKPAGLBJIOH = 2.1474836E+09f; } else { instance.OKPAGLBJIOH = 0f; } } public static void Blind(DFOGOCNBECG instance, bool max) { if (max) { instance.FLOPBFFLLDE = 2.1474836E+09f; } else { instance.FLOPBFFLLDE = 0f; } } public static void Adrenaline(DFOGOCNBECG instance, bool max) { if (max) { instance.BBBGPIILOBB = 2.1474836E+09f; } else { instance.BBBGPIILOBB = 0f; } } public static void AdrenalineTimer(DFOGOCNBECG instance, bool max) { if (max) { instance.LLGHFGNMCGF = 2.1474836E+09f; } else { instance.LLGHFGNMCGF = 1f; } } public static void Injure(DFOGOCNBECG instance) { instance.PGJEOKAEPCL = Random.Range(1, 31); if (FFCEGMEAIBP.LOBDMDPMFLK == 0 && instance.EMDMDLNJFKP.injuryTime < 2) { instance.EMDMDLNJFKP.injuryTime = 2; } CHLPMKEGJBJ.BPLLANFDDDP(instance.GPGOFIFBCLP, CHLPMKEGJBJ.KEMDEGPNJAD[NAEEIFNFBBO.PMEEFNOLAGF(1, 2, 0)], -0.1f, 1f); instance.KMGCIKMAJCJ(NAEEIFNFBBO.PMEEFNOLAGF(2, 3, 0), 1f); if (FFCEGMEAIBP.FEAOFHKANPP == 16) { CHLPMKEGJBJ.KIKKPCJGDLM(0, NAEEIFNFBBO.CFPJBJFFJFH(3, 20), 1f); FFCEGMEAIBP.MBJFIEPNHPP *= 0.8f; } else { CHLPMKEGJBJ.KIKKPCJGDLM(0, -1, 1f); CHLPMKEGJBJ.KIKKPCJGDLM(0, NAEEIFNFBBO.PMEEFNOLAGF(16, 20, 0), 0f); FFCEGMEAIBP.MBJFIEPNHPP += instance.HNFHLLJOFKI[1] * (instance.HNFHLLJOFKI[1] / 10f) * instance.DFKNBACDFGM(0); if (FFCEGMEAIBP.NHMKFGOLHJA == 16) { FFCEGMEAIBP.MBJFIEPNHPP += instance.HNFHLLJOFKI[1] * (instance.HNFHLLJOFKI[1] / 10f) * instance.DFKNBACDFGM(0); } } FFCEGMEAIBP.IJOIMLGJION += 250f * instance.DFKNBACDFGM(0); instance.HLGALFAGDGC /= 2f; instance.BBBGPIILOBB /= 2f; if (FFCEGMEAIBP.LOBDMDPMFLK != 0) { for (int i = 1; i <= NJBJIIIACEP.NBBBLJDBLNM; i++) { if (NJBJIIIACEP.OAAMGFLINOB[i].FIEMGOLBHIO == 3 || NJBJIIIACEP.OAAMGFLINOB[i].FIEMGOLBHIO == 0) { NJBJIIIACEP.OAAMGFLINOB[i].PFHOHKJMLLN = 48; } } } Characters.LPGPAKHJMMA(NJBJIIIACEP.OAAMGFLINOB[instance.JNNBBJKLEFK].GOOKPABIPBC, instance.GOOKPABIPBC); NJBJIIIACEP.PKGACKAGENN(instance.JNNBBJKLEFK, instance.PLFGKLGCOMD, 1); } public static void Heal(DFOGOCNBECG instance) { instance.PGJEOKAEPCL = 0; instance.EMDMDLNJFKP.injuryTime = 0; instance.EMDMDLNJFKP.injury = 0; } public static void KnockOut(DFOGOCNBECG instance) { instance.DMEDPMIPBAO = 1; if (FFCEGMEAIBP.LOBDMDPMFLK > 0 && instance.FIEMGOLBHIO == 1 && instance.MGPDGDCIBGC == 0f) { FFCEGMEAIBP.NCAAOLGAGCG(instance.JNNBBJKLEFK, instance.PLFGKLGCOMD); } instance.MGPDGDCIBGC = 1f; FFCEGMEAIBP.JPBHIEOKODO = FFCEGMEAIBP.BCENJCEONEB(1); if (FFCEGMEAIBP.JPBHIEOKODO == 0) { FFCEGMEAIBP.CADLONHABMC = 0; if (FFCEGMEAIBP.GDKCEGBINCM >= 1 && FFCEGMEAIBP.GDKCEGBINCM <= 2) { FFCEGMEAIBP.GDKCEGBINCM = 0; } } } public static void Recover(DFOGOCNBECG instance) { instance.DMEDPMIPBAO = 0; } public static void BlowUp(DFOGOCNBECG instance) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) ALIGLHEIAGO.MDFJMAEDJMG(3, 2, new Color(10f, 10f, 10f), 5f, (GameObject)null, instance.NJDGEELLAKG, (float)((double)instance.FNNBCDPJBIO + 2.5), instance.BMFDFFLPBOJ, 0f, 0f, 0f, 1); } } public static class Ulil { public static KeyCode GetKeyCode(string name) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) return (KeyCode)Enum.Parse(typeof(KeyCode), name, ignoreCase: true); } } }