Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of BetterUI v3.0.4
plugins/BetterUI/BetterUI.dll
Decompiled 2 years agousing System; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using BepInEx; using BetterUI.Properties; using BetterUnityPlugin; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using R2API.Utils; using RoR2; using RoR2.UI; using RoR2.UI.MainMenu; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: ManualNetworkRegistration] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("BetterUI")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("3.0.4.0")] [assembly: AssemblyInformationalVersion("3.0.4+Branch.tags-v3.0.4.Sha.f63af8828b32b84e3133b4f12d68bf20a9bfaea4")] [assembly: AssemblyProduct("BetterUI")] [assembly: AssemblyTitle("BetterUI")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("3.0.4.0")] [module: UnverifiableCode] namespace R2API.Utils { [AttributeUsage(AttributeTargets.Assembly)] public class ManualNetworkRegistrationAttribute : Attribute { } } namespace BetterUI { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.xoxfaby.BetterUI", "BetterUI", "3.0.4")] public class BetterUIPlugin : BetterUnityPlugin<BetterUIPlugin> { internal delegate void HUDAwakeEvent(HUD self); public const string GUID = "com.xoxfaby.BetterUI"; public const string Name = "BetterUI"; public const string Version = "3.0.4"; internal static BetterUIPlugin instance; internal static bool BetterAPIModIntegration = false; internal static HUD hud; internal static ObjectivePanelController objectivePanelController; public static StringBuilder sharedStringBuilder = new StringBuilder(); public override BaseUnityPlugin typeReference { get { throw new NotImplementedException(); } } internal static event HUDAwakeEvent onHUDAwake; protected override void Awake() { //IL_0013: 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) base.Awake(); instance = this; GameObject gameObject = ((Component)this).gameObject; ((Object)gameObject).hideFlags = (HideFlags)(((Object)gameObject).hideFlags | 0x3D); ((Component)this).gameObject.AddComponent<Language.UpdateChecker>(); Language.LoadLanguages(); BetterUIWindow.Init(); } } internal static class BetterUIWindow { private class BetterUIDestroyer : MonoBehaviour { internal GameObject monitoredGameObject; private void OnDisable() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)monitoredGameObject == (Object)null || Mathf.Abs(monitoredGameObject.transform.position.x) < 50f || Mathf.Abs(monitoredGameObject.transform.position.y) < 50f) { Object.Destroy((Object)(object)BetterUIPlugin.instance); Debug.LogError((object)"It appears the BetterUI Button has been destroyed or moved off the screen, this is not supported and BetterUI has been disabled."); } } } private static AssetBundle bundle; private static GameObject modPanelPrefab; private static GameObject modButtonPrefab; private static GameObject betterUIWindowPrefab; internal static Transform menuParent; static BetterUIWindow() { bundle = AssetBundle.LoadFromMemory(Resources.betteruiassets); modPanelPrefab = bundle.LoadAsset<GameObject>("Assets/ModPanel.prefab"); modButtonPrefab = bundle.LoadAsset<GameObject>("Assets/ModButton.prefab"); betterUIWindowPrefab = bundle.LoadAsset<GameObject>("Assets/BetterUIWindow.prefab"); } internal static void Init() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Expected O, but got Unknown BetterUnityPlugin<BetterUIPlugin>.Hooks.Add<BaseMainMenuScreen>("Awake", (Action<Action<BaseMainMenuScreen>, BaseMainMenuScreen>)BaseMainMenuScreen_Awake, BindingFlags.Default); Node val = new Node("BetterUI", true, (Node)null); Node buttonNode = new Node("Donate", false, val); buttonNode.shouldShowUnviewed = (UserProfile userProfile) => !userProfile.HasViewedViewable(buttonNode.fullName); ViewablesCatalog.AddNodeToRoot(val); } private static void BaseMainMenuScreen_Awake(Action<BaseMainMenuScreen> orig, BaseMainMenuScreen self) { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) menuParent = ((Component)self).transform; Transform val = ((Component)self).transform.Find("SafeZone/GenericMenuButtonPanel"); Transform val2 = ((Component)self).transform.Find("SafeZone/GenericMenuButtonPanel/JuicePanel/DescriptionPanel, Naked/ContentSizeFitter/DescriptionText"); if ((Object)(object)val != (Object)null || (Object)(object)val2 != (Object)null) { LanguageTextMeshController component = ((Component)val2).GetComponent<LanguageTextMeshController>(); GameObject obj = Object.Instantiate<GameObject>(modPanelPrefab, val); float num = 0.1f; Transform transform = obj.transform; transform.position += new Vector3(Mathf.SmoothStep(0f, 250f, num), 0f, 0f); HGButton[] componentsInChildren = obj.GetComponentsInChildren<HGButton>(); foreach (HGButton val3 in componentsInChildren) { Transform transform2 = ((Component)val3).transform; transform2.localScale *= 1f + num; ((Component)self).gameObject.AddComponent<BetterUIDestroyer>().monitoredGameObject = ((Component)val3).gameObject; val3.hoverLanguageTextMeshController = component; } } orig(self); } } public class BetterUIEventFunctions : MonoBehaviour { private static Dictionary<GameObject, GameObject> spawnedGameObjects = new Dictionary<GameObject, GameObject>(); public void createWindow(GameObject prefab) { if ((Object)(object)BetterUIWindow.menuParent != (Object)null && (!spawnedGameObjects.TryGetValue(prefab, out var value) || (Object)(object)value == (Object)null)) { spawnedGameObjects[prefab] = Object.Instantiate<GameObject>(prefab, BetterUIWindow.menuParent); Transform obj = spawnedGameObjects[prefab].transform.Find("Window/UpperLeftButtonPanel/DonateButton"); Object.Destroy((Object)(object)((obj != null) ? ((Component)obj).gameObject : null)); Transform obj2 = spawnedGameObjects[prefab].transform.Find("Window/UpperLeftButtonPanel/DiscordButton"); Object.Destroy((Object)(object)((obj2 != null) ? ((Component)obj2).gameObject : null)); Transform obj3 = spawnedGameObjects[prefab].transform.Find("Window/SocialPanel/TwitterButton"); Object.Destroy((Object)(object)((obj3 != null) ? ((Component)obj3).gameObject : null)); } } } [ExecuteAlways] internal class PrefabLoader : MonoBehaviour { public string prefabAddress; private string loadedPrefab; private bool loading; private GameObject instance; private void Start() { LoadPrefab(); } private void OnValidate() { LoadPrefab(); } private void LoadPrefab() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (!string.IsNullOrEmpty(prefabAddress) && !loading) { loading = true; AsyncOperationHandle<GameObject> val = Addressables.LoadAssetAsync<GameObject>((object)prefabAddress); val.Completed += PrefabLoaded; } } private void PrefabLoaded(AsyncOperationHandle<GameObject> obj) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 AsyncOperationStatus status = obj.Status; if ((int)status != 1) { if ((int)status == 2) { if ((Object)(object)instance != (Object)null) { Object.DestroyImmediate((Object)(object)instance); } Debug.LogError((object)"Prefab load failed."); loading = false; } } else if (!(loadedPrefab == prefabAddress)) { if ((Object)(object)instance != (Object)null) { Object.DestroyImmediate((Object)(object)instance); } GameObject result = obj.Result; instance = Object.Instantiate<GameObject>(result); SetRecursiveFlags(instance.transform); instance.transform.SetParent(((Component)this).gameObject.transform, false); loadedPrefab = prefabAddress; loading = false; } } private static void SetRecursiveFlags(Transform transform) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown GameObject gameObject = ((Component)transform).gameObject; ((Object)gameObject).hideFlags = (HideFlags)(((Object)gameObject).hideFlags | 0x34); foreach (Transform item in transform) { SetRecursiveFlags(item); } } } [ExecuteAlways] internal class AddressableAssetLoader : MonoBehaviour { public Component component; public string fieldName; public string assetAddress; private static readonly MethodInfo LoadAssetAsyncInfo = typeof(Addressables).GetMethod("LoadAssetAsync", new Type[1] { typeof(string) }); private void LoadAsset(bool dontSave = false) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) Type type = ((object)component).GetType(); FieldInfo field = type.GetField(fieldName, BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); PropertyInfo propertyInfo = null; if (field == null) { propertyInfo = type.GetProperty(fieldName, BindingFlags.IgnoreCase | BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (propertyInfo == null) { return; } } object obj = LoadAssetAsyncInfo.MakeGenericMethod(field?.FieldType ?? propertyInfo.PropertyType).Invoke(null, new object[1] { assetAddress }); object obj2 = obj.GetType().GetMethod("WaitForCompletion", BindingFlags.Instance | BindingFlags.Public).Invoke(obj, null); Object val = (Object)obj2; if (val != (Object)null) { if (dontSave) { val.hideFlags = (HideFlags)(val.hideFlags | 0x34); } field?.SetValue(component, obj2); propertyInfo?.SetValue(component, obj2); } } private IEnumerator WaitAndLoadAsset() { yield return (object)new WaitUntil((Func<bool>)(() => Addressables.InternalIdTransformFunc != null)); LoadAsset(dontSave: true); } private void Start() { LoadAsset(); } private void OnValidate() { if (((Component)this).gameObject.activeInHierarchy) { ((MonoBehaviour)this).StartCoroutine(WaitAndLoadAsset()); } } } [Obsolete("This feature of BetterUI has been removed.")] public static class Buffs { [Obsolete("This feature of BetterUI has been removed.")] public struct BuffInfo { public string nameToken; public string descriptionToken; } [Obsolete("This feature of BetterUI has been removed.")] public static void RegisterName(BuffDef buffDef, string nameToken) { } [Obsolete("This feature of BetterUI has been removed.")] public static void RegisterDescription(BuffDef buffDef, string descriptionToken) { } [Obsolete("This feature of BetterUI has been removed.")] public static void RegisterBuffInfo(BuffDef buffDef, string nameToken = null, string descriptionToken = null) { } [Obsolete("This feature of BetterUI has been removed.")] public static void RegisterBuffInfo(BuffDef buffDef, BuffInfo buffInfo) { } [Obsolete("This feature of BetterUI has been removed.")] public static string GetName(BuffDef buffDef) { return ""; } [Obsolete("This feature of BetterUI has been removed.")] public static string GetDescription(BuffDef buffDef) { return ""; } } [Obsolete("This feature of BetterUI has been removed.")] public static class ItemCounters { [Obsolete("This feature of BetterUI has been removed.")] public static float GetTierScore(ItemTierDef itemTierDef) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static float GetTierScore(ItemTier tier) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static float GetItemScore(ItemDef itemDef) { return 0f; } } public static class ItemStats { [Obsolete("This feature of BetterUI has been removed.")] public class StatFormatter { public delegate void Formatter(StringBuilder stringBuilder, float value, CharacterMaster master); public Formatter statFormatter; public string style; public string color; public string customFormatTag; public string customFormatClosingTag; public string prefix; public string suffix; public string pluralSuffix; public string format = "{0:0.##}"; public bool bold; public bool italic; public bool underline; public bool strikethrough; [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter LuckChance = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Chance = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Gold = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Charges = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Percent = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter HP = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Seconds = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Armor = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Regen = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Range = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public static StatFormatter Damage = new StatFormatter(); [Obsolete("This feature of BetterUI has been removed.")] public void FormatString(StringBuilder stringBuilder, float value, CharacterMaster master) { } } [Obsolete("This feature of BetterUI has been removed.")] public delegate float StackingFormula(float value, float extraStackValue, int stacks); [Obsolete("This feature of BetterUI has been removed.")] public delegate int CapFormula(float value, float extraStackValue, float procCoefficient); [Obsolete("This feature of BetterUI has been removed.")] public class ItemProcInfo { public float value; public float extraStackValue; public StatFormatter statFormatter; public StackingFormula stackingFormula; public CapFormula capFormula; [Obsolete("This feature of BetterUI has been removed.")] public void GetOutputString(StringBuilder stringBuilder, int stacks, CharacterMaster master, float procCoefficient) { } [Obsolete("This feature of BetterUI has been removed.")] public float GetValue(int stacks) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public float GetCap(float procCoefficient) { return 0f; } } [Obsolete("This feature of BetterUI has been removed.")] public class ItemStat { public string nameToken; public StackingFormula stackingFormula; public float value; public float stackValue; public int stackLimit = int.MaxValue; public StatFormatter statFormatter; } [Obsolete("This feature of BetterUI has been removed.")] public class ItemModifier { public delegate float ModificationFormula(float value, float modifier, float stacks, float stackModifier); public delegate float ModificationLocator(CharacterMaster master); public delegate bool ModificationChecker(CharacterMaster master, ItemModifier itemModifier); public delegate float ModificationCounter(CharacterMaster master, ItemModifier itemModifier); public static ModificationFormula ExponentialBonus = (float value, float modifier, float stackModifier, float stacks) => 1f - value - (1f - value) * (1f - modifier) * (float)Math.Pow(1f - stackModifier, stacks - 1f); public static ModificationFormula PositiveExponentialBonus = (float value, float modifier, float stackModifier, float stacks) => value * modifier * (float)Math.Pow(1f - stackModifier, stacks - 1f); public static ModificationFormula PercentBonus = (float value, float modifier, float stackModifier, float stacks) => value * ((modifier + stackModifier * (stacks - 1f)) / 100f); public static ModificationFormula LuckBonus = (float value, float modifier, float stackModifier, float stacks) => Math.Min(1f, Utils.LuckCalc(value, modifier)) - value; public static ModificationFormula AlliesBonus = (float value, float modifier, float stackModifier, float stacks) => value * modifier; public static ModificationFormula FlatBonus = (float value, float modifier, float stackModifier, float stacks) => value + modifier + stackModifier * stacks; public static ModificationLocator LuckLocator = (CharacterMaster master) => master.luck; public static ModificationLocator AlliesLocator = (CharacterMaster master) => Math.Max(TeamComponent.GetTeamMembers(master.GetBody().teamComponent.teamIndex).Count - 1, 0); public static ModificationChecker ItemChecker = (CharacterMaster master, ItemModifier itemModifier) => master.inventory.GetItemCount(itemModifier.itemDef) > 0; public static ModificationChecker TeamItemChecker = (CharacterMaster master, ItemModifier itemModifier) => Util.GetItemCountForTeam(master.GetBody().teamComponent.teamIndex, itemModifier.itemDef.itemIndex, true, true) > master.inventory.GetItemCount(itemModifier.itemDef); public static ModificationChecker LuckChecker = (CharacterMaster master, ItemModifier itemModifier) => master.luck != 0f; public static ModificationChecker AlliesChecker = (CharacterMaster master, ItemModifier itemModifier) => Math.Max(TeamComponent.GetTeamMembers(master.GetBody().teamComponent.teamIndex).Count - 1, 0) > 1; public static ModificationCounter ItemCounter = (CharacterMaster master, ItemModifier itemModifier) => master.inventory.GetItemCount(itemModifier.itemDef); public static ModificationCounter TeamItemCounter = (CharacterMaster master, ItemModifier itemModifier) => Util.GetItemCountForTeam(master.GetBody().teamComponent.teamIndex, itemModifier.itemDef.itemIndex, true, true) - master.inventory.GetItemCount(itemModifier.itemDef); public static ModificationCounter LuckCounter = (CharacterMaster master, ItemModifier itemModifier) => master.luck; public static ModificationCounter AlliesCounter = (CharacterMaster master, ItemModifier itemModifier) => Math.Max(TeamComponent.GetTeamMembers(master.GetBody().teamComponent.teamIndex).Count - 1, 0); public string nameToken; public string pluralNameToken; public ModificationFormula modificationFormula; public ItemDef itemDef; public ModificationLocator modificationLocator; public ModificationChecker modificationChecker; public ModificationCounter modificationCounter; public float modifier; public float stackModifier; [Obsolete("This feature of BetterUI has been removed.")] public bool GetModificationActive(CharacterMaster master) { return modificationChecker(master, this); } [Obsolete("This feature of BetterUI has been removed.")] public float GetModificationCount(CharacterMaster master) { return modificationCounter(master, this); } [Obsolete("This feature of BetterUI has been removed.")] public float GetModifiedValue(float value, CharacterMaster master, float count) { if (modificationLocator != null) { return modificationFormula(value, modificationLocator(master), stackModifier, count); } return modificationFormula(value, modifier, stackModifier, count); } } [Obsolete("This feature of BetterUI has been removed.")] public class ItemTag { public static ItemTag Damage; public static ItemTag Healing; public static ItemTag Luck; public static ItemTag LuckStat; public static ItemTag EquipmentCooldown; public static ItemTag SkillCooldown; public static ItemTag Allies; public static ItemTag MaxHealth; public static ItemTag TitanDamage; public static ItemTag TitanHealth; public static ItemTag MovementSpeed; static ItemTag() { Damage = new ItemTag(); Healing = new ItemTag(); Luck = new ItemTag(); LuckStat = new ItemTag(); EquipmentCooldown = new ItemTag(); Allies = new ItemTag(); MaxHealth = new ItemTag(); TitanDamage = new ItemTag(); TitanHealth = new ItemTag(); SkillCooldown = new ItemTag(); MovementSpeed = new ItemTag(); } } [Obsolete("This feature of BetterUI has been removed.")] public static class Styles { public const string Damage = "cIsDamage"; public const string Healing = "cIsHealing"; public const string Mono = "cMono"; public const string Stack = "cStack"; public const string Health = "cIsHealth"; public const string Void = "cIsVoid"; public const string Death = "cDeath"; public const string UserSetting = "cUserSetting"; public const string Artifact = "cArtifact"; public const string Sub = "cSub"; public const string Event = "cEvent"; public const string WorldEvent = "cWorldEvent"; public const string KeywordName = "cKeywordName"; public const string Shrine = "cShrine"; } [Obsolete("This feature of BetterUI has been removed.")] public static readonly Dictionary<ItemDef, ItemProcInfo> itemProcInfos = new Dictionary<ItemDef, ItemProcInfo>(); [Obsolete("This feature of BetterUI has been removed.")] public static List<ItemStat> GetItemStats(ItemDef itemDef) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static List<ItemTag> GetItemTags(ItemStat itemStat) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static List<ItemModifier> GetItemModifers(ItemTag itemTag) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static ItemStat RegisterStat(ItemDef itemDef, string nameToken, float value, StackingFormula stackingFormula = null, StatFormatter statFormatter = null, ItemTag itemTag = null) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static ItemStat RegisterStat(ItemDef itemDef, string nameToken, float value, float stackValue, StackingFormula stackingFormula = null, StatFormatter statFormatter = null, ItemTag itemTag = null) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static ItemStat RegisterStat(ItemDef itemDef, string nameToken, float value, float stackValue, int stackLimit, StackingFormula stackingFormula = null, StatFormatter statFormatter = null, ItemTag itemTag = null) { return null; } public static ItemStat RegisterStat(ItemDef itemDef, ItemStat itemStat, ItemTag itemTag) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static ItemModifier RegisterModifier(ItemTag itemTag, ItemDef itemDef, ItemModifier.ModificationFormula modificationFormula, float modifier, float? stackModifier = null, string nameToken = null, string pluralNameToken = null, ItemModifier.ModificationLocator modificationLocator = null, ItemModifier.ModificationChecker modificationChecker = null, ItemModifier.ModificationCounter modificationCounter = null) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static ItemModifier RegisterModifier(ItemTag itemTag, string nameToken, ItemModifier.ModificationFormula modificationFormula, ItemModifier.ModificationLocator modificationLocator, ItemModifier.ModificationChecker modificationChecker, ItemModifier.ModificationCounter modificationCounter, string pluralNameToken = null) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static ItemModifier RegisterModifier(ItemTag itemTag, ItemModifier itemModfier) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static ItemTag RegisterTag(ItemStat itemStat, ItemTag itemTag) { return null; } [Obsolete("This feature of BetterUI has been removed.")] public static void GetItemStats(StringBuilder stringBuilder, ItemDef itemDef, int stacks, CharacterMaster master) { } [Obsolete("This feature of BetterUI has been removed.")] public static float LinearStacking(float value, float extraStackValue, int stacks) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static float ExponentialStackingPlusOne(float value, float extraStackValue, int stacks) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static float ExponentialStacking(float value, float extraStackValue, int stacks) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static float NegativeExponentialStacking(float value, float extraStackValue, int stacks) { return 0f; } [Obsolete("Deprecated: Use DivideByStacksPlusOne instead.")] public static float DivideByBonusStacks(float value, float extraStackValue, int stacks) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static float DivideByStacksPlusOne(float value, float extraStackValue, int stacks) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static float DivideByStacks(float value, float extraStackValue, int stacks) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static float FocusedConvergenceStacking(float value, float extraStackValue, int stacks) { return 0f; } public static float HyperbolicStacking(float value, float extraStackValue, int stacks) { return 0f; } public static float NoStacking(float value, float extraStackValue, int stacks) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static int LinearCap(float value, float extraStackValue, float procCoefficient) { return 0; } [Obsolete("This feature of BetterUI has been removed.")] public static void RegisterProc(ItemIndex itemIndex, ItemProcInfo itemProcInfo) { } [Obsolete("This feature of BetterUI has been removed.")] public static void RegisterProc(ItemIndex itemIndex, float value, float? extraStackValue = null, StatFormatter statFormatter = null, StackingFormula stackingFormula = null, CapFormula capFormula = null) { } [Obsolete("This feature of BetterUI has been removed.")] public static void RegisterProc(ItemDef itemDef, ItemProcInfo itemProcInfo) { } [Obsolete("This feature of BetterUI has been removed.")] public static void RegisterProc(ItemDef itemDef, float value, float? extraStackValue = null, StatFormatter statFormatter = null, StackingFormula stackingFormula = null, CapFormula capFormula = null) { } } public static class Language { internal class UpdateChecker : MonoBehaviour { private const string apiUrl = "https://weblate.faby.dev/api/components/ror2/betterui/translations/"; private void Start() { ((MonoBehaviour)this).StartCoroutine(CheckForUpdate()); } private IEnumerator CheckForUpdate() { UnityWebRequest apiRequest = UnityWebRequest.Get("https://weblate.faby.dev/api/components/ror2/betterui/translations/"); yield return apiRequest.SendWebRequest(); if (apiRequest.isNetworkError) { Debug.LogError((object)("Error downloading language info - " + apiRequest.error)); } else { List<(string, string, string)> list = new List<(string, string, string)>(((IEnumerable<JToken>)((JToken)JObject.Parse(apiRequest.downloadHandler.text)).SelectToken("$.results")).Select((JToken s) => ((string)s.SelectToken("$.filename"), (string)s.SelectToken("$.revision"), (string)s.SelectToken("$.file_url")))); foreach (var item in list) { bool flag = false; string languageName = Path.GetFileNameWithoutExtension(item.Item1); string lPath = Path.Combine(languagesPath, Path.GetFileName(item.Item1)); string latestHash = item.Item2.Split(new char[1] { ',' })[0]; try { if (latestHash != BlobHashFromPath(lPath)) { flag = true; } } catch (FileNotFoundException) { flag = true; } if (!flag) { continue; } UnityWebRequest languageFileRequest = UnityWebRequest.Get(item.Item3); yield return languageFileRequest.SendWebRequest(); if (languageFileRequest.isNetworkError) { Debug.LogError((object)apiRequest.error); } else if (BlobHashFromString(languageFileRequest.downloadHandler.text) == latestHash) { if (LoadLanguage(languageName, languageFileRequest.downloadHandler.text)) { File.WriteAllText(lPath, languageFileRequest.downloadHandler.text); } } else { Debug.LogError((object)("Error downloading file for language: " + languageName + " - Blob hash mismatch")); } } } Object.Destroy((Object)(object)this); } } private static Dictionary<string, List<KeyValuePair<string, string>>> LanguageStrings; private static string dllPath; private static string languagesPath; private static List<string> languageFilePaths; static Language() { LanguageStrings = new Dictionary<string, List<KeyValuePair<string, string>>>(StringComparer.OrdinalIgnoreCase); Language.onCurrentLanguageChanged += Language_onCurrentLanguageChanged; dllPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); languagesPath = Path.Combine(dllPath, "Languages"); if (!Directory.Exists(languagesPath)) { languagesPath = dllPath; } languageFilePaths = new List<string>(Directory.GetFiles(languagesPath, "*.lang")); } public static string GetPluralToken(string token, float seconds) { switch (Language.currentLanguageName) { case "UA": case "RU": if (seconds % 1f != 0f) { return token + "_SPECIAL"; } switch ((int)seconds % 10) { case 1: if (seconds != 11f) { return token; } break; case 2: case 3: case 4: if (seconds < 12f || seconds > 14f) { return token + "_SPECIAL"; } break; } return token + "_PLURAL"; case "zh-CN": return token; default: if (seconds != 1f) { return token + "_PLURAL"; } return token; } } private static void Language_onCurrentLanguageChanged() { if (LanguageStrings.TryGetValue(Language.currentLanguageName, out var value)) { Language.currentLanguage.SetStringsByTokens((IEnumerable<KeyValuePair<string, string>>)value); } if (!string.Equals(Language.currentLanguageName, "en", StringComparison.OrdinalIgnoreCase) && LanguageStrings.TryGetValue("en", out var value2)) { Language obj = Language.FindLanguageByName("en"); if (obj != null) { obj.SetStringsByTokens((IEnumerable<KeyValuePair<string, string>>)value2); } } } public static void RegisterLanguageToken(string token, string text, string language = "en") { if (!LanguageStrings.ContainsKey(language)) { LanguageStrings[language] = new List<KeyValuePair<string, string>>(); } LanguageStrings[language].Add(new KeyValuePair<string, string>(token, text)); if (string.Equals(Language.currentLanguageName, language, StringComparison.OrdinalIgnoreCase) || string.Equals(language, "en", StringComparison.OrdinalIgnoreCase)) { Language obj = Language.FindLanguageByName(language); if (obj != null) { obj.SetStringByToken(token, text); } } } public static void LoadLanguages() { foreach (string languageFilePath in languageFilePaths) { LoadLanguage(jsonText: File.ReadAllText(languageFilePath), languageName: Path.GetFileNameWithoutExtension(languageFilePath)); } } public static bool LoadLanguage(string languageName, string jsonText) { //IL_0046: Expected O, but got Unknown try { foreach (KeyValuePair<string, string> item in JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonText)) { RegisterLanguageToken(item.Key, item.Value, languageName); } } catch (JsonException val) { JsonException val2 = val; Debug.LogError((object)("Error deserializing JSON for language: " + languageName + " - " + ((Exception)(object)val2).Message)); return false; } return true; } public static string CalculateBlobHash(Stream fileStream) { string s = $"blob {fileStream.Length}\0"; byte[] bytes = Encoding.ASCII.GetBytes(s); using SHA1 sHA = SHA1.Create(); sHA.TransformBlock(bytes, 0, bytes.Length, bytes, 0); byte[] array = new byte[8192]; int inputCount; while ((inputCount = fileStream.Read(array, 0, array.Length)) > 0) { sHA.TransformBlock(array, 0, inputCount, array, 0); } sHA.TransformFinalBlock(array, 0, 0); return ByteArrayToHexString(sHA.Hash); } public static string BlobHashFromPath(string filePath) { using FileStream fileStream = new FileStream(filePath, FileMode.Open, FileAccess.Read); return CalculateBlobHash(fileStream); } public static string BlobHashFromString(string inputString) { MemoryStream memoryStream = new MemoryStream(); StreamWriter streamWriter = new StreamWriter(memoryStream); streamWriter.Write(inputString); streamWriter.Flush(); memoryStream.Position = 0L; return CalculateBlobHash(memoryStream); } private static string ByteArrayToHexString(byte[] bytes) { StringBuilder stringBuilder = new StringBuilder(bytes.Length * 2); foreach (byte b in bytes) { stringBuilder.Append(b.ToString("x2")); } return stringBuilder.ToString(); } } public static class StatsDisplay { public delegate string DisplayCallback(CharacterBody characterBody); internal static void Hook() { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddStatsDisplay(string token, Func<CharacterBody, string> displayCallback) { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddStatsDisplay(string token, DisplayCallback displayCallback) { } } public static class ProcCoefficientCatalog { [Obsolete("This feature of BetterUI has been removed.")] public struct ProcCoefficientInfo { public string name; public float procCoefficient; } [Obsolete("This feature of BetterUI has been removed.")] public static void AddSkill(string skillDef, List<ProcCoefficientInfo> procCoefficientInfoList) { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddSkill(string skillDef, ProcCoefficientInfo procCoefficientInfo) { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddSkill(string skillDef, string name, float procCoefficient) { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddToSkill(string skillDef, ProcCoefficientInfo procCoefficientInfo) { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddToSkill(string skillDef, string name, float procCoefficient) { } [Obsolete("This feature of BetterUI has been removed.")] public static List<ProcCoefficientInfo> GetProcCoefficientInfo(string skillDef) { return null; } } [Obsolete] public static class ProcItemsCatalog { public delegate string EffectFormatter(float value, float procCoefficient, float luck, bool canCap, int cap); public class FormatterTranslater { private EffectFormatter effectFormatter; internal FormatterTranslater(EffectFormatter effectFormatter) { this.effectFormatter = effectFormatter; } public void Formatter(StringBuilder stringBuilder, float value, CharacterMaster master) { stringBuilder.Append(effectFormatter(value, 1f, 1f, canCap: false, 1)); } } [Obsolete] public delegate float StackingFormula(float value, float extraStackValue, int stacks); [Obsolete] public delegate int CapFormula(float value, float extraStackValue, float procCoefficient); [Obsolete] public class EffectInfo { public float value; public float extraStackValue; public EffectFormatter effectFormatter; public StackingFormula stackingFormula; public CapFormula capFormula; public ItemStats.ItemProcInfo ToItemProcInfo() { return new ItemStats.ItemProcInfo { value = value, extraStackValue = extraStackValue, statFormatter = new ItemStats.StatFormatter { statFormatter = new FormatterTranslater(effectFormatter).Formatter }, stackingFormula = stackingFormula.Invoke, capFormula = capFormula.Invoke }; } } [Obsolete] private static StringBuilder formatterStringBuilder = new StringBuilder(); [Obsolete] public static StackingFormula LinearStacking = ItemStats.LinearStacking; [Obsolete] public static StackingFormula ExponentialStacking = ItemStats.ExponentialStacking; [Obsolete] public static StackingFormula HyperbolicStacking = ItemStats.HyperbolicStacking; [Obsolete] public static StackingFormula NoStacking = ItemStats.NoStacking; [Obsolete] public static CapFormula LinearCap = ItemStats.LinearCap; public static string ChanceFormatter(float value, float procCoefficient, float luck, bool canCap, int cap) { formatterStringBuilder.Clear(); formatterStringBuilder.Append("<style=cIsDamage>"); formatterStringBuilder.Append(Math.Min(100f, 100f * Utils.LuckCalc(value * procCoefficient, luck)).ToString("0.##")); formatterStringBuilder.Append("%</style>"); return formatterStringBuilder.ToString(); } public static string HPFormatter(float value, float procCoefficient, float luck, bool canCap, int cap) { formatterStringBuilder.Clear(); formatterStringBuilder.Append("<style=cIsHealing>"); formatterStringBuilder.Append(value * procCoefficient); formatterStringBuilder.Append(" HP</style>"); return formatterStringBuilder.ToString(); } public static string RangeFormatter(float value, float procCoefficient, float luck, bool canCap, int cap) { formatterStringBuilder.Clear(); formatterStringBuilder.Append("<style=cIsDamage>"); formatterStringBuilder.Append(value * procCoefficient); formatterStringBuilder.Append("m </style>"); return formatterStringBuilder.ToString(); } [Obsolete("Removed, please use BetterUI.ItemStats.RegisterEffect", true)] public static void AddEffect(ItemIndex itemIndex, EffectInfo effectInfo) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_000f: Unknown result type (might be due to invalid IL or missing references) if ((int)itemIndex <= -1) { Debug.LogError((object)"ERROR: AddEffect was passed ItemIndex.None or below, this likely means you tried to register your effect before the item catalog was ready. Please use ItemCatalog.availability.CallWhenAvailable or pass an ItemDef directly."); } else { AddEffect(ItemCatalog.GetItemDef(itemIndex), effectInfo); } } [Obsolete("Removed, please use BetterUI.ItemStats.RegisterEffect", true)] public static void AddEffect(ItemIndex itemIndex, float value, float? extraStackValue = null, EffectFormatter effectFormatter = null, StackingFormula stackingFormula = null, CapFormula capFormula = null) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_000f: Unknown result type (might be due to invalid IL or missing references) if ((int)itemIndex <= -1) { Debug.LogError((object)"ERROR: AddEffect was passed ItemIndex.None or below, this likely means you tried to register your effect before the item catalog was ready. Please use ItemCatalog.availability.CallWhenAvailable or pass an ItemDef directly."); } else { AddEffect(ItemCatalog.GetItemDef(itemIndex), value, extraStackValue, effectFormatter, stackingFormula, capFormula); } } [Obsolete("Removed, please use BetterUI.ItemStats.RegisterEffect", true)] public static void AddEffect(ItemDef itemDef, EffectInfo effectInfo) { ItemStats.RegisterProc(itemDef, effectInfo.ToItemProcInfo()); } [Obsolete("Removed, please use BetterUI.ItemStats.RegisterEffect", true)] public static void AddEffect(ItemDef itemDef, float value, float? extraStackValue = null, EffectFormatter effectFormatter = null, StackingFormula stackingFormula = null, CapFormula capFormula = null) { AddEffect(itemDef, new EffectInfo { value = value, extraStackValue = (extraStackValue ?? value), effectFormatter = (effectFormatter ?? new EffectFormatter(ChanceFormatter)), stackingFormula = (stackingFormula ?? LinearStacking), capFormula = capFormula }); } } internal static class Utils { [Obsolete("This feature of BetterUI has been removed.")] public static float LuckCalc(float chance, float luck) { return 0f; } [Obsolete("This feature of BetterUI has been removed.")] public static int TheREALFindSkillIndexByName(string skillDefName) { return 0; } } } namespace BetterUI.ModCompatibility { internal static class BetterAPICompatibility { internal static class Buffs { [Obsolete("This feature of BetterUI has been removed.")] public static void AddName(BuffDef buffDef, string nameToken) { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddDescription(BuffDef buffDef, string descriptionToken) { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddInfo(BuffDef buffDef, string nameToken = null, string descriptionToken = null) { } [Obsolete("This feature of BetterUI has been removed.")] public static void AddInfo(BuffDef buffDef, BetterUI.Buffs.BuffInfo buffInfo) { } [Obsolete("This feature of BetterUI has been removed.")] public static string GetName(BuffDef buffDef) { return ""; } [Obsolete("This feature of BetterUI has been removed.")] public static string GetDescription(BuffDef buffDef) { return ""; } } } } namespace BetterUI.Properties { [GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [DebuggerNonUserCode] [CompilerGenerated] internal class Resources { private static ResourceManager resourceMan; private static CultureInfo resourceCulture; [EditorBrowsable(EditorBrowsableState.Advanced)] internal static ResourceManager ResourceManager { get { if (resourceMan == null) { resourceMan = new ResourceManager("BetterUI.Properties.Resources", typeof(Resources).Assembly); } return resourceMan; } } [EditorBrowsable(EditorBrowsableState.Advanced)] internal static CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } internal static byte[] betteruiassets => (byte[])ResourceManager.GetObject("betteruiassets", resourceCulture); internal Resources() { } } }
plugins/BetterUI/BetterUnityPlugin.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using MonoMod.Cil; using MonoMod.RuntimeDetour; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: AssemblyCompany("BetterUnityPlugin")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.1.1.0")] [assembly: AssemblyInformationalVersion("1.1.1+Branch.tags-v1.1.1.Sha.89bbfc2f44403bc6ceeff78b8a0a1d2401c458f0")] [assembly: AssemblyProduct("BetterUnityPlugin")] [assembly: AssemblyTitle("BetterUnityPlugin")] [assembly: AssemblyVersion("1.1.1.0")] namespace BetterUnityPlugin; public abstract class BetterUnityPlugin<T> : BaseUnityPlugin { public class HookManager { private List<(MethodInfo methodFrom, MethodInfo methodTo)> hookSignatures = new List<(MethodInfo, MethodInfo)>(); private List<(MethodInfo methodFrom, Manipulator ILHookMethod)> ILHookMethods = new List<(MethodInfo, Manipulator)>(); private List<Hook> hooks = new List<Hook>(); private List<ILHook> ILHooks = new List<ILHook>(); private bool enabled; public HookManager() { BetterUnityPlugin<T>.onEnable += BetterUnityPlugin_onEnable; BetterUnityPlugin<T>.onDisable += BetterUnityPlugin_onDisable; } private void BetterUnityPlugin_onEnable() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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 enabled = true; foreach (var hookSignature in hookSignatures) { hooks.Add(new Hook((MethodBase)hookSignature.methodFrom, hookSignature.methodTo)); } foreach (var iLHookMethod in ILHookMethods) { ILHooks.Add(new ILHook((MethodBase)iLHookMethod.methodFrom, iLHookMethod.ILHookMethod)); } } private void BetterUnityPlugin_onDisable() { enabled = false; foreach (Hook hook in hooks) { hook.Dispose(); } foreach (ILHook iLHook in ILHooks) { iLHook.Dispose(); } } public static MethodInfo FindMethod(Type type, string methodName, Type[] types, BindingFlags bindings = BindingFlags.Default) { if (bindings != 0) { return type.GetMethod(methodName, bindings, null, types, null) ?? type.GetMethod(methodName, bindings); } return type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public, null, types, null) ?? type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic, null, types, null) ?? type.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public, null, types, null) ?? type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic, null, types, null) ?? type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.Public) ?? type.GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic) ?? type.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public) ?? type.GetMethod(methodName, BindingFlags.Static | BindingFlags.NonPublic); } public static Type[] getParameterTypes(MethodInfo methodInfo) { List<Type> list = new List<Type>(); ParameterInfo[] parameters = methodInfo.GetParameters(); for (int i = 1; i < parameters.Length; i++) { list.Add(parameters[i].ParameterType); } return list.ToArray(); } public void Add(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[0], ILHookMethod, bindings); } public void Add(Type type, string methodName, Delegate hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[0], hookMethod.Method, bindings); } public void Add(Type type, string methodName, Action<Action> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[0], hookMethod.Method, bindings); } public void Add<T1>(string methodName, Delegate hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, getParameterTypes(hookMethod.Method), hookMethod.Method, bindings); } public void Add<T1>(Type type, string methodName, Action<Action<T1>, T1> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[1] { typeof(T1) }, hookMethod.Method, bindings); } public void Add<T1>(Type type, string methodName, Func<Func<T1>, T1> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[0], hookMethod.Method, bindings); } public void Add<T1>(string methodName, Action<Action> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[0], hookMethod.Method, bindings); } public void Add<T1>(string methodName, Action<Action<T1>, T1> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[0], hookMethod.Method, bindings); } public void Add<T1>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[0], ILHookMethod, bindings); } public void Add<T1>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[1] { typeof(T1) }, ILHookMethod, bindings); } public void Add<T1, T2>(Type type, string methodName, Action<Action<T1, T2>, T1, T2> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[2] { typeof(T1), typeof(T2) }, hookMethod.Method, bindings); } public void Add<T1, T2>(Type type, string methodName, Func<Func<T1, T2>, T1, T2> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[1] { typeof(T1) }, hookMethod.Method, bindings); } public void Add<T1, T2>(string methodName, Action<Action<T2>, T2> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, hookMethod.Method, bindings); } public void Add<T1, T2>(string methodName, Func<Func<T2>, T2> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[0], hookMethod.Method, bindings); } public void Add<T1, T2>(string methodName, Action<Action<T1, T2>, T1, T2> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, hookMethod.Method, bindings); } public void Add<T1, T2>(string methodName, Func<Func<T1, T2>, T1, T2> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[0], hookMethod.Method, bindings); } public void Add<T1, T2>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, ILHookMethod, bindings); } public void Add<T1, T2>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[1] { typeof(T2) }, ILHookMethod, bindings); } public void Add<T1, T2, T3>(Type type, string methodName, Action<Action<T1, T2, T3>, T1, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[3] { typeof(T1), typeof(T2), typeof(T3) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3>(Type type, string methodName, Func<Func<T1, T2, T3>, T1, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[2] { typeof(T1), typeof(T2) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3>(string methodName, Action<Action<T2, T3>, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[2] { typeof(T2), typeof(T3) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3>(string methodName, Func<Func<T2, T3>, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3>(string methodName, Action<Action<T1, T2, T3>, T1, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[2] { typeof(T2), typeof(T3) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3>(string methodName, Func<Func<T1, T2, T3>, T1, T2, T3> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[1] { typeof(T2) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[2] { typeof(T2), typeof(T3) }, ILHookMethod, bindings); } public void Add<T1, T2, T3>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[2] { typeof(T2), typeof(T3) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4>(Type type, string methodName, Action<Action<T1, T2, T3, T4>, T1, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[4] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4>(Type type, string methodName, Func<Func<T1, T2, T3, T4>, T1, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[3] { typeof(T1), typeof(T2), typeof(T3) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4>(string methodName, Action<Action<T2, T3, T4>, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[3] { typeof(T2), typeof(T3), typeof(T4) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4>(string methodName, Func<Func<T2, T3, T4>, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[2] { typeof(T2), typeof(T3) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4>(string methodName, Action<Action<T1, T2, T3, T4>, T1, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[3] { typeof(T2), typeof(T3), typeof(T4) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4>(string methodName, Func<Func<T1, T2, T3, T4>, T1, T2, T3, T4> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[2] { typeof(T2), typeof(T3) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[3] { typeof(T2), typeof(T3), typeof(T4) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[3] { typeof(T2), typeof(T3), typeof(T4) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[5] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[4] { typeof(T1), typeof(T2), typeof(T3), typeof(T4) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5>(string methodName, Action<Action<T2, T3, T4, T5>, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[4] { typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5>(string methodName, Func<Func<T2, T3, T4, T5>, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[3] { typeof(T2), typeof(T3), typeof(T4) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5>(string methodName, Action<Action<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[4] { typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5>(string methodName, Func<Func<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[3] { typeof(T2), typeof(T3), typeof(T4) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[4] { typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[4] { typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[6] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[5] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Action<Action<T2, T3, T4, T5, T6>, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[5] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Func<Func<T2, T3, T4, T5, T6>, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[4] { typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[5] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[4] { typeof(T2), typeof(T3), typeof(T4), typeof(T5) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[5] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[5] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[7] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[6] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7>, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[6] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7>, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[5] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[6] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[5] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[6] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[6] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[8] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[7] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8>, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[7] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8>, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[6] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[7] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[6] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[7] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[7] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[9] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[8] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9>, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[8] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9>, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[7] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[8] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[7] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[8] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[8] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[10] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[9] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10>, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[9] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10>, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[8] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[9] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[8] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[9] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[9] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[11] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[10] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[10] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[9] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[10] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[9] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[10] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[10] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[12] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[11] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[11] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[10] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[11] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[10] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[11] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[11] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[13] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[12] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[12] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[11] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[12] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[11] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[12] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[12] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[14] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[13] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[13] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[12] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[13] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[12] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[13] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[13] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Type type, string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[15] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14), typeof(T15) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Type type, string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[14] { typeof(T1), typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Action<Action<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[14] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14), typeof(T15) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Func<Func<T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[13] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Action<Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[14] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14), typeof(T15) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Func<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> hookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[13] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14) }, hookMethod.Method, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(typeof(T1), methodName, new Type[14] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14), typeof(T15) }, ILHookMethod, bindings); } public void Add<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(Type type, string methodName, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { Add(type, methodName, new Type[14] { typeof(T2), typeof(T3), typeof(T4), typeof(T5), typeof(T6), typeof(T7), typeof(T8), typeof(T9), typeof(T10), typeof(T11), typeof(T12), typeof(T13), typeof(T14), typeof(T15) }, ILHookMethod, bindings); } public void Add(Type type, string methodName, Type[] types, Manipulator ILHookMethod, BindingFlags bindings = BindingFlags.Default) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown MethodInfo methodInfo = FindMethod(type, methodName, types, bindings); if (methodInfo == null) { Debug.LogError((object)$"Could not hook method {methodName} of {type}, method not found."); return; } ILHookMethods.Add((methodInfo, ILHookMethod)); if (enabled) { ILHooks.Add(new ILHook((MethodBase)methodInfo, ILHookMethod)); } } public void Add(Type type, string methodName, Type[] types, MethodInfo hookMethod, BindingFlags bindings = BindingFlags.Default) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown MethodInfo methodInfo = FindMethod(type, methodName, types, bindings); if (methodInfo == null) { Debug.LogError((object)$"Could not hook method {methodName} of {type}, method not found."); return; } hookSignatures.Add((methodInfo, hookMethod)); if (enabled) { hooks.Add(new Hook((MethodBase)methodInfo, hookMethod)); } } } public static HookManager Hooks = new HookManager(); public abstract BaseUnityPlugin typeReference { get; } public static event Action onAwake; public static event Action onStart; public static event Action onEnable; public static event Action onDisable; public static event Action onUpdate; public static event Action onReset; public static event Action onFixedUpdate; public static event Action onLateUpdate; public static event Action onDestroy; protected virtual void Awake() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)this).gameObject; ((Object)gameObject).hideFlags = (HideFlags)(((Object)gameObject).hideFlags | 0x3D); if (BetterUnityPlugin<T>.onAwake != null) { BetterUnityPlugin<T>.onAwake(); } } protected virtual void Start() { if (BetterUnityPlugin<T>.onStart != null) { BetterUnityPlugin<T>.onStart(); } } protected virtual void OnEnable() { if (BetterUnityPlugin<T>.onEnable != null) { BetterUnityPlugin<T>.onEnable(); } } protected virtual void OnDisable() { if (BetterUnityPlugin<T>.onDisable != null) { BetterUnityPlugin<T>.onDisable(); } } protected virtual void Update() { if (BetterUnityPlugin<T>.onUpdate != null) { BetterUnityPlugin<T>.onUpdate(); } } protected virtual void FixedUpdate() { if (BetterUnityPlugin<T>.onFixedUpdate != null) { BetterUnityPlugin<T>.onFixedUpdate(); } } protected virtual void LateUpdate() { if (BetterUnityPlugin<T>.onLateUpdate != null) { BetterUnityPlugin<T>.onLateUpdate(); } } protected virtual void OnDestroy() { if (BetterUnityPlugin<T>.onDestroy != null) { BetterUnityPlugin<T>.onDestroy(); } } protected virtual void Reset() { if (BetterUnityPlugin<T>.onReset != null) { BetterUnityPlugin<T>.onReset(); } } }