Decompiled source of Brynza API v1.3.0

patchers/BrynzaPatcher.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BrynzaPatcher")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+745b4a33971a5fd5852844fa0df676e18c6130bb")]
[assembly: AssemblyProduct("BrynzaPatcher")]
[assembly: AssemblyTitle("BrynzaPatcher")]
[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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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 BrynzaAPI
{
	internal static class Ror2Patcher
	{
		public static IEnumerable<string> TargetDLLs
		{
			get
			{
				yield return "RoR2.dll";
			}
		}

		public static void Patch(AssemblyDefinition assembly)
		{
			PatchGenericSkill(assembly);
			PatchCharacterMotor(assembly);
			PatchProjectileExplosion(assembly);
			PatchBulletAttack(assembly);
			PatchCharacterBody(assembly);
			PatchRow(assembly);
			PatchLoadoutPanelController(assembly);
		}

		private static void PatchCharacterBody(AssemblyDefinition assembly)
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "CharacterBody");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_baseWallJumpCount", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(int))));
				type.Fields.Add(new FieldDefinition("bapi_maxWallJumpCount", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(int))));
			}
		}

		private static void PatchEntityStateMachine(AssemblyDefinition assembly)
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "EntityStateMachine");
			if (type != null)
			{
				type.Methods.Add(new MethodDefinition("bapi_SetStateToMain", (MethodAttributes)6, assembly.MainModule.ImportReference(typeof(void))));
			}
		}

		private static void PatchSkillDef(AssemblyDefinition assembly)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2.Skills", "SkillDef");
			if (type != null)
			{
				type.Methods.Add(new MethodDefinition("bapi_CanApplyAmmoPack", (MethodAttributes)64, assembly.MainModule.ImportReference(typeof(bool))));
			}
		}

		private static void PatchBulletAttack(AssemblyDefinition assembly)
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "BulletAttack");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_ignoredHealthComponentList", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(List<object>))));
				type.Fields.Add(new FieldDefinition("bapi_ignoreHitTargets", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
			}
		}

		private static void PatchProjectileExplosion(AssemblyDefinition assembly)
		{
		}

		private static void PatchGenericSkill(AssemblyDefinition assembly)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "GenericSkill");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_extraSkills", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(List<object>))));
				type.Fields.Add(new FieldDefinition("bapi_linkedSkill", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(object))));
				type.Fields.Add(new FieldDefinition("bapi_section", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(string))));
			}
		}

		private static void PatchRow(AssemblyDefinition assembly)
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2.UI.LoadoutPanelController/Row");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_section", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(string))));
			}
		}

		private static void PatchLoadoutPanelController(AssemblyDefinition assembly)
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2.UI", "LoadoutPanelController");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_sections", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(List<string>))));
			}
		}

		private static void PatchSkillLocator(AssemblyDefinition assembly)
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "SkillLocator");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_bonusSkills", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(List<object>))));
			}
		}

		private static void PatchCharacterMotor(AssemblyDefinition assembly)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Expected O, but got Unknown
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Expected O, but got Unknown
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: Expected O, but got Unknown
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Expected O, but got Unknown
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "CharacterMotor");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_velocityOverride", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3))));
				type.Fields.Add(new FieldDefinition("bapi_keepVelocityOnMoving", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
				type.Fields.Add(new FieldDefinition("bapi_consistentAcceleration", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float))));
				type.Fields.Add(new FieldDefinition("bapi_fluidMaxDistanceDelta", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
				type.Fields.Add(new FieldDefinition("bapi_strafe", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
				type.Fields.Add(new FieldDefinition("bapi_bunnyHop", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
				type.Fields.Add(new FieldDefinition("bapi_wallJumpCount", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(int))));
			}
		}

		private static void PatchConfigEntry(ref AssemblyDefinition assembly)
		{
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("BepInEx.Configuration", "ConfigEntryBase");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_isServerConfig", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
			}
		}
	}
}

plugins/BrynzaAPI.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BrynzaAPI.Interop;
using EntityStates;
using HG.Reflection;
using HarmonyLib;
using IL.EntityStates;
using IL.RoR2;
using IL.RoR2.CameraModes;
using IL.RoR2.Projectile;
using IL.RoR2.Skills;
using IL.RoR2.UI;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.Utils;
using On.EntityStates;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.CameraModes;
using RoR2.ConVar;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BrynzaAPI")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+745b4a33971a5fd5852844fa0df676e18c6130bb")]
[assembly: AssemblyProduct("BrynzaAPI")]
[assembly: AssemblyTitle("BrynzaAPI")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
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 BrynzaAPI
{
	[Serializable]
	[BepInPlugin("com.brynzananas.brynzaapi", "Brynza API", "1.3.0")]
	[BepInDependency("com.bepis.r2api", "5.0.10")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class BrynzaAPI : BaseUnityPlugin
	{
		public delegate void OnHitGroundServerDelegate(CharacterMotor characterMotor, ref HitGroundInfo hitGroundInfo);

		public class ExtraStatHookEventArgs : EventArgs
		{
			public int wallJumpAdd = 0;

			public float wallJumpMult = 1f;
		}

		public delegate void ExtraStatHookEventHandler(CharacterBody sender, ExtraStatHookEventArgs args);

		public struct ModMetaData
		{
			public string Guid;

			public string Name;
		}

		public delegate void OnConfigApplied(int configId, INetworkConfig networkConfig);

		public interface INetworkConfig
		{
			int id { get; set; }

			OnConfigApplied OnConfigApplied { get; set; }

			Type parameterType { get; }

			object Value { get; set; }
		}

		public class NetworkConfig<T> : INetworkConfig
		{
			public NetworkConfig<bool> enableConfig;

			public ConfigEntry<T> configEntry;

			private T configValue;

			private OnConfigApplied onConfigApplied;

			public int configId;

			public T Value
			{
				get
				{
					if (enableConfig != null && !enableConfig.Value)
					{
						return DefaultValue;
					}
					if (takeServerConfigValues)
					{
						return configValue;
					}
					return configEntry.Value;
				}
				set
				{
					configValue = value;
					((ConfigEntryBase)configEntry).OnSettingChanged((object)configEntry);
				}
			}

			public T DefaultValue => (T)((ConfigEntryBase)configEntry).DefaultValue;

			public Type parameterType => typeof(T);

			public OnConfigApplied OnConfigApplied
			{
				get
				{
					return onConfigApplied;
				}
				set
				{
					onConfigApplied = value;
				}
			}

			public int id
			{
				get
				{
					return configId;
				}
				set
				{
					configId = value;
				}
			}

			object INetworkConfig.Value
			{
				get
				{
					return Value;
				}
				set
				{
					Value = (T)value;
				}
			}
		}

		public class RequestSyncConfigsNetMessage : INetMessage, ISerializableObject
		{
			public void Deserialize(NetworkReader reader)
			{
			}

			public void OnReceived()
			{
				SetConfigValues();
			}

			public void Serialize(NetworkWriter writer)
			{
			}
		}

		public class SyncConfigsNetMessage : INetMessage, ISerializableObject
		{
			private int configId;

			private string input;

			public SyncConfigsNetMessage(int id, string input)
			{
				configId = id;
				this.input = input;
			}

			public SyncConfigsNetMessage()
			{
			}

			public void Deserialize(NetworkReader reader)
			{
				configId = reader.ReadInt32();
				input = reader.ReadString();
			}

			public void OnReceived()
			{
				INetworkConfig networkConfig = networkConfigs[configId];
				if (networkConfig.parameterType == typeof(float))
				{
					NetworkConfig<float> networkConfig2 = networkConfig as NetworkConfig<float>;
					networkConfig2.Value = float.Parse(input);
					if (!NetworkServer.active)
					{
						((ConfigEntryBase)networkConfig2.configEntry).OnSettingChanged((object)networkConfig2.configEntry);
						ConfigEntry<float> configEntry = networkConfig2.configEntry;
						configEntry.Value += 1f;
						ConfigEntry<float> configEntry2 = networkConfig2.configEntry;
						configEntry2.Value -= 1f;
					}
				}
				if (networkConfig.parameterType == typeof(int))
				{
					NetworkConfig<int> networkConfig3 = networkConfig as NetworkConfig<int>;
					networkConfig3.Value = int.Parse(input);
					if (!NetworkServer.active)
					{
						ConfigEntry<int> configEntry3 = networkConfig3.configEntry;
						configEntry3.Value += 1;
						ConfigEntry<int> configEntry4 = networkConfig3.configEntry;
						configEntry4.Value -= 1;
					}
				}
				if (networkConfig.parameterType == typeof(bool))
				{
					NetworkConfig<bool> networkConfig4 = networkConfig as NetworkConfig<bool>;
					networkConfig4.Value = bool.Parse(input);
					if (!NetworkServer.active)
					{
						networkConfig4.configEntry.Value = !networkConfig4.configEntry.Value;
						networkConfig4.configEntry.Value = !networkConfig4.configEntry.Value;
					}
				}
				networkConfig.OnConfigApplied?.Invoke(configId, networkConfig);
			}

			public void Serialize(NetworkWriter writer)
			{
				writer.Write(configId);
				writer.Write(input);
			}
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static Manipulator <0>__SkillDef_OnFixedUpdate;

			public static Manipulator <1>__SkillDef_OnExecute;

			public static Manipulator <2>__CrosshairManager_UpdateCrosshair1;

			public static Manipulator <3>__CameraModePlayerBasic_UpdateInternal;

			public static EventHandler <4>__ConfigEntry_SettingChanged;
		}

		public const string ModGuid = "com.brynzananas.brynzaapi";

		public const string ModName = "Brynza API";

		public const string ModVer = "1.3.0";

		public static Dictionary<CharacterMotor, List<OnHitGroundServerDelegate>> onHitGroundServerDictionary = new Dictionary<CharacterMotor, List<OnHitGroundServerDelegate>>();

		public static bool riskOfOptionsLoaded = false;

		public static ConfigFile ConfigMain;

		public static Dictionary<string, List<INetworkConfig>> modConfigs = new Dictionary<string, List<INetworkConfig>>();

		public static List<GameObject> activeSniperHurtboxTrackers = new List<GameObject>();

		[Obsolete]
		private static Vector3 worldCrosshairPositionOverride = Vector3.zero;

		public static Dictionary<string, string> _tokenKeywords = new Dictionary<string, string>();

		private static string[] tokenKeywordsKeys = new string[0];

		public static HGButton loadoutSectionButton;

		public static GameObject loadoutSectionHolder;

		public const string LoadoutMainSectionToken = "LOADOUT_SECTION_MAIN";

		private Harmony harmonyPatcher;

		private bool hooksEnabled = false;

		private static ExtraStatHookEventArgs ExtraStatMods;

		public static List<INetworkConfig> networkConfigs = new List<INetworkConfig>();

		private static bool takeServerConfigValues
		{
			get
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				int result;
				if (!Object.op_Implicit((Object)(object)Run.instance))
				{
					Scene activeScene = SceneManager.GetActiveScene();
					result = ((((Scene)(ref activeScene)).name == "lobby") ? 1 : 0);
				}
				else
				{
					result = 1;
				}
				return (byte)result != 0;
			}
		}

		public static Dictionary<string, string> tokenKeywords
		{
			get
			{
				return _tokenKeywords;
			}
			set
			{
				tokenKeywordsKeys = value.Keys.ToArray();
				_tokenKeywords = value;
			}
		}

		public static event Action<GameObject> onSniperHurtboxAdded;

		public static event Action<GameObject> onSniperHurtboxRemoved;

		private static event ExtraStatHookEventHandler _getExtraStatCoefficients;

		public static event ExtraStatHookEventHandler GetExtraStatCoefficients
		{
			add
			{
				_getExtraStatCoefficients += value;
			}
			remove
			{
				_getExtraStatCoefficients -= value;
			}
		}

		public void Awake()
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			ConfigMain = ((BaseUnityPlugin)this).Config;
			NetworkingAPI.RegisterMessageType<SyncConfigsNetMessage>();
			NetworkingAPI.RegisterMessageType<RequestSyncConfigsNetMessage>();
			riskOfOptionsLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
			loadoutSectionButton = ((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/CharacterSelectUIMain.prefab").WaitForCompletion().transform.Find("SafeArea/LeftHandPanel (Layer: Main)/SurvivorInfoPanel, Active (Layer: Secondary)/SubheaderPanel (Overview, Skills, Loadout)/GenericMenuButton (Overview)")).gameObject.GetComponent<HGButton>();
			RectTransform component = ((Component)loadoutSectionButton).gameObject.GetComponent<RectTransform>();
			component.sizeDelta = new Vector2(64f, 64f);
			((UnityEventBase)((Button)loadoutSectionButton).onClick).RemoveAllListeners();
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Main");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Основной", "ru");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "主要", "zh-CN");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Principale", "fr");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Wichtigsten", "de");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Principale", "it");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "メイン", "ja");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "주요", "ko");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Principal", "pt-BR");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Ana", "tr");
			Utils.AddLanguageToken("LOADOUT_SECTION_MAIN", "Principal", "es");
			SetHooks();
		}

		public void OnDestroy()
		{
			UnsetHooks();
		}

		private void SetHooks()
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Expected O, but got Unknown
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Expected O, but got Unknown
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Expected O, but got Unknown
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Expected O, but got Unknown
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Expected O, but got Unknown
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Expected O, but got Unknown
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Expected O, but got Unknown
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Expected O, but got Unknown
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Expected O, but got Unknown
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Expected O, but got Unknown
			//IL_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Expected O, but got Unknown
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Expected O, but got Unknown
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Expected O, but got Unknown
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Expected O, but got Unknown
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Expected O, but got Unknown
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Expected O, but got Unknown
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Expected O, but got Unknown
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Expected O, but got Unknown
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: 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_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Expected O, but got Unknown
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Expected O, but got Unknown
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Expected O, but got Unknown
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Expected O, but got Unknown
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Expected O, but got Unknown
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Expected O, but got Unknown
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Expected O, but got Unknown
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Expected O, but got Unknown
			if (!hooksEnabled)
			{
				hooksEnabled = true;
				object obj = <>O.<0>__SkillDef_OnFixedUpdate;
				if (obj == null)
				{
					Manipulator val = SkillDef_OnFixedUpdate;
					<>O.<0>__SkillDef_OnFixedUpdate = val;
					obj = (object)val;
				}
				SkillDef.OnFixedUpdate += (Manipulator)obj;
				object obj2 = <>O.<1>__SkillDef_OnExecute;
				if (obj2 == null)
				{
					Manipulator val2 = SkillDef_OnExecute;
					<>O.<1>__SkillDef_OnExecute = val2;
					obj2 = (object)val2;
				}
				SkillDef.OnExecute += (Manipulator)obj2;
				object obj3 = <>O.<2>__CrosshairManager_UpdateCrosshair1;
				if (obj3 == null)
				{
					Manipulator val3 = CrosshairManager_UpdateCrosshair1;
					<>O.<2>__CrosshairManager_UpdateCrosshair1 = val3;
					obj3 = (object)val3;
				}
				CrosshairManager.UpdateCrosshair += (Manipulator)obj3;
				object obj4 = <>O.<3>__CameraModePlayerBasic_UpdateInternal;
				if (obj4 == null)
				{
					Manipulator val4 = CameraModePlayerBasic_UpdateInternal;
					<>O.<3>__CameraModePlayerBasic_UpdateInternal = val4;
					obj4 = (object)val4;
				}
				CameraModePlayerBasic.UpdateInternal += (Manipulator)obj4;
				CameraModePlayerBasic.CollectLookInputInternal += new Manipulator(CameraModePlayerBasic_CollectLookInputInternal);
				GenericCharacterMain.HandleMovements += new hook_HandleMovements(GenericCharacterMain_HandleMovements);
				GenericSkill.Awake += new Manipulator(GenericSkill_Awake);
				CharacterMotor.PreMove += new Manipulator(CharacterMotor_PreMove);
				ProjectileExplosion.DetonateServer += new Manipulator(ProjectileExplosion_DetonateServer);
				GenericCharacterMain.ApplyJumpVelocity += new Manipulator(GenericCharacterMain_ApplyJumpVelocity);
				GlobalEventManager.OnCharacterHitGroundServer += new hook_OnCharacterHitGroundServer(GlobalEventManager_OnCharacterHitGroundServer);
				ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
				Run.Start += new hook_Start(Run_Start);
				RoR2Application.OnLoad += new hook_OnLoad(RoR2Application_OnLoad);
				CharacterSelectController.OnEnable += new hook_OnEnable(CharacterSelectController_OnEnable);
				CharacterMotor.OnDisable += new hook_OnDisable(CharacterMotor_OnDisable);
				FogDamageController.MyFixedUpdate += new Manipulator(FogDamageController_MyFixedUpdate);
				HurtBox.OnEnable += new hook_OnEnable(HurtBox_OnEnable);
				HurtBox.OnDisable += new hook_OnDisable(HurtBox_OnDisable);
				HealthComponent.TakeDamageProcess += new Manipulator(HealthComponent_TakeDamageProcess);
				GenericCharacterMain.ProcessJump_bool += new Manipulator(GenericCharacterMain_ProcessJump_bool);
				CharacterMotor.OnLanded += new Manipulator(CharacterMotor_OnLanded);
				CharacterBody.RecalculateStats += new Manipulator(CharacterBody_RecalculateStats);
				BulletAttack.ProcessHit += new hook_ProcessHit(BulletAttack_ProcessHit);
				LoadoutPanelController.Awake += new hook_Awake(LoadoutPanelController_Awake);
				Row.FromSkillSlot += new Manipulator(Row_FromSkillSlot);
				LoadoutPanelController.DestroyRows += new hook_DestroyRows(LoadoutPanelController_DestroyRows);
				Row.FinishSetup += new hook_FinishSetup(Row_FinishSetup);
				Row.FromSkin += new Manipulator(Row_FromSkin);
				LoadoutPanelController.Rebuild += new hook_Rebuild(LoadoutPanelController_Rebuild);
				RoR2Application.onLoadFinished = (Action)Delegate.Combine(RoR2Application.onLoadFinished, new Action(OnRoR2Loaded));
			}
		}

		private void UnsetHooks()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Expected O, but got Unknown
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Expected O, but got Unknown
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Expected O, but got Unknown
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Expected O, but got Unknown
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Expected O, but got Unknown
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Expected O, but got Unknown
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Expected O, but got Unknown
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Expected O, but got Unknown
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Expected O, but got Unknown
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Expected O, but got Unknown
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Expected O, but got Unknown
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Expected O, but got Unknown
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Expected O, but got Unknown
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Expected O, but got Unknown
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Expected O, but got Unknown
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Expected O, but got Unknown
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Expected O, but got Unknown
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Expected O, but got Unknown
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Expected O, but got Unknown
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Expected O, but got Unknown
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Expected O, but got Unknown
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Expected O, but got Unknown
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Expected O, but got Unknown
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Expected O, but got Unknown
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_025f: Expected O, but got Unknown
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_0271: Expected O, but got Unknown
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_0283: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Expected O, but got Unknown
			if (hooksEnabled)
			{
				hooksEnabled = false;
				object obj = <>O.<0>__SkillDef_OnFixedUpdate;
				if (obj == null)
				{
					Manipulator val = SkillDef_OnFixedUpdate;
					<>O.<0>__SkillDef_OnFixedUpdate = val;
					obj = (object)val;
				}
				SkillDef.OnFixedUpdate -= (Manipulator)obj;
				object obj2 = <>O.<1>__SkillDef_OnExecute;
				if (obj2 == null)
				{
					Manipulator val2 = SkillDef_OnExecute;
					<>O.<1>__SkillDef_OnExecute = val2;
					obj2 = (object)val2;
				}
				SkillDef.OnExecute -= (Manipulator)obj2;
				object obj3 = <>O.<2>__CrosshairManager_UpdateCrosshair1;
				if (obj3 == null)
				{
					Manipulator val3 = CrosshairManager_UpdateCrosshair1;
					<>O.<2>__CrosshairManager_UpdateCrosshair1 = val3;
					obj3 = (object)val3;
				}
				CrosshairManager.UpdateCrosshair -= (Manipulator)obj3;
				object obj4 = <>O.<3>__CameraModePlayerBasic_UpdateInternal;
				if (obj4 == null)
				{
					Manipulator val4 = CameraModePlayerBasic_UpdateInternal;
					<>O.<3>__CameraModePlayerBasic_UpdateInternal = val4;
					obj4 = (object)val4;
				}
				CameraModePlayerBasic.UpdateInternal -= (Manipulator)obj4;
				CameraModePlayerBasic.CollectLookInputInternal -= new Manipulator(CameraModePlayerBasic_CollectLookInputInternal);
				GenericCharacterMain.HandleMovements += new hook_HandleMovements(GenericCharacterMain_HandleMovements);
				GenericSkill.Awake -= new Manipulator(GenericSkill_Awake);
				CharacterBody.RecalculateStats -= new hook_RecalculateStats(CharacterBody_RecalculateStats1);
				CharacterMotor.PreMove -= new Manipulator(CharacterMotor_PreMove);
				ProjectileExplosion.DetonateServer -= new Manipulator(ProjectileExplosion_DetonateServer);
				GenericCharacterMain.ApplyJumpVelocity -= new Manipulator(GenericCharacterMain_ApplyJumpVelocity);
				GlobalEventManager.OnCharacterHitGroundServer -= new hook_OnCharacterHitGroundServer(GlobalEventManager_OnCharacterHitGroundServer);
				ContentManager.collectContentPackProviders -= new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
				Run.Start -= new hook_Start(Run_Start);
				RoR2Application.OnLoad -= new hook_OnLoad(RoR2Application_OnLoad);
				CharacterSelectController.OnEnable -= new hook_OnEnable(CharacterSelectController_OnEnable);
				CharacterMotor.OnDisable -= new hook_OnDisable(CharacterMotor_OnDisable);
				FogDamageController.MyFixedUpdate -= new Manipulator(FogDamageController_MyFixedUpdate);
				HurtBox.OnEnable -= new hook_OnEnable(HurtBox_OnEnable);
				HurtBox.OnDisable -= new hook_OnDisable(HurtBox_OnDisable);
				HealthComponent.TakeDamageProcess -= new Manipulator(HealthComponent_TakeDamageProcess);
				GenericCharacterMain.ProcessJump_bool -= new Manipulator(GenericCharacterMain_ProcessJump_bool);
				CharacterMotor.OnLanded -= new Manipulator(CharacterMotor_OnLanded);
				CharacterBody.RecalculateStats -= new Manipulator(CharacterBody_RecalculateStats);
				BulletAttack.ProcessHit -= new hook_ProcessHit(BulletAttack_ProcessHit);
				LoadoutPanelController.Awake -= new hook_Awake(LoadoutPanelController_Awake);
				Row.FromSkillSlot -= new Manipulator(Row_FromSkillSlot);
				LoadoutPanelController.DestroyRows -= new hook_DestroyRows(LoadoutPanelController_DestroyRows);
				Row.FinishSetup -= new hook_FinishSetup(Row_FinishSetup);
				Row.FromSkin -= new Manipulator(Row_FromSkin);
				LoadoutPanelController.Rebuild -= new hook_Rebuild(LoadoutPanelController_Rebuild);
				RoR2Application.onLoadFinished = (Action)Delegate.Remove(RoR2Application.onLoadFinished, new Action(OnRoR2Loaded));
			}
		}

		private void OnRoR2Loaded()
		{
			((MonoBehaviour)this).StartCoroutine(AddLanguageTokens());
		}

		private IEnumerator AddLanguageTokens()
		{
			while (LanguageTokensToAddOnLoad.languageTokensToAddOnLoad.Count > 0)
			{
				LanguageTokensToAddOnLoad.languageTokensToAddOnLoad[0].Dispose();
				yield return null;
			}
		}

		private void LoadoutPanelController_Rebuild(orig_Rebuild orig, LoadoutPanelController self)
		{
			orig.Invoke(self);
			int count = Section.sections.Count;
			if (count <= 0)
			{
				return;
			}
			if (count == 1)
			{
				ClearSections();
				return;
			}
			LayoutElement val = (Object.op_Implicit((Object)(object)loadoutSectionHolder) ? loadoutSectionHolder.GetComponent<LayoutElement>() : null);
			if ((Object)(object)val != (Object)null)
			{
				val.minHeight = 32f;
				val.preferredHeight = 48f;
			}
			Utils.SelectRowsSection("LOADOUT_SECTION_MAIN");
		}

		private void Row_FromSkin(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchNewobj<Row>(x)
			}))
			{
				val.Emit(OpCodes.Dup);
				val.EmitDelegate<Action<Row>>((Action<Row>)SetSection);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static void SetSection(Row row)
			{
				string sectionName = "LOADOUT_SECTION_MAIN";
				CreateSection(row, sectionName);
			}
		}

		private static void CreateSection(Row row, string sectionName)
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			if (Section.sectionByName.ContainsKey(sectionName))
			{
				Section section = Section.sectionByName[sectionName];
				section.rows.Add(row);
			}
			else
			{
				Section section2 = new Section(sectionName, row.primaryColor);
				section2.rows.Add(row);
			}
		}

		private void Row_FinishSetup(orig_FinishSetup orig, Row self, bool addWIPIcons)
		{
			orig.Invoke(self, addWIPIcons);
		}

		private static void ClearSections()
		{
			while (Section.sections.Count > 0)
			{
				Section.sections[0].Dispose();
			}
			LayoutElement val = (Object.op_Implicit((Object)(object)loadoutSectionHolder) ? loadoutSectionHolder.GetComponent<LayoutElement>() : null);
			if ((Object)(object)val != (Object)null)
			{
				val.minHeight = 0f;
				val.preferredHeight = 0f;
			}
		}

		private void LoadoutPanelController_DestroyRows(orig_DestroyRows orig, LoadoutPanelController self)
		{
			ClearSections();
			orig.Invoke(self);
		}

		private void Row_FromSkillSlot(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchNewobj<Row>(x)
			}))
			{
				val.Emit(OpCodes.Dup);
				val.Emit(OpCodes.Ldarg_3);
				val.EmitDelegate<Action<Row, GenericSkill>>((Action<Row, GenericSkill>)SetSection);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static void SetSection(Row row, GenericSkill genericSkill)
			{
				string text = genericSkill.GetSection();
				if (text == null || text == "")
				{
					text = "LOADOUT_SECTION_MAIN";
				}
				CreateSection(row, text);
			}
		}

		private void LoadoutPanelController_Awake(orig_Awake orig, LoadoutPanelController self)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if ((Object)(object)loadoutSectionHolder == (Object)null)
			{
				loadoutSectionHolder = new GameObject("SectionHolder");
				Transform transform = loadoutSectionHolder.transform;
				loadoutSectionHolder.transform.SetParent(((Component)self).transform);
				transform.localScale = Vector3.one;
				transform.localRotation = Quaternion.identity;
				transform.localPosition = Vector3.zero;
				RectTransform val = loadoutSectionHolder.AddComponent<RectTransform>();
				CanvasRenderer val2 = loadoutSectionHolder.AddComponent<CanvasRenderer>();
				val2.cullTransparentMesh = false;
				HorizontalLayoutGroup val3 = loadoutSectionHolder.AddComponent<HorizontalLayoutGroup>();
				RectOffset padding = ((LayoutGroup)val3).padding;
				padding.right = 6;
				padding.left = 6;
				padding.top = 6;
				padding.bottom = 6;
				((HorizontalOrVerticalLayoutGroup)val3).childControlHeight = true;
				((HorizontalOrVerticalLayoutGroup)val3).childControlWidth = true;
				LayoutElement val4 = loadoutSectionHolder.AddComponent<LayoutElement>();
				val4.minHeight = 32f;
				val4.preferredHeight = 48f;
			}
		}

		private bool BulletAttack_ProcessHit(orig_ProcessHit orig, BulletAttack self, ref BulletHit hitInfo)
		{
			if (hitInfo != null && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox) && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox.healthComponent) && self.GetIgnoreHitTargets())
			{
				List<object> ignoredHealthComponents = self.GetIgnoredHealthComponents();
				if (ignoredHealthComponents == null)
				{
					self.SetIgnoredHealthComponents(new List<object>());
					ignoredHealthComponents = self.GetIgnoredHealthComponents();
				}
				if (ignoredHealthComponents.Contains(hitInfo.hitHurtBox.healthComponent))
				{
					return false;
				}
				ignoredHealthComponents.Add(hitInfo.hitHurtBox.healthComponent);
			}
			return orig.Invoke(self, ref hitInfo);
		}

		private void CharacterSelectController_OnEnable(orig_OnEnable orig, CharacterSelectController self)
		{
			orig.Invoke(self);
			SetConfigValues();
		}

		private void GenericSkill_Awake(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel val2 = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[5]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchCall<GenericSkill>(x, "get_skillFamily"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<SkillFamily>(x, "get_defaultSkillDef"),
				(Instruction x) => ILPatternMatchingExt.MatchCall<GenericSkill>(x, "set_defaultSkillDef")
			}))
			{
				val.RemoveRange(5);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<GenericSkill>>((Action<GenericSkill>)delegate(GenericSkill cb)
				{
					cb.defaultSkillDef = (Object.op_Implicit((Object)(object)cb.skillFamily) ? cb.skillFamily.defaultSkillDef : null);
				});
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private void GenericCharacterMain_HandleMovements(orig_HandleMovements orig, GenericCharacterMain self)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && CharacterBodyAPI.HasModdedBodyFlag(((EntityState)self).characterBody, Assets.SprintAllTime))
			{
				self.sprintInputReceived = true;
			}
			orig.Invoke(self);
		}

		private void CameraModePlayerBasic_CollectLookInputInternal(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel iLLabel = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld<CameraRigController>(x, "enableSprintSensitivitySlowdown"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<BoolConVar>(x, "get_value"),
				(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel)
			}))
			{
				val.Emit(OpCodes.Ldarg_2);
				val.Emit<CameraModeContext>(OpCodes.Ldflda, "targetInfo");
				val.Emit<TargetInfo>(OpCodes.Ldfld, "body");
				val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody cb) => Object.op_Implicit((Object)(object)cb) && CharacterBodyAPI.HasModdedBodyFlag(cb, Assets.SprintAllTime)));
				val.Emit(OpCodes.Brtrue_S, (object)iLLabel);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private static void SkillDef_OnExecute(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel iLLabel = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<SkillDef>(x, "cancelSprintingOnActivation"),
				(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel)
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<GenericSkill, bool>>((Func<GenericSkill, bool>)((GenericSkill cb) => CharacterBodyAPI.HasModdedBodyFlag(cb.characterBody, Assets.SprintAllTime)));
				val.Emit(OpCodes.Brtrue_S, (object)iLLabel);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private static void SkillDef_OnFixedUpdate(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel iLLabel = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<GenericSkill>(x, "get_characterBody"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "get_isSprinting"),
				(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel)
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<GenericSkill, bool>>((Func<GenericSkill, bool>)((GenericSkill cb) => CharacterBodyAPI.HasModdedBodyFlag(cb.characterBody, Assets.SprintAllTime)));
				val.Emit(OpCodes.Brtrue_S, (object)iLLabel);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private static void CameraModePlayerBasic_UpdateInternal(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_009c: 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)
			ILCursor val = new ILCursor(il);
			ILLabel iLLabel = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 2),
				(Instruction x) => ILPatternMatchingExt.MatchLdflda<CameraModeContext>(x, "targetInfo"),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<TargetInfo>(x, "isSprinting"),
				(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref iLLabel)
			}))
			{
				val.Emit(OpCodes.Ldarg_2);
				val.EmitDelegate<<>F{00000001}<CameraModeContext, bool>>((<>F{00000001}<CameraModeContext, bool>)sus);
				val.Emit(OpCodes.Brtrue_S, (object)iLLabel);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static bool sus(ref CameraModeContext cameraModeContext)
			{
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)cameraModeContext.targetInfo.body != (Object)null)
				{
					return CharacterBodyAPI.HasModdedBodyFlag(cameraModeContext.targetInfo.body, Assets.SprintAllTime);
				}
				return true;
			}
		}

		private static void CrosshairManager_UpdateCrosshair1(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel iLLabel = null;
			ILLabel iLLabel2 = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<CrosshairManager>(x, "cameraRigController"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CameraRigController>(x, "get_hasOverride"),
				(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref iLLabel)
			}) && val.TryGotoNext(new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "get_isSprinting"),
				(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref iLLabel2)
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody cb) => CharacterBodyAPI.HasModdedBodyFlag(cb, Assets.SprintAllTime)));
				val.Emit(OpCodes.Brtrue_S, (object)iLLabel);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private void CameraRigController_SetCameraState1(orig_SetCameraState orig, CameraRigController self, CameraState cameraState)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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)
			orig.Invoke(self, cameraState);
			if (!(worldCrosshairPositionOverride == Vector3.zero))
			{
				((Component)self).transform.rotation = Quaternion.LookRotation(worldCrosshairPositionOverride - ((Component)self).transform.position);
			}
		}

		private void CameraRigController_SetCameraState(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			Instruction val2 = null;
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<CameraState>(x, "rotation")
			}))
			{
				val.Remove();
				val.EmitDelegate<<>F{00000001}<CameraState, Quaternion>>((<>F{00000001}<CameraState, Quaternion>)SetOverrideWorldCrosshairPosition);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static Quaternion SetOverrideWorldCrosshairPosition(ref CameraState cameraState)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0018: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				return (worldCrosshairPositionOverride == Vector3.zero) ? cameraState.rotation : Quaternion.LookRotation(worldCrosshairPositionOverride - cameraState.position);
			}
		}

		private void CameraRigController_LateUpdate(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			Instruction val2 = null;
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 5),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<UpdateResult>(x, "crosshairWorldPosition"),
				(Instruction x) => ILPatternMatchingExt.MatchCall<CameraRigController>(x, "set_crosshairWorldPosition")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<CameraRigController>>((Action<CameraRigController>)SetOverrideWorldCrosshairPosition);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static void SetOverrideWorldCrosshairPosition(CameraRigController cameraRigController)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: 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)
				if (!(worldCrosshairPositionOverride == Vector3.zero))
				{
					cameraRigController.crosshairWorldPosition = worldCrosshairPositionOverride;
				}
			}
		}

		private void CameraModePlayerBasic_UpdateCrosshair(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			Instruction val2 = null;
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, -1),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 7)
			}))
			{
				val2 = val.Next;
				val.EmitDelegate<Func<bool>>((Func<bool>)HasWorldCrosshairOverride);
				val.Emit(OpCodes.Brfalse_S, val2);
				val.Emit(OpCodes.Ldloc, 5);
				val.EmitDelegate<Action<RaycastHit[]>>((Action<RaycastHit[]>)ReturnResults);
				val.Emit(OpCodes.Ldarg, 5);
				val.EmitDelegate<Func<Vector3>>((Func<Vector3>)GetWorldCrosshairOverride);
				val.Emit(OpCodes.Stobj, typeof(Vector3));
				val.Emit(OpCodes.Ret);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static Vector3 GetWorldCrosshairOverride()
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				return worldCrosshairPositionOverride;
			}
			static bool HasWorldCrosshairOverride()
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				return (!(worldCrosshairPositionOverride == Vector3.zero)) ? true : false;
			}
			static void ReturnResults(RaycastHit[] raycastHits)
			{
				HGPhysics.ReturnResults(raycastHits);
			}
		}

		private void CharacterBody_RecalculateStats(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Action<CharacterBody>>((Action<CharacterBody>)ExtraStats);
			val = new ILCursor(il);
			if (val.TryGotoNext(new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f),
				(Instruction x) => ILPatternMatchingExt.MatchCall<CharacterBody>(x, "set_critHeal")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<CharacterBody>>((Action<CharacterBody>)HasSkillOverride);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static void ExtraStats(CharacterBody characterBody)
			{
				characterBody.SetMaxWallJumpCount(characterBody.GetBaseWallJumpCount());
				ExtraStatHookEventArgs args = new ExtraStatHookEventArgs();
				if (BrynzaAPI._getExtraStatCoefficients != null)
				{
					Delegate[] invocationList = BrynzaAPI._getExtraStatCoefficients.GetInvocationList();
					for (int j = 0; j < invocationList.Length; j++)
					{
						ExtraStatHookEventHandler extraStatHookEventHandler = (ExtraStatHookEventHandler)invocationList[j];
						try
						{
							extraStatHookEventHandler(characterBody, args);
						}
						catch (Exception)
						{
						}
					}
				}
			}
			static void HasSkillOverride(CharacterBody characterBody)
			{
				if (Object.op_Implicit((Object)(object)characterBody.skillLocator))
				{
					for (int i = 0; i < characterBody.skillLocator.allSkills.Length; i++)
					{
						GenericSkill val2 = characterBody.skillLocator.allSkills[i];
						if (!((Object)(object)val2 == (Object)null))
						{
							GenericSkill linkedSkill = val2.GetLinkedSkill();
							if (!((Object)(object)linkedSkill == (Object)null))
							{
								val2.cooldownScale = linkedSkill.cooldownScale;
								val2.finalRechargeInterval = linkedSkill.finalRechargeInterval;
								val2.SetBonusStockFromBody(linkedSkill.bonusStockFromBody);
							}
						}
					}
				}
			}
		}

		private void CharacterMotor_OnLanded(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchStfld<CharacterMotor>(x, "jumpCount")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Action<CharacterMotor>>((Action<CharacterMotor>)SetWallJumpCount);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static void SetWallJumpCount(CharacterMotor characterMotor)
			{
				characterMotor.SetWallJumpCount(0);
			}
		}

		private void GenericCharacterMain_ProcessJump_bool(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			//IL_00d5: 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_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Expected O, but got Unknown
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b0: Expected O, but got Unknown
			//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			Instruction val2 = null;
			Instruction val3 = null;
			Instruction val4 = null;
			Instruction val5 = null;
			ILLabel iLLabel = null;
			int count = il.Body.Variables.Count;
			il.Body.Variables.Add(new VariableDefinition(il.Import(typeof(bool))));
			ILLabel val6 = default(ILLabel);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<BaseCharacterMain>(x, "hasCharacterMotor"),
				(Instruction x) => ILPatternMatchingExt.MatchBrfalse(x, ref val6)
			}))
			{
				val.Emit(OpCodes.Ldc_I4_0);
				val.Emit(OpCodes.Stloc, count);
				val = new ILCursor(il);
				if (val.TryGotoNext(new Func<Instruction, bool>[8]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchCall<EntityState>(x, "get_characterMotor"),
					(Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterMotor>(x, "jumpCount"),
					(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
					(Instruction x) => ILPatternMatchingExt.MatchCall<EntityState>(x, "get_characterBody"),
					(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "get_maxJumpCount"),
					(Instruction x) => ILPatternMatchingExt.MatchClt(x),
					(Instruction x) => ILPatternMatchingExt.MatchBr(x, ref iLLabel)
				}))
				{
					val2 = val.Next;
					val.GotoLabel(iLLabel, (MoveType)1, false);
					val3 = val.Prev;
					val.Goto(val2, (MoveType)0, false);
					val.Emit(OpCodes.Ldarg_0);
					val.EmitDelegate<Func<EntityState, bool>>((Func<EntityState, bool>)WallJump);
					val4 = val.Emit(OpCodes.Brtrue_S, val3).Prev;
					ILCursor obj = val;
					int index = obj.Index;
					obj.Index = index - 1;
					val.Emit(OpCodes.Dup);
					val.Emit(OpCodes.Brfalse_S, val4);
					val.Emit(OpCodes.Ldc_I4_1);
					val.Emit(OpCodes.Stloc, count);
					val = new ILCursor(il);
					if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[7]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
						(Instruction x) => ILPatternMatchingExt.MatchCall<EntityState>(x, "get_characterMotor"),
						(Instruction x) => ILPatternMatchingExt.MatchDup(x),
						(Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterMotor>(x, "jumpCount"),
						(Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 1),
						(Instruction x) => ILPatternMatchingExt.MatchAdd(x),
						(Instruction x) => ILPatternMatchingExt.MatchStfld<CharacterMotor>(x, "jumpCount")
					}))
					{
						val.Emit(OpCodes.Ldarg_0);
						val.Emit(OpCodes.Ldloc, count);
						val.EmitDelegate<Action<EntityState, bool>>((Action<EntityState, bool>)CountWallJump);
					}
					else
					{
						Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 3 failed!"));
					}
				}
				else
				{
					Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!"));
				}
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
			}
			static void CountWallJump(EntityState entityState, bool isWallJump)
			{
				if (isWallJump)
				{
					CharacterMotor characterMotor = entityState.characterMotor;
					characterMotor.SetWallJumpCount(characterMotor.GetWallJumpCount() + 1);
					characterMotor.jumpCount--;
				}
			}
			static bool WallJump(EntityState entityState)
			{
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				CharacterMotor characterMotor2 = entityState.characterMotor;
				KinematicCharacterMotor motor = ((BaseCharacterController)characterMotor2).Motor;
				if (Object.op_Implicit((Object)(object)motor) && !entityState.characterMotor.isGrounded && characterMotor2.GetWallJumpCount() < entityState.characterBody.GetMaxWallJumpCount() && motor.CharacterCollisionsOverlap(motor.TransientPosition, motor.TransientRotation, motor._internalProbedColliders, 0.1f, false) > 0)
				{
					return true;
				}
				return false;
			}
		}

		private void HealthComponent_TakeDamageProcess(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel val2 = null;
			int thatStructId = 0;
			FieldReference damageInfoField = null;
			FieldReference attackerBodyField = null;
			int num = 6;
			int num2 = default(int);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[6]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloca(x, ref num2),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref thatStructId),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, ref damageInfoField),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<DamageInfo>(x, "attacker"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<GameObject>(x, "GetComponent"),
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, ref attackerBodyField)
			}))
			{
				if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 7),
					(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 8)
				}))
				{
					int index = val.Index;
					val.Index = index + 1;
					val.Emit(OpCodes.Ldloc, thatStructId);
					val.Emit(OpCodes.Ldfld, damageInfoField);
					val.Emit(OpCodes.Ldarg_0);
					val.EmitDelegate<Func<DamageInfo, HealthComponent, bool>>((Func<DamageInfo, HealthComponent, bool>)CheckForAnyFlags);
					val.Emit(OpCodes.Brfalse_S, val.Next);
					val.Emit(OpCodes.Pop);
					val.Emit(OpCodes.Ldloc, thatStructId);
					val.Emit(OpCodes.Ldfld, damageInfoField);
					val.Emit(OpCodes.Ldarg_0);
					val.EmitDelegate<Func<DamageInfo, HealthComponent, float>>((Func<DamageInfo, HealthComponent, float>)ReplaceDamageNumber);
				}
				else
				{
					Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!"));
				}
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
			}
			static bool CheckForAnyFlags(DamageInfo damageInfo, HealthComponent healthComponent)
			{
				//IL_003f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0022: Unknown result type (might be due to invalid IL or missing references)
				//IL_004c: Unknown result type (might be due to invalid IL or missing references)
				//IL_002f: Unknown result type (might be due to invalid IL or missing references)
				CharacterBody body = healthComponent.body;
				if ((Object)(object)body == (Object)null)
				{
					return false;
				}
				return (!body.isChampion) ? (DamageAPI.HasModdedDamageType(damageInfo, Assets.InstakillNoChampion) || DamageAPI.HasModdedDamageType(damageInfo, Assets.BruiseNoChampion)) : (DamageAPI.HasModdedDamageType(damageInfo, Assets.InstakillChampion) || DamageAPI.HasModdedDamageType(damageInfo, Assets.BruiseChampion));
			}
			static float ReplaceDamageNumber(DamageInfo damageInfo, HealthComponent healthComponent)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				return (DamageAPI.HasModdedDamageType(damageInfo, Assets.InstakillNoChampion) || DamageAPI.HasModdedDamageType(damageInfo, Assets.InstakillChampion)) ? healthComponent.fullCombinedHealth : (healthComponent.fullCombinedHealth / 4f);
			}
		}

		private bool GenericSkill_CanApplyAmmoPack(orig_CanApplyAmmoPack orig, GenericSkill self)
		{
			if (Object.op_Implicit((Object)(object)self.skillDef))
			{
				self.skillDef.CanApplyAmmoPack();
			}
			return orig.Invoke(self);
		}

		internal static void OnSniperHurtboxAdded(GameObject sniperHurtboxTracker)
		{
			BrynzaAPI.onSniperHurtboxAdded?.Invoke(sniperHurtboxTracker);
		}

		internal static void OnSniperHurtboxRemoved(GameObject sniperHurtboxTracker)
		{
			BrynzaAPI.onSniperHurtboxRemoved?.Invoke(sniperHurtboxTracker);
		}

		private void HurtBox_OnDisable(orig_OnDisable orig, HurtBox self)
		{
			orig.Invoke(self);
			Transform val = ((Component)self).transform.Find("SniperHurtboxTrackerObject");
			if (Object.op_Implicit((Object)(object)val))
			{
				Object.Destroy((Object)(object)((Component)val).gameObject);
			}
		}

		private void HurtBox_OnEnable(orig_OnEnable orig, HurtBox self)
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			orig.Invoke(self);
			if (self.isSniperTarget)
			{
				GameObject val = new GameObject("SniperHurtboxTrackerObject");
				SniperHurtboxTracker sniperHurtboxTracker = val.AddComponent<SniperHurtboxTracker>();
				sniperHurtboxTracker.hurtBox = self;
				((Component)sniperHurtboxTracker).transform.SetParent(((Component)self).transform, false);
			}
		}

		private void FogDamageController_MyFixedUpdate(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			Instruction val2 = null;
			ILLabel val3 = null;
			int i = 6;
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<HealthComponent>(x, "TakeDamage")
			}))
			{
				val2 = val.Next;
				if (val.TryGotoPrev(new Func<Instruction, bool>[2]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref i),
					(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterBody>(x, "get_healthComponent")
				}))
				{
					int index = val.Index;
					val.Index = index + 1;
					val.Emit(OpCodes.Ldloc, i);
					val.Emit(OpCodes.Brtrue_S, val2);
				}
				else
				{
					Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!"));
				}
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
			}
		}

		private void CharacterMotor_OnDisable(orig_OnDisable orig, CharacterMotor self)
		{
			orig.Invoke(self);
			if (NetworkServer.active && onHitGroundServerDictionary.ContainsKey(self))
			{
				onHitGroundServerDictionary.Remove(self);
			}
		}

		private void GlobalEventManager_OnCharacterHitGroundServer(orig_OnCharacterHitGroundServer orig, GlobalEventManager self, CharacterBody characterBody, HitGroundInfo hitGroundInfo)
		{
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			CharacterMotor characterMotor = characterBody.characterMotor;
			if ((Object)(object)characterMotor != (Object)null && onHitGroundServerDictionary.ContainsKey(characterMotor))
			{
				List<OnHitGroundServerDelegate> list = onHitGroundServerDictionary[characterMotor];
				for (int i = 0; i < list.Count; i++)
				{
					list[i]?.Invoke(characterMotor, ref hitGroundInfo);
				}
			}
			orig.Invoke(self, characterBody, hitGroundInfo);
		}

		private void GenericCharacterMain_ApplyJumpVelocity(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: 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_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel val2 = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2)
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.Emit(OpCodes.Ldloc_0);
				val.Emit(OpCodes.Ldarg_1);
				val.Emit(OpCodes.Ldarg_2);
				val.EmitDelegate<Func<CharacterMotor, Vector3, CharacterBody, float, float>>((Func<CharacterMotor, Vector3, CharacterBody, float, float>)delegate(CharacterMotor cm, Vector3 vector, CharacterBody cb, float horizontalBonus)
				{
					bool bunnyHop = cm.GetBunnyHop();
					float result2 = 1f;
					if (bunnyHop)
					{
						Vector3 val3 = default(Vector3);
						((Vector3)(ref val3))..ctor(cm.velocity.x, 0f, cm.velocity.z);
						float num = ((Vector3)(ref vector)).sqrMagnitude * horizontalBonus * horizontalBonus;
						result2 = ((num != 0f) ? (MathF.Max(num - ((Vector3)(ref val3)).sqrMagnitude, 0f) / num) : 1f);
					}
					return result2;
				});
				val.Emit(OpCodes.Call, (MethodBase)AccessTools.Method(typeof(Vector3), "op_Multiply", new Type[2]
				{
					typeof(Vector3),
					typeof(float)
				}, (Type[])null));
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<CharacterMotor, Vector3>>((Func<CharacterMotor, Vector3>)delegate(CharacterMotor cm)
				{
					//IL_0001: Unknown result type (might be due to invalid IL or missing references)
					//IL_0006: 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)
					//IL_001b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0014: Unknown result type (might be due to invalid IL or missing references)
					//IL_0019: Unknown result type (might be due to invalid IL or missing references)
					//IL_001e: Unknown result type (might be due to invalid IL or missing references)
					Vector3 result = Vector3.zero;
					if (cm.GetBunnyHop())
					{
						result = cm.velocity;
					}
					return result;
				});
				val.Emit(OpCodes.Call, (MethodBase)AccessTools.Method(typeof(Vector3), "op_Addition", (Type[])null, (Type[])null));
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider)
		{
			addContentPackProvider.Invoke((IContentPackProvider)(object)new ContentPacks());
		}

		private void ProjectileExplosion_DetonateServer(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel val2 = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<ProjectileExplosion>(x, "OnBlastAttackResult")
			}))
			{
				val.Index += 1;
				val.Emit(OpCodes.Ldarg_0);
				val.Emit(OpCodes.Ldloc_1);
				val.Emit(OpCodes.Ldloc_2);
				val.EmitDelegate<Action<ProjectileExplosion, BlastAttack, Result>>((Action<ProjectileExplosion, BlastAttack, Result>)delegate(ProjectileExplosion pe, BlastAttack ba, Result bar)
				{
					//IL_0016: Unknown result type (might be due to invalid IL or missing references)
					IOnProjectileExplosionDetonate[] components = ((Component)pe).GetComponents<IOnProjectileExplosionDetonate>();
					IOnProjectileExplosionDetonate[] array = components;
					foreach (IOnProjectileExplosionDetonate onProjectileExplosionDetonate in array)
					{
						onProjectileExplosionDetonate.OnProjectileExplosionDetonate(ba, bar);
					}
				});
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private void CharacterMotor_PreMove(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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)
			//IL_00bf: Expected O, but got Unknown
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Expected O, but got Unknown
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Expected O, but got Unknown
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel val2 = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStfld<CharacterMotor>(x, "velocity")
			}))
			{
				ILCursor obj = val;
				int index = obj.Index;
				obj.Index = index + 1;
				val.Emit(OpCodes.Ldarg_0);
				val.Emit(OpCodes.Ldloc_1);
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Action<CharacterMotor, Vector3, float>>((Action<CharacterMotor, Vector3, float>)delegate(CharacterMotor cb, Vector3 wishDirection, float deltaTime)
				{
					//IL_009d: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
					//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
					//IL_0033: Unknown result type (might be due to invalid IL or missing references)
					//IL_0038: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b8: 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)
					//IL_0056: Unknown result type (might be due to invalid IL or missing references)
					//IL_005b: Unknown result type (might be due to invalid IL or missing references)
					//IL_0073: Unknown result type (might be due to invalid IL or missing references)
					//IL_0086: Unknown result type (might be due to invalid IL or missing references)
					//IL_008c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0091: Unknown result type (might be due to invalid IL or missing references)
					//IL_0096: Unknown result type (might be due to invalid IL or missing references)
					if (cb.GetStrafe())
					{
						Vector3 val5 = default(Vector3);
						((Vector3)(ref val5))..ctor(cb.velocity.x, 0f, cb.velocity.z);
						float num = Vector3.Dot(((Vector3)(ref val5)).normalized, wishDirection);
						if ((double)num < 0.1)
						{
							cb.velocity += new Vector3(wishDirection.x * cb.walkSpeed * 10f, 0f, wishDirection.z * cb.walkSpeed * 10f) * deltaTime;
						}
					}
					Vector3 velocityOverride = cb.GetVelocityOverride();
					if (velocityOverride != Vector3.zero)
					{
						cb.velocity = velocityOverride;
					}
				});
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			val = new ILCursor(il);
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2)
			}))
			{
				ILCursor obj2 = val;
				int index = obj2.Index;
				obj2.Index = index + 1;
				val.Emit(OpCodes.Ldloc_1);
				val.Emit(OpCodes.Ldloc_2);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<Vector3, Vector3, CharacterMotor, Vector3>>((Func<Vector3, Vector3, CharacterMotor, Vector3>)sus);
				val.Emit(OpCodes.Stloc_2);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			val = new ILCursor(il);
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 0)
			}))
			{
				ILCursor obj3 = val;
				int index = obj3.Index;
				obj3.Index = index + 1;
				val.Emit(OpCodes.Ldloc_0);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<float, CharacterMotor, float>>((Func<float, CharacterMotor, float>)amogus);
				val.Emit(OpCodes.Stloc_0);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			val = new ILCursor(il);
			if (val.TryGotoNext(new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1),
				(Instruction x) => ILPatternMatchingExt.MatchMul(x)
			}))
			{
				ILCursor obj4 = val;
				int index = obj4.Index;
				obj4.Index = index + 1;
				val.Emit(OpCodes.Ldloc_1);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<Vector3, CharacterMotor, float>>((Func<Vector3, CharacterMotor, float>)amogus);
				val.Emit(OpCodes.Mul);
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static float amogus(float originalAirControl, CharacterMotor characterMotor)
			{
				float consistentAcceleration = characterMotor.GetConsistentAcceleration();
				return (consistentAcceleration != 0f) ? (consistentAcceleration * characterMotor.walkSpeed) : originalAirControl;
			}
			static float amogus(Vector3 wishDirection, CharacterMotor characterMotor)
			{
				if (characterMotor.GetFluidMaxDistanceDelta())
				{
					return 1f;
				}
				return 1f;
			}
			static Vector3 sus(Vector3 wishDirection, Vector3 vector31, CharacterMotor characterMotor)
			{
				//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_00af: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: 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_0086: Unknown result type (might be due to invalid IL or missing references)
				//IL_008b: Unknown result type (might be due to invalid IL or missing references)
				//IL_008e: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
				//IL_002d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_003b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0057: Unknown result type (might be due to invalid IL or missing references)
				//IL_005c: Unknown result type (might be due to invalid IL or missing references)
				Vector3 velocity = characterMotor.velocity;
				if (!characterMotor.isGrounded && characterMotor.GetKeepVelocityOnMoving())
				{
					Vector3 val3;
					if (characterMotor.isFlying)
					{
						val3 = characterMotor.velocity + vector31;
						return ((Vector3)(ref val3)).normalized * MathF.Max(((Vector3)(ref characterMotor.velocity)).magnitude, ((Vector3)(ref vector31)).magnitude);
					}
					Vector3 val4 = default(Vector3);
					((Vector3)(ref val4))..ctor(characterMotor.velocity.x, 0f, characterMotor.velocity.z);
					val3 = val4 + vector31;
					return ((Vector3)(ref val3)).normalized * MathF.Max(((Vector3)(ref val4)).magnitude, ((Vector3)(ref vector31)).magnitude);
				}
				return vector31;
			}
		}

		private void CharacterBody_RecalculateStats1(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)self.skillLocator))
			{
				return;
			}
			List<GenericSkill> list = new List<GenericSkill>();
			if (self.skillLocator.allSkills != null)
			{
				list.AddRange(self.skillLocator.allSkills);
			}
			foreach (GenericSkill item in list)
			{
				if ((Object)(object)item != (Object)null)
				{
					GenericSkill linkedSkill = item.GetLinkedSkill();
					if ((Object)(object)linkedSkill != (Object)null)
					{
						item.cooldownScale = linkedSkill.cooldownScale;
						item.flatCooldownReduction = linkedSkill.flatCooldownReduction;
						item.bonusStockFromBody = linkedSkill.bonusStockFromBody;
						item.RecalculateValues();
					}
				}
			}
		}

		private float GenericSkill_CalculateFinalRechargeInterval1(orig_CalculateFinalRechargeInterval orig, GenericSkill self)
		{
			List<GenericSkill> extraSkills = self.GetExtraSkills();
			if (extraSkills != null && extraSkills.Count > 0)
			{
				foreach (GenericSkill item in extraSkills)
				{
					if (!((Object)(object)item == (Object)(object)self))
					{
						item.cooldownScale = self.cooldownScale;
						item.flatCooldownReduction = self.flatCooldownReduction;
						item.temporaryCooldownPenalty = self.temporaryCooldownPenalty;
						item.CalculateFinalRechargeInterval();
					}
				}
			}
			return orig.Invoke(self);
		}

		private void GenericSkill_CalculateFinalRechargeInterval(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall<GenericSkill>(x, "get_cooldownScale")
			}))
			{
				val.Remove();
				val.EmitDelegate<Func<GenericSkill, float>>((Func<GenericSkill, float>)delegate(GenericSkill cb)
				{
					GenericSkill linkedSkill3 = cb.GetLinkedSkill();
					return ((Object)(object)linkedSkill3 != (Object)null) ? linkedSkill3.cooldownScale : cb.cooldownScale;
				});
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall<GenericSkill>(x, "get_flatCooldownReduction")
			}))
			{
				val.Remove();
				val.EmitDelegate<Func<GenericSkill, float>>((Func<GenericSkill, float>)delegate(GenericSkill cb)
				{
					GenericSkill linkedSkill2 = cb.GetLinkedSkill();
					return ((Object)(object)linkedSkill2 != (Object)null) ? linkedSkill2.flatCooldownReduction : cb.flatCooldownReduction;
				});
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall<GenericSkill>(x, "get_temporaryCooldownPenalty")
			}))
			{
				val.Remove();
				val.EmitDelegate<Func<GenericSkill, float>>((Func<GenericSkill, float>)delegate(GenericSkill cb)
				{
					GenericSkill linkedSkill = cb.GetLinkedSkill();
					return ((Object)(object)linkedSkill != (Object)null) ? linkedSkill.temporaryCooldownPenalty : cb.temporaryCooldownPenalty;
				});
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private void GenericSkill_RecalculateMaxStock1(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			ILLabel val2 = null;
			if (val.TryGotoNext(new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<GenericSkill>(x, "bonusStockFromBody")
			}))
			{
				val.Remove();
				val.EmitDelegate<Func<GenericSkill, int>>((Func<GenericSkill, int>)delegate(GenericSkill cb)
				{
					GenericSkill linkedSkill = cb.GetLinkedSkill();
					return ((Object)(object)linkedSkill != (Object)null) ? linkedSkill.bonusStockFromBody : cb.bonusStockFromBody;
				});
			}
			else
			{
				Debug.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
		}

		private void GenericSkill_RecalculateMaxStock(orig_RecalculateMaxStock orig, GenericSkill self)
		{
			orig.Invoke(self);
			List<GenericSkill> extraSkills = self.GetExtraSkills();
			if (extraSkills == null || extraSkills.Count <= 0)
			{
				return;
			}
			foreach (GenericSkill item in extraSkills)
			{
				if (!((Object)(object)item == (Object)(object)self))
				{
					item.bonusStockFromBody = self.bonusStockFromBody;
					item.RecalculateMaxStock();
				}
			}
		}

		private IEnumerator RoR2Application_OnLoad(orig_OnLoad orig, RoR2Application self)
		{
			SetConfigValues();
			return orig.Invoke(self);
		}

		public static void CreateResetToDefaultButtonInRiskOfOptionsConfigMenu(string name, string category, string description, string buttonText)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			ModMetaData modMetaData = Assembly.GetCallingAssembly().GetModMetaData();
			ModSettingsManager.AddOption((BaseOption)new GenericButtonOption(name, category, description, buttonText, new UnityAction(OnButtonPressed)), modMetaData.Guid, modMetaData.Name);
			void OnButtonPressed()
			{
				if (modConfigs.ContainsKey(modMetaData.Guid))
				{
					foreach (INetworkConfig item in modConfigs[modMetaData.Guid])
					{
						if (item.parameterType == typeof(float))
						{
							NetworkConfig<float> networkConfig = (NetworkConfig<float>)item;
							networkConfig.configEntry.Value = networkConfig.DefaultValue;
							networkConfig.Value = networkConfig.DefaultValue;
						}
						if (item.parameterType == typeof(int))
						{
							NetworkConfig<int> networkConfig2 = (NetworkConfig<int>)item;
							networkConfig2.configEntry.Value = networkConfig2.DefaultValue;
							networkConfig2.Value = networkConfig2.DefaultValue;
						}
						if (item.parameterType == typeof(bool))
						{
							NetworkConfig<bool> networkConfig3 = (NetworkConfig<bool>)item;
							networkConfig3.configEntry.Value = networkConfig3.DefaultValue;
							networkConfig3.Value = networkConfig3.DefaultValue;
						}
					}
				}
			}
		}

		public static NetworkConfig<T> CreateConfig<T>(ConfigFile configFile, string section, string key, T defaultValue, string description, OnConfigApplied onConfigApplied = null, NetworkConfig<bool> enableConfig = null, bool generateRiskOfOptionsOption = true)
		{
			ConfigEntry<T> configEntry = configFile.Bind<T>(section, key, defaultValue, description);
			return CreateConfig<T>(configEntry, onConfigApplied, enableConfig, generateRiskOfOptionsOption, Assembly.GetCallingAssembly());
		}

		public static NetworkConfig<T> CreateConfig<T>(ConfigEntry<T> configEntry, OnConfigApplied onConfigApplied = null, NetworkConfig<bool> enableConfig = null, bool generateRiskOfOptionsOption = true, Assembly assembly = null)
		{
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Expected O, but got Unknown
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Expected O, but got Unknown
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Expected O, but got Unknown
			NetworkConfig<T> networkConfig = new NetworkConfig<T>();
			networkConfig.id = networkConfigs.Count;
			networkConfig.enableConfig = enableConfig;
			networkConfig.OnConfigApplied = onConfigApplied;
			networkConfig.configEntry = configEntry;
			networkConfig.configEntry.SettingChanged += ConfigEntry_SettingChanged;
			networkConfigs.Add(networkConfig);
			ModMetaData modMetaData = ((assembly == null) ? Assembly.GetCallingAssembly().GetModMetaData() : assembly.GetModMetaData());
			if (modConfigs.ContainsKey(modMetaData.Guid))
			{
				modConfigs[modMetaData.Guid].Add(networkConfig);
			}
			else
			{
				List<INetworkConfig> list = new List<INetworkConfig>();
				list.Add(networkConfig);
				modConfigs.Add(modMetaData.Guid, list);
			}
			if (riskOfOptionsLoaded && generateRiskOfOptionsOption)
			{
				if (configEntry is ConfigEntry<float>)
				{
					ModSettingsManager.AddOption((BaseOption)new FloatFieldOption(networkConfig.configEntry as ConfigEntry<float>), modMetaData.Guid, modMetaData.Name);
				}
				if (configEntry is ConfigEntry<int>)
				{
					ModSettingsManager.AddOption((BaseOption)new IntFieldOption(networkConfig.configEntry as ConfigEntry<int>), modMetaData.Guid, modMetaData.Name);
				}
				if (configEntry is ConfigEntry<bool>)
				{
					ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(networkConfig.configEntry as ConfigEntry<bool>), modMetaData.Guid, modMetaData.Name);
				}
			}
			return networkConfig;
		}

		private static void ConfigEntry_SettingChanged(object sender, EventArgs e)
		{
			SetConfigValues();
		}

		private void Run_Start(orig_Start orig, Run self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				SetConfigValues();
			}
			else
			{
				NetMessageExtensions.Send((INetMessage)(object)new RequestSyncConfigsNetMessage(), (NetworkDestination)2);
			}
		}

		public static void SetConfigValues()
		{
			if (!NetworkServer.active)
			{
				return;
			}
			foreach (INetworkConfig networkConfig in networkConfigs)
			{
				if (networkConfig.parameterType == typeof(float))
				{
					NetMessageExtensions.Send((INetMessage)(object)new SyncConfigsNetMessage(networkConfigs.IndexOf(networkConfig), (networkConfig as NetworkConfig<float>).configEntry.Value.ToString()), (NetworkDestination)1);
				}
				if (networkConfig.parameterType == typeof(int))
				{
					NetMessageExtensions.Send((INetMessage)(object)new SyncConfigsNetMessage(networkConfigs.IndexOf(networkConfig), (networkConfig as NetworkConfig<int>).configEntry.Value.ToString()), (NetworkDestination)1);
				}
				if (networkConfig.parameterType == typeof(bool))
				{
					NetMessageExtensions.Send((INetMessage)(object)new SyncConfigsNetMessage(networkConfigs.IndexOf(networkConfig), (networkConfig as NetworkConfig<bool>).configEntry.Value.ToString()), (NetworkDestination)1);
				}
			}
		}
	}
	public class AddBuffNetMessage : INetMessage, ISerializableObject
	{
		private NetworkInstanceId instanceId;

		private int buffIndex;

		private int amount;

		private float buffTime;

		public AddBuffNetMessage(NetworkInstanceId networkInstanceId, int buffIndex, int amount, float buffTime)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			instanceId = networkInstanceId;
			this.buffIndex = buffIndex;
			this.amount = amount;
			this.buffTime = buffTime;
		}

		public AddBuffNetMessage(NetworkInstanceId networkInstanceId, BuffIndex buffIndex, int amount, float buffTime)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected I4, but got Unknown
			instanceId = networkInstanceId;
			this.buffIndex = (int)buffIndex;
			this.amount = amount;
			this.buffTime = buffTime;
		}

		public AddBuffNetMessage(NetworkInstanceId networkInstanceId, BuffDef buffDef, int amount, float buffTime)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected I4, but got Unknown
			instanceId = networkInstanceId;
			buffIndex = (int)buffDef.buffIndex;
			this.amount = amount;
			this.buffTime = buffTime;
		}

		public AddBuffNetMessage()
		{
		}

		public void Deserialize(NetworkReader reader)
		{
			//IL_0003: 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)
			instanceId = reader.ReadNetworkId();
			buffIndex = reader.ReadInt32();
			amount = reader.ReadInt32();
			buffTime = reader.ReadSingle();
		}

		public void OnReceived()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active)
			{
				return;
			}
			GameObject val = Util.FindNetworkObject(instanceId);
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			CharacterBody component = val.GetComponent<CharacterBody>();
			if ((Object)(object)component == (Object)null)
			{
				return;
			}
			bool flag = amount <= 0;
			if (flag)
			{
				amount *= -1;
			}
			for (int i = 0; i < amount; i++)
			{
				if (flag)
				{
					component.RemoveBuff((BuffIndex)buffIndex);
				}
				else if (buffTime > 0f)
				{
					component.AddTimedBuff((BuffIndex)buffIndex, buffTime);
				}
				else
				{
					component.AddBuff((BuffIndex)buffIndex);
				}
			}
		}

		public void Serialize(NetworkWriter writer)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			writer.Write(instanceId);
			writer.Write(buffIndex);
			writer.Write(amount);
			writer.Write(buffTime);
		}
	}
	public class TimeScaleChangeNetMessage : INetMessage, ISerializableObject
	{
		public float timeScaleChangeAmount;

		public TimeScaleChangeNetMessage(float value)
		{
			timeScaleChangeAmount = value;
		}

		public TimeScaleChangeNetMessage()
		{
		}

		public void Deserialize(NetworkReader reader)
		{
			timeScaleChangeAmount = reader.ReadSingle();
		}

		public void OnReceived()
		{
			Time.timeScale = timeScaleChangeAmount;
		}

		public void Serialize(NetworkWriter writer)
		{
			writer.Write(timeScaleChangeAmount);
		}
	}
	public class Assets
	{
		public struct EntityStateMachineAdditionInfo
		{
			public string entityStateMachineName;

			public Type initialStateType;

			public Type mainStateType;
		}

		public static ModdedBodyFlag SprintAllTime = CharacterBodyAPI.ReserveBodyFlag();

		public static ModdedBodyFlag ImmuneToVoidFog = CharacterBodyAPI.ReserveBodyFlag();

		public static BuffDef BunnyHopBuff = Utils.CreateBuff("bapiBunnyHop", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true);

		public static BuffDef StrafeBuff = Utils.CreateBuff("bapiStrafing", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true);

		public static ModdedDamageType InstakillNoChampion = DamageAPI.ReserveDamageType();

		public static ModdedDamageType InstakillChampion = DamageAPI.ReserveDamageType();

		public static ModdedDamageType BruiseNoChampion = DamageAPI.ReserveDamageType();

		public static ModdedDamageType BruiseChampion = DamageAPI.ReserveDamageType();
	}
	public class LanguageTokensToAddOnLoad : IDisposable
	{
		public static List<LanguageTokensToAddOnLoad> languageTokensToAddOnLoad = new List<LanguageTokensToAddOnLoad>();

		public string language;

		public string token;

		public string output;

		public LanguageTokensToAddOnLoad(string token, string output, string language)
		{
			this.language = language;
			this.token = token;
			this.output = output;
			languageTokensToAddOnLoad.Add(this);
		}

		public void Dispose()
		{
			languageTokensToAddOnLoad.Remove(this);
			Utils.AddLanguageToken(token, output, language);
		}
	}
	public class Section : IDisposable
	{
		public static List<Section> sections = new List<Section>();

		public static Dictionary<string, Section> sectionByName = new Dictionary<string, Section>();

		public string name;

		public Color color;

		public HGButton button;

		public List<Row> rows = new List<Row>();

		public Section(string sectionName, Color color)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Expected O, but got Unknown
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			name = sectionName;
			this.color = color;
			sections.Add(this);
			sectionByName.Add(name, this);
			button = Object.Instantiate<HGButton>(BrynzaAPI.loadoutSectionButton, BrynzaAPI.loadoutSectionHolder.transform);
			LanguageTextMeshController component = ((Component)button).gameObject.GetComponent<LanguageTextMeshController>();
			component.token = name;
			((UnityEvent)((Button)button).onClick).AddListener(new UnityAction(SelectSection));
			((MPButton)button).requiredTopLayer = null;
			ColorBlock colors = ((Selectable)button).colors;
			color.a = 0.2f;
			((ColorBlock)(ref colors)).normalColor = color;
			((ColorBlock)(ref colors)).highlightedColor = color;
			color.a = 0.5f;
			((ColorBlock)(ref colors)).selectedColor = color;
			((Selectable)button).colors = colors;
			void SelectSection()
			{
				Utils.SelectRowsSection(name);
			}
		}

		public void Dispose()
		{
			if (sections.Contains(this))
			{
				sections.Remove(this);
			}
			if (sectionByName.ContainsKey(name))
			{
				sectionByName.Remove(name);
			}
			if ((Object)(object)button != (Object)null)
			{
				Object.Destroy((Object)(object)((Component)button).gameObject);
			}
		}
	}
	public interface IOnProjectileExplosionDetonate
	{
		void OnProjectileExplosionDetonate(BlastAttack blastAttack, Result result);
	}
	[RequireComponent(typeof(ProjectileExplosion))]
	public class RocketJumpComponent : MonoBehaviour, IOnProjectileExplosionDetonate
	{
		public enum RocketJumpFiltering
		{
			OnlySelf,
			OnlyTeammates,
			Everyone
		}

		public float force = 3000f;

		public AnimationCurve verticalForceReduction = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f);

		public float radiusMultiplier = 1.25f;

		public bool disableAirControl = true;

		public bool applyStrafing = true;

		public RocketJumpFiltering rocketJumpFiltering;

		public void OnProjectileExplosionDetonate(BlastAttack blastAttack, Result result)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			Collider[] array = Physics.OverlapSphere(blastAttack.position, blastAttack.radius * radiusMultiplier);
			List<CharacterBody> list = new List<CharacterBody>();
			Collider[] array2 = array;
			Vector3 val3 = default(Vector3);
			foreach (Collider val in array2)
			{
				CharacterBody body = ((Component)val).GetComponent<CharacterBody>();
				if (!Object.op_Implicit((Object)(object)body) || list.Contains(body))
				{
					continue;
				}
				list.Add(body);
				bool flag = false;
				switch (rocketJumpFiltering)
				{
				case RocketJumpFiltering.Everyone:
					flag = true;
					break;
				case RocketJumpFiltering.OnlyTeammates:
					if (Object.op_Implicit((Object)(object)body.teamComponent) && body.teamComponent.teamIndex == blastAttack.teamIndex)
					{
						flag = true;
					}
					break;
				case RocketJumpFiltering.OnlySelf:
					if (Object.op_Implicit((Object)(object)blastAttack.attacker) && (Object)(object)((Component)body).gameObject == (Object)(object)blastAttack.attacker)
					{
						flag = true;
					}
					break;
				}
				if (!flag)
				{
					continue;
				}
				Bounds bounds = val.bounds;
				Vector3 val2 = ((Bounds)(ref bounds)).center - blastAttack.position;
				Vector3 normalized = ((Vector3)(ref val2)).normalized;
				((Vector3)(ref val3))..ctor(normalized.x, 0f, normalized.z);
				float num = Vector3.Angle(normalized, val3);
				float num2 = num / 90f;
				float num3 = verticalForceReduction.Evaluate(num2);
				normalized.y *= verticalForceReduction.Evaluate(num2);
				if (Object.op_Implicit((Object)(object)body.characterMotor))
				{
					if (body.characterMotor.velocity.y < 0f)
					{
						body.characterMotor.velocity.y = 0f;
					}
					body.characterMotor.ApplyForce(normalized * force, true, disableAirControl);
				}
				else if (Object.op_Implicit((Object)(object)body.rigidbody))
				{
					if (body.characterMotor.velocity.y < 0f)
					{
						body.rigidbody.velocity = new Vector3(body.rigidbody.velocity.x, 0f, body.rigidbody.velocity.y);
					}
					body.rigidbody.AddForce(normalized * force, (ForceMode)1);
				}
				if (applyStrafing && Object.op_Implicit((Object)(object)body.characterMotor) && body.GetBuffCount(Assets.StrafeBuff) <= 0)
				{
					body.AddBuff(Assets.StrafeBuff);
					body.characterMotor.AddOnHitGroundServerDelegate(sus);
				}
				void sus(CharacterMotor characterMotor, ref HitGroundInfo hitGroundInfo)
				{
					body.characterMotor.RemoveOnHitGroundServerDelegate(sus);
					body.RemoveBuff(Assets.StrafeBuff);
				}
			}
		}
	}
	[RequireComponent(typeof(ProjectileControlle

plugins/BrynzaInterop.dll

Decompiled 3 weeks ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using Microsoft.CodeAnalysis;
using RoR2;
using RoR2.Skills;
using RoR2.UI;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: InternalsVisibleTo("BrynzaAPI")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BrynzaInterop")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+745b4a33971a5fd5852844fa0df676e18c6130bb")]
[assembly: AssemblyProduct("BrynzaInterop")]
[assembly: AssemblyTitle("BrynzaInterop")]
[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.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[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 BrynzaAPI.Interop
{
	public static class BrynzaInterop
	{
		public static List<GenericSkill> GetExtraSkills(GenericSkill genericSkill)
		{
			GenericSkill genericSkill2 = genericSkill;
			return (genericSkill2.bapi_extraSkills != null) ? (from i in Enumerable.Range(0, genericSkill2.bapi_extraSkills.Count)
				select (GenericSkill)((genericSkill2.bapi_extraSkills[i] is GenericSkill) ? /*isinst with value type is only supported in some contexts*/: null)).ToList() : null;
		}

		public static void SetExtraSkills(GenericSkill genericSkill, List<object> list)
		{
			genericSkill.bapi_extraSkills = list;
		}

		public static void AddExtraSkill(GenericSkill genericSkill, GenericSkill obj)
		{
			if (genericSkill.bapi_extraSkills != null)
			{
				genericSkill.bapi_extraSkills.Add(obj);
				return;
			}
			genericSkill.bapi_extraSkills = new List<object>();
			genericSkill.bapi_extraSkills.Add(obj);
		}

		public static void RemoveExtraSkill(GenericSkill genericSkill, GenericSkill obj)
		{
			if (genericSkill.bapi_extraSkills != null && genericSkill.bapi_extraSkills.Contains(obj))
			{
				genericSkill.bapi_extraSkills.Remove(obj);
			}
		}

		public static void LinkSkill(GenericSkill genericSkil, object obj)
		{
			genericSkil.bapi_linkedSkill = obj;
		}

		public static GenericSkill GetLinkedSkill(GenericSkill genericSkil)
		{
			return (GenericSkill)((genericSkil.bapi_linkedSkill != null && genericSkil.bapi_linkedSkill is GenericSkill) ? /*isinst with value type is only supported in some contexts*/: null);
		}

		public static void AddBonusSkill(SkillLocator skillLocator, GenericSkill genericSkill)
		{
			if (skillLocator.bapi_bonusSkills != null)
			{
				skillLocator.bapi_bonusSkills.Add(genericSkill);
				return;
			}
			skillLocator.bapi_bonusSkills = new List<object>();
			skillLocator.bapi_bonusSkills.Add(genericSkill);
		}

		public static void RemoveBonusSkill(SkillLocator skillLocator, GenericSkill genericSkill)
		{
			if (skillLocator.bapi_bonusSkills != null && skillLocator.bapi_bonusSkills.Contains(genericSkill))
			{
				skillLocator.bapi_bonusSkills.Remove(genericSkill);
			}
		}

		public static List<GenericSkill> GetBonusSkills(SkillLocator skillLocator)
		{
			SkillLocator skillLocator2 = skillLocator;
			return (skillLocator2.bapi_bonusSkills != null) ? (from i in Enumerable.Range(0, skillLocator2.bapi_bonusSkills.Count)
				select (GenericSkill)((skillLocator2.bapi_bonusSkills[i] is GenericSkill) ? /*isinst with value type is only supported in some contexts*/: null)).ToList() : null;
		}

		public static Vector3 GetVelocityOverride(CharacterMotor characterMotor)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return characterMotor.bapi_velocityOverride;
		}

		public static void SetVelocityOverride(CharacterMotor characterMotor, Vector3 value)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			characterMotor.bapi_velocityOverride = value;
		}

		public static bool GetKeepVelocityOnMoving(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_keepVelocityOnMoving;
		}

		public static void SetKeepVelocityOnMoving(CharacterMotor characterMotor, bool value)
		{
			characterMotor.bapi_keepVelocityOnMoving = value;
		}

		public static float GetConsistentAcceleration(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_consistentAcceleration;
		}

		public static void SetConsistentAcceleration(CharacterMotor characterMotor, float value)
		{
			characterMotor.bapi_consistentAcceleration = value;
		}

		public static bool GetFluidMaxDistanceDelta(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_fluidMaxDistanceDelta;
		}

		public static void SetFluidMaxDistanceDelta(CharacterMotor characterMotor, bool value)
		{
			characterMotor.bapi_fluidMaxDistanceDelta = value;
		}

		public static bool GetStrafe(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_strafe;
		}

		public static void SetStrafe(CharacterMotor characterMotor, bool value)
		{
			characterMotor.bapi_strafe = value;
		}

		public static bool GetBunnyHop(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_bunnyHop;
		}

		public static void SetBunnyHop(CharacterMotor characterMotor, bool value)
		{
			characterMotor.bapi_bunnyHop = value;
		}

		public static int GetBaseWallJumpCount(CharacterBody characterBody)
		{
			return characterBody.bapi_baseWallJumpCount;
		}

		public static void SetBaseWallJumpCount(CharacterBody characterBody, int value)
		{
			characterBody.bapi_baseWallJumpCount = value;
		}

		public static int GetMaxWallJumpCount(CharacterBody characterBody)
		{
			return characterBody.bapi_maxWallJumpCount;
		}

		public static void SetMaxWallJumpCount(CharacterBody characterBody, int value)
		{
			characterBody.bapi_maxWallJumpCount = value;
		}

		public static int GetWallJumpCount(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_wallJumpCount;
		}

		public static void SetWallJumpCount(CharacterMotor characterMotor, int value)
		{
			characterMotor.bapi_wallJumpCount = value;
		}

		public static bool CanApplyAmmoPack(SkillDef skillDef)
		{
			return skillDef.bapi_CanApplyAmmoPack();
		}

		public static void SetStateToMain(EntityStateMachine entityStateMachine)
		{
			entityStateMachine.bapi_SetStateToMain();
		}

		public static List<object> GetIgnoredHealthComponents(BulletAttack bulletAttack)
		{
			return bulletAttack.bapi_ignoredHealthComponentList;
		}

		public static void SetIgnoredHealthComponents(BulletAttack bulletAttack, List<object> value)
		{
			bulletAttack.bapi_ignoredHealthComponentList = value;
		}

		public static bool GetIgnoreHitTargets(BulletAttack bulletAttack)
		{
			return bulletAttack.bapi_ignoreHitTargets;
		}

		public static void SetIgnoreHitTargets(BulletAttack bulletAttack, bool value)
		{
			bulletAttack.bapi_ignoreHitTargets = value;
		}

		public static string GetSection(Row row)
		{
			return row.bapi_section;
		}

		public static void SetSection(Row row, string value)
		{
			row.bapi_section = value;
		}

		public static string GetSection(GenericSkill genericSkill)
		{
			return genericSkill.bapi_section;
		}

		public static void SetSection(GenericSkill genericSkill, string value)
		{
			genericSkill.bapi_section = value;
		}

		public static List<string> GetSections(LoadoutPanelController loadoutPanelController)
		{
			return loadoutPanelController.bapi_sections;
		}

		public static void SetSections(LoadoutPanelController loadoutPanelController, List<string> value)
		{
			loadoutPanelController.bapi_sections = value;
		}
	}
}