Decompiled source of Brynza API v1.11.0

patchers/BrynzaPatcher.dll

Decompiled 6 days 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 Mono.Cecil.Cil;
using MonoMod.Utils;
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+aec1cee244ac95c4df4ea7a111c8c9a87d72eb44")]
[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]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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]
	[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]
	[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);
			PatchSkillLocator(assembly);
			PatchCharacterMotor(assembly);
			PatchProjectileExplosion(assembly);
			PatchBulletAttack(assembly);
			PatchBlastAttack(assembly);
			PatchCharacterBody(assembly);
			PatchCharacterModel(assembly);
			PatchRow(assembly);
			PatchLoadoutPanelController(assembly);
			PatchAimAnimator(assembly);
			PatchEffectDef(assembly);
			PatchHighlight(assembly);
			PatchDccsPool(assembly);
			PatchInventory(assembly);
		}

		private static void PatchInteractor(AssemblyDefinition assembly, TypeDefinition characterBody)
		{
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "Interactor");
			if (type != null)
			{
				MethodDefinition val = Extensions.FindMethod(type, "Awake", true);
				if (val == null)
				{
					val = new MethodDefinition("Awake", (MethodAttributes)6, assembly.MainModule.ImportReference(typeof(void)));
					ILProcessor iLProcessor = val.Body.GetILProcessor();
					iLProcessor.Emit(OpCodes.Ret);
					type.Methods.Add(val);
				}
				if (characterBody != null)
				{
					type.Fields.Add(new FieldDefinition("bapi_characterBody", (FieldAttributes)6, assembly.MainModule.ImportReference((TypeReference)(object)characterBody)));
				}
			}
		}

		private static void PatchInventory(AssemblyDefinition assembly)
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "Inventory");
			TypeDefinition type2 = assembly.MainModule.GetType("RoR2", "CharacterMaster");
			if (type != null)
			{
				MethodDefinition val = Extensions.FindMethod(type, "Awake", true);
				if (val == null)
				{
					val = new MethodDefinition("Awake", (MethodAttributes)6, assembly.MainModule.ImportReference(typeof(void)));
					ILProcessor iLProcessor = val.Body.GetILProcessor();
					iLProcessor.Emit(OpCodes.Ret);
					type.Methods.Add(val);
				}
				if (type2 != null)
				{
					type.Fields.Add(new FieldDefinition("bapi_characterMaster", (FieldAttributes)6, assembly.MainModule.ImportReference((TypeReference)(object)type2)));
				}
			}
		}

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

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

		private static void PatchHighlight(AssemblyDefinition assembly)
		{
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "Highlight");
			TypeDefinition type2 = assembly.MainModule.GetType("EntityStates", "SerializableEntityStateType");
			FieldDefinition val = Extensions.FindField(type, "targetRendererList");
			FieldDefinition val2 = Extensions.FindField(type2, "_typeName");
			val.CustomAttributes.Add(val2.CustomAttributes[0]);
		}

		private static void PatchCharacterBody(AssemblyDefinition assembly)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Expected O, but got Unknown
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Expected O, but got Unknown
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: 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
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "CharacterBody");
			TypeDefinition type2 = assembly.MainModule.GetType("RoR2.Run/FixedTimeStamp");
			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))));
				type.Fields.Add(new FieldDefinition("bapi_clientBuffs", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(int[]))));
				if (type2 != null)
				{
					type.Fields.Add(new FieldDefinition("bapi_lastJumpTime", (FieldAttributes)6, assembly.MainModule.ImportReference((TypeReference)(object)type2)));
				}
				type.Fields.Add(new FieldDefinition("bapi_positionDelta", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3))));
				type.Fields.Add(new FieldDefinition("bapi_previousPosition", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3))));
			}
			PatchInteractor(assembly, type);
		}

		private static void PatchAimAnimator(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", "AimAnimator");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_pitchClipCycleStart", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float))));
				type.Fields.Add(new FieldDefinition("bapi_yawClipCycleStart", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float))));
			}
		}

		private static void PatchEffectDef(AssemblyDefinition assembly)
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "EffectData");
			TypeDefinition type2 = assembly.MainModule.GetType("RoR2", "EffectComponent");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_scale", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3?))));
				if (type2 != null)
				{
					type.Fields.Add(new FieldDefinition("bapi_effectInstance", (FieldAttributes)6, assembly.MainModule.ImportReference((TypeReference)(object)type2)));
				}
			}
		}

		private static void PatchCharacterModel(AssemblyDefinition assembly)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2.CharacterModel/RendererInfo");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_dontFadeCloseOn", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
			}
		}

		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_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
			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))));
				type.Fields.Add(new FieldDefinition("bapi_bonusForce", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3))));
				type.Fields.Add(new FieldDefinition("bapi_noWeaponIfOwner", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
			}
		}

		private static void PatchBlastAttack(AssemblyDefinition assembly)
		{
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "BlastAttack");
			TypeDefinition type2 = assembly.MainModule.GetType("RoR2.BlastAttack/HitPoint");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_endPosition", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3?))));
				if (type2 != null)
				{
					type2.Fields.Add(new FieldDefinition("bapi_nearestPositionOnLineFromHitPosition", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3?))));
				}
			}
		}

		private static void PatchDamageInfo(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", "DamageInfo");
			if (type != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_forceMassIsOne", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
				type.Fields.Add(new FieldDefinition("bapi_forceAlwaysApply", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
				type.Fields.Add(new FieldDefinition("bapi_forceDisableAirControlUntilCollision", (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
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: 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))));
				type.Fields.Add(new FieldDefinition("bapi_sprint", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
			}
		}

		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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			TypeDefinition type = assembly.MainModule.GetType("RoR2", "SkillLocator");
			TypeDefinition type2 = assembly.MainModule.GetType("RoR2", "GenericSkill");
			if (type != null && type2 != null)
			{
				type.Fields.Add(new FieldDefinition("bapi_sprintSkill", (FieldAttributes)6, assembly.MainModule.ImportReference((TypeReference)(object)type2)));
			}
		}

		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
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Expected O, but got Unknown
			//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Expected O, but got Unknown
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Expected O, but got Unknown
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: 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))));
				type.Fields.Add(new FieldDefinition("bapi_airControlFromVelocityAdd", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float))));
				type.Fields.Add(new FieldDefinition("bapi_useMaxAirVelocity", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(bool))));
				type.Fields.Add(new FieldDefinition("bapi_maxAirVelocity", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(float))));
				type.Fields.Add(new FieldDefinition("bapi_positionDelta", (FieldAttributes)6, assembly.MainModule.ImportReference(typeof(Vector3))));
			}
		}

		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 6 days 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 BepInEx.Logging;
using BrynzaAPI.Interop;
using EntityStates;
using Grumpy;
using HG.Coroutines;
using HG.Reflection;
using HarmonyLib;
using IL.EntityStates;
using IL.RoR2;
using IL.RoR2.CameraModes;
using IL.RoR2.Projectile;
using IL.RoR2.UI;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using MonoMod.Utils;
using On.EntityStates;
using On.RoR2;
using On.RoR2.UI;
using ProjectilesConfigurator;
using R2API;
using R2API.AddressReferencedAssets;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.CameraModes;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using RoR2BepInExPack.Utilities;
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+aec1cee244ac95c4df4ea7a111c8c9a87d72eb44")]
[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]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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.11.0")]
	[BepInDependency("com.bepis.r2api", "5.2.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[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 delegate bool ExtraKeepVelocityOnMoving(CharacterMotor characterMotor);

		public delegate bool ExtraStrafe(CharacterMotor characterMotor);

		public delegate bool ExtraBunnyHop(CharacterMotor characterMotor);

		public delegate bool ExtraUseMaxAirVelocity(CharacterMotor characterMotor);

		public delegate float ExtraAirControlFromVelocityAdd(CharacterMotor characterMotor);

		public delegate void DynamicFloatStat(CharacterBody characterBody, ref float value);

		public delegate void PickupCreated(CreatePickupInfo createPickupInfo, GameObject pickup);

		public delegate void TestDelegate();

		public struct BlastAttack_CollectHitsValues
		{
			public Vector3 point1;

			public Vector3 point2;

			public float radius;

			public int layer;
		}

		[HarmonyPatch]
		private class Patches
		{
			[HarmonyPatch(/*Could not decode attribute arguments.*/)]
			[HarmonyILManipulator]
			private static void ConfigFile_Reload(ILContext il)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Expected O, but got Unknown
				//IL_0062: 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_00e5: Unknown result type (might be due to invalid IL or missing references)
				ILCursor val = new ILCursor(il);
				if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 5),
					(Instruction x) => ILPatternMatchingExt.MatchLdstr(x, "#")
				}))
				{
					val.Emit(OpCodes.Ldloc, 5);
					val.EmitDelegate<Action<string>>((Action<string>)GetDefaultValue);
					if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2]
					{
						(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 9),
						(Instruction x) => ILPatternMatchingExt.MatchLdloca(x, 10)
					}))
					{
						val.Emit(OpCodes.Ldarg_0);
						val.Emit(OpCodes.Ldloc, 9);
						val.EmitDelegate<Action<ConfigFile, ConfigDefinition>>((Action<ConfigFile, ConfigDefinition>)SetDefaultValue);
					}
					else
					{
						Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!"));
					}
				}
				else
				{
					Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
				}
				static void GetDefaultValue(string line)
				{
					if (line.Contains("# Default value:"))
					{
						pendingDefaultValue = line.Replace("# Default value: ", "");
					}
				}
				static void SetDefaultValue(ConfigFile configFile, ConfigDefinition configDefinition)
				{
					if (pendingDefaultValue != null)
					{
						if (defaultConfigValues.ContainsKey(configFile))
						{
							Dictionary<ConfigDefinition, string> dictionary = defaultConfigValues[configFile];
							if (!dictionary.ContainsKey(configDefinition))
							{
								dictionary[configDefinition] = pendingDefaultValue;
							}
						}
						else
						{
							Dictionary<ConfigDefinition, string> value = new Dictionary<ConfigDefinition, string> { { configDefinition, pendingDefaultValue } };
							defaultConfigValues.Add(configFile, value);
						}
					}
				}
			}
		}

		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;
				}
			}

			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)
					{
						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>__CameraModePlayerBasic_CollectLookInputInternal;

			public static Manipulator <1>__GenericSkill_Awake;

			public static Manipulator <2>__CharacterMotor_PreMove;

			public static Manipulator <3>__ProjectileExplosion_DetonateServer;

			public static Manipulator <4>__GenericCharacterMain_ApplyJumpVelocity;

			public static hook_OnCharacterHitGroundServer <5>__GlobalEventManager_OnCharacterHitGroundServer;

			public static CollectContentPackProvidersDelegate <6>__ContentManager_collectContentPackProviders;

			public static hook_Start <7>__Run_Start;

			public static hook_OnLoad <8>__RoR2Application_OnLoad;

			public static hook_OnEnable <9>__CharacterSelectController_OnEnable;

			public static Manipulator <10>__FogDamageController_MyFixedUpdate;

			public static Manipulator <11>__GenericCharacterMain_ProcessJump_bool;

			public static Manipulator <12>__CharacterMotor_OnLanded;

			public static Manipulator <13>__CharacterBody_RecalculateStats;

			public static Manipulator <14>__CameraRigController_LateUpdate;

			public static hook_ProcessHit <15>__BulletAttack_ProcessHit;

			public static Manipulator <16>__Row_FromSkillSlot;

			public static hook_DestroyRows <17>__LoadoutPanelController_DestroyRows;

			public static hook_FinishSetup <18>__Row_FinishSetup;

			public static Manipulator <19>__Row_FromSkin;

			public static hook_UpdateRendererMaterials <20>__CharacterModel_UpdateRendererMaterials;

			public static Manipulator <21>__CharacterModel_UpdateMaterials;

			public static Manipulator <22>__BulletAttack_DefaultHitCallbackImplementation;

			public static Manipulator <23>__AimAnimator_UpdateAnimatorParameters;

			public static hook_TriggerJumpEventGlobally <24>__CharacterBody_TriggerJumpEventGlobally;

			public static hook_Awake <25>__CharacterBody_Awake;

			public static hook_Copy <26>__EffectData_Copy;

			public static hook_Reset <27>__EffectData_Reset;

			public static hook_Serialize <28>__EffectData_Serialize;

			public static hook_Deserialize <29>__EffectData_Deserialize;

			public static Manipulator <30>__EffectComponent_Reset;

			public static Manipulator <31>__EffectManager_SpawnEffect_EffectIndex_EffectData_bool;

			public static hook_FixedUpdate <32>__CharacterMotor_FixedUpdate;

			public static Manipulator <33>__CharacterMotor_FixedUpdate1;

			public static hook_RecalculateStats <34>__CharacterBody_RecalculateStats2;

			public static Manipulator <35>__GenericPickupController_CreatePickup;

			public static hook_PerformInputs <36>__GenericCharacterMain_PerformInputs;

			public static Manipulator <37>__BlastAttack_CollectHits;

			public static Manipulator <38>__BlastAttack_HandleHits1;

			public static hook_FixedUpdate <39>__CharacterBody_FixedUpdate;

			public static CanAlwaysSprint <40>__AlwaysSprint;

			public static Func<Vector3, HitPoint, BlastAttack, Vector3> <41>__IAmTooAssedToMakeSmartIlEditsGoMySingleDelegateThatWilDoEverything;

			public static Func<BlastAttack, Vector3?> <42>__GetEndPosition;

			public static Func<Vector3?, bool> <43>__NullableVector3HasValue;

			public static Func<Vector3, float, int, BlastAttack, BlastAttack_CollectHitsValues> <44>__WhatAmIDoing;

			public static <>A{00000001}<HitPoint, BlastAttack> <45>__HandleHitPoint1;

			public static <>F{00000008}<Ray, HitPoint, Ray> <46>__HandleRay1;

			public static <>A{00000008}<GameObject, CreatePickupInfo> <47>__HandlePickupStuff;

			public static Action<EffectData, ProjectileExplosion> <48>__HandleProjectileExplosion_DetonateServer1;

			public static Action<BlastAttack, ProjectileExplosion> <49>__HandleProjectileExplosion_DetonateServer;

			public static EventHandler <50>__ConfigEntry_SettingChanged;
		}

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

		public const string ModName = "Brynza API";

		public const string ModVer = "1.11.0";

		public static FixedConditionalWeakTable<CharacterMotor, List<OnHitGroundServerDelegate>> onHitGroundServerDictionary = new FixedConditionalWeakTable<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";

		public static Dictionary<ConfigFile, Dictionary<ConfigDefinition, string>> defaultConfigValues = new Dictionary<ConfigFile, Dictionary<ConfigDefinition, string>>();

		private static List<ExtraKeepVelocityOnMoving> GetExtraKeepVelocityOnMovingDelegates = new List<ExtraKeepVelocityOnMoving>();

		public static Material DebugMaterial;

		private static List<ExtraStrafe> GetExtraStrafeDelegates = new List<ExtraStrafe>();

		public static List<ExtraBunnyHop> GetExtraBunnyHopDelegates = new List<ExtraBunnyHop>();

		public static List<ExtraUseMaxAirVelocity> GetExtraUseMaxAirVelocityDelegates = new List<ExtraUseMaxAirVelocity>();

		private static List<ExtraAirControlFromVelocityAdd> GetExtraAirControlFromVelocityAddDelegates = new List<ExtraAirControlFromVelocityAdd>();

		private static Harmony harmonyPatcher;

		private static bool debugExplosion = false;

		private static bool useDynamicStats;

		public static bool useMoveSpeedDynamicStat;

		private static bool hooksEnabled = false;

		private static string pendingDefaultValue;

		private static ExtraStatHookEventArgs ExtraStatMods;

		public static float strafeMultiplier = 15f;

		public static float maxAirVelocityReduceValue = 6f;

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

		public static bool proejctilesConfiguratorEnabled { get; private set; }

		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 BaseUnityPlugin instance { get; private set; }

		public static ManualLogSource Log { get; private set; }

		public static event Action<GameObject> onSniperHurtboxAdded;

		public static event Action<GameObject> onSniperHurtboxRemoved;

		public static event ExtraKeepVelocityOnMoving GetExtraKeepVelocityOnMoving
		{
			add
			{
				GetExtraKeepVelocityOnMovingDelegates.Add(value);
			}
			remove
			{
				GetExtraKeepVelocityOnMovingDelegates.Remove(value);
			}
		}

		public static event ExtraStrafe GetExtraStrafe
		{
			add
			{
				GetExtraStrafeDelegates.Add(value);
			}
			remove
			{
				GetExtraStrafeDelegates.Remove(value);
			}
		}

		public static event ExtraBunnyHop GetExtraBunnyHop
		{
			add
			{
				GetExtraBunnyHopDelegates.Add(value);
			}
			remove
			{
				GetExtraBunnyHopDelegates.Remove(value);
			}
		}

		public static event ExtraUseMaxAirVelocity GetExtraUseMaxAirVelocity
		{
			add
			{
				GetExtraUseMaxAirVelocityDelegates.Add(value);
			}
			remove
			{
				GetExtraUseMaxAirVelocityDelegates.Remove(value);
			}
		}

		public static event ExtraAirControlFromVelocityAdd GetExtraAirControlFromVelocityAdd
		{
			add
			{
				GetExtraAirControlFromVelocityAddDelegates.Add(value);
			}
			remove
			{
				GetExtraAirControlFromVelocityAddDelegates.Remove(value);
			}
		}

		public static event DynamicFloatStat GetDynamicRegen;

		public static event DynamicFloatStat GetDynamicMoveSpeed;

		public static event DynamicFloatStat GetDynamicAttackSpeed;

		public static event PickupCreated OnPickupCreated;

		private static event ExtraStatHookEventHandler _getExtraStatCoefficients;

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

		public static bool InvokeExtraKeepVelocityOnMovingDelegates(CharacterMotor characterMotor)
		{
			foreach (ExtraKeepVelocityOnMoving getExtraKeepVelocityOnMovingDelegate in GetExtraKeepVelocityOnMovingDelegates)
			{
				if (getExtraKeepVelocityOnMovingDelegate(characterMotor))
				{
					return true;
				}
			}
			return false;
		}

		public static bool InvokeExtraStrafeDelegates(CharacterMotor characterMotor)
		{
			foreach (ExtraStrafe getExtraStrafeDelegate in GetExtraStrafeDelegates)
			{
				if (getExtraStrafeDelegate(characterMotor))
				{
					return true;
				}
			}
			return false;
		}

		public static bool InvokeExtraBunnyHopDelegates(CharacterMotor characterMotor)
		{
			foreach (ExtraBunnyHop getExtraBunnyHopDelegate in GetExtraBunnyHopDelegates)
			{
				if (getExtraBunnyHopDelegate(characterMotor))
				{
					return true;
				}
			}
			return false;
		}

		public static bool InvokeExtraUseMaxAirVelocityDelegates(CharacterMotor characterMotor)
		{
			foreach (ExtraUseMaxAirVelocity getExtraUseMaxAirVelocityDelegate in GetExtraUseMaxAirVelocityDelegates)
			{
				if (getExtraUseMaxAirVelocityDelegate(characterMotor))
				{
					return true;
				}
			}
			return false;
		}

		public static float InvokeExtraAirControlFromVelocityAddDelegates(CharacterMotor characterMotor)
		{
			float num = 0f;
			foreach (ExtraAirControlFromVelocityAdd getExtraAirControlFromVelocityAddDelegate in GetExtraAirControlFromVelocityAddDelegates)
			{
				num += getExtraAirControlFromVelocityAddDelegate(characterMotor);
			}
			return num;
		}

		public void Awake()
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: 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_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: 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)
			instance = (BaseUnityPlugin)(object)this;
			Log = ((BaseUnityPlugin)this).Logger;
			ConfigMain = ((BaseUnityPlugin)this).Config;
			proejctilesConfiguratorEnabled = Chainloader.PluginInfos.ContainsKey("com.brynzananas.projectilesconfigurator");
			if (proejctilesConfiguratorEnabled)
			{
				ModCompatibilities.ProjectilesConfiguratorCompatibility.Init();
			}
			Assets.BunnyHopBuff = Utils.CreateBuff("bapiBunnyHop", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true);
			Assets.StrafeBuff = Utils.CreateBuff("bapiStrafing", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true);
			Assets.KeepVelocityBuff = Utils.CreateBuff("bapiKeepVelocity", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true);
			Assets.UseMaxAirVelocityBuff = Utils.CreateBuff("bapiUseMaxAirVelocity", null, Color.white, canStack: false, isDebuff: false, isCooldown: false, isHidden: true, ignoreGrowthNectar: true);
			NetworkingAPI.RegisterMessageType<SyncConfigsNetMessage>();
			NetworkingAPI.RegisterMessageType<RequestSyncConfigsNetMessage>();
			NetworkingAPI.RegisterMessageType<TimeScaleChangeNetMessage>();
			NetworkingAPI.RegisterMessageType<RocketJumpComponent.RocketJumpMessage>();
			NetworkingAPI.RegisterMessageType<RocketJumpComponent.RocketJumpServerMessage>();
			NetworkingAPI.RegisterMessageType<RocketJumpComponent.RocketJumpFailServerMessage>();
			riskOfOptionsLoaded = Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
			loadoutSectionButton = ((Component)PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/CharacterSelectUIMain.prefab").WaitForCompletion(), "LoadoutSectionButton", false).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 static 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_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
			//IL_00ab: 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_00b6: Expected O, but got Unknown
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Expected O, but got Unknown
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Expected O, but got Unknown
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Expected O, but got Unknown
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Expected O, but got Unknown
			//IL_0150: 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_015b: Expected O, but got Unknown
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Expected O, but got Unknown
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Expected O, but got Unknown
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Expected O, but got Unknown
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Expected O, but got Unknown
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Expected O, but got Unknown
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_021b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Expected O, but got Unknown
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0242: Expected O, but got Unknown
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Expected O, but got Unknown
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Expected O, but got Unknown
			//IL_02d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Expected O, but got Unknown
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_0335: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Expected O, but got Unknown
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Expected O, but got Unknown
			//IL_034b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Expected O, but got Unknown
			//IL_036c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Unknown result type (might be due to invalid IL or missing references)
			//IL_0377: Expected O, but got Unknown
			//IL_038d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Expected O, but got Unknown
			//IL_03ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b9: Expected O, but got Unknown
			//IL_03cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Expected O, but got Unknown
			//IL_03f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fb: Expected O, but got Unknown
			//IL_0411: Unknown result type (might be due to invalid IL or missing references)
			//IL_0416: Unknown result type (might be due to invalid IL or missing references)
			//IL_041c: Expected O, but got Unknown
			//IL_0432: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Unknown result type (might be due to invalid IL or missing references)
			//IL_043d: Expected O, but got Unknown
			//IL_0453: Unknown result type (might be due to invalid IL or missing references)
			//IL_0458: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Expected O, but got Unknown
			//IL_0474: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_047f: Expected O, but got Unknown
			//IL_0495: Unknown result type (might be due to invalid IL or missing references)
			//IL_049a: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Expected O, but got Unknown
			//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f7: Expected O, but got Unknown
			//IL_0521: Unknown result type (might be due to invalid IL or missing references)
			//IL_0527: Expected O, but got Unknown
			//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c1: Expected O, but got Unknown
			//IL_0574: Unknown result type (might be due to invalid IL or missing references)
			//IL_057b: Expected O, but got Unknown
			//IL_0537: Unknown result type (might be due to invalid IL or missing references)
			//IL_053c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0542: Expected O, but got Unknown
			//IL_05c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cf: Expected O, but got Unknown
			//IL_05f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0600: Expected O, but got Unknown
			//IL_062a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0631: Expected O, but got Unknown
			//IL_065b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0662: Expected O, but got Unknown
			//IL_058b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0590: Unknown result type (might be due to invalid IL or missing references)
			//IL_0596: Expected O, but got Unknown
			//IL_0672: Unknown result type (might be due to invalid IL or missing references)
			//IL_0677: Unknown result type (might be due to invalid IL or missing references)
			//IL_067d: Expected O, but got Unknown
			//IL_0693: Unknown result type (might be due to invalid IL or missing references)
			//IL_0698: Unknown result type (might be due to invalid IL or missing references)
			//IL_069e: Expected O, but got Unknown
			//IL_06b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bf: Expected O, but got Unknown
			//IL_06d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06da: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e0: Expected O, but got Unknown
			//IL_06f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0701: Expected O, but got Unknown
			//IL_0717: Unknown result type (might be due to invalid IL or missing references)
			//IL_071c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0722: Expected O, but got Unknown
			//IL_074e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0758: Expected O, but got Unknown
			//IL_0738: Unknown result type (might be due to invalid IL or missing references)
			//IL_073d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0743: Expected O, but got Unknown
			if (!hooksEnabled)
			{
				hooksEnabled = true;
				object obj = <>O.<0>__CameraModePlayerBasic_CollectLookInputInternal;
				if (obj == null)
				{
					Manipulator val = CameraModePlayerBasic_CollectLookInputInternal;
					<>O.<0>__CameraModePlayerBasic_CollectLookInputInternal = val;
					obj = (object)val;
				}
				CameraModePlayerBasic.CollectLookInputInternal += (Manipulator)obj;
				object obj2 = <>O.<1>__GenericSkill_Awake;
				if (obj2 == null)
				{
					Manipulator val2 = GenericSkill_Awake;
					<>O.<1>__GenericSkill_Awake = val2;
					obj2 = (object)val2;
				}
				GenericSkill.Awake += (Manipulator)obj2;
				object obj3 = <>O.<2>__CharacterMotor_PreMove;
				if (obj3 == null)
				{
					Manipulator val3 = CharacterMotor_PreMove;
					<>O.<2>__CharacterMotor_PreMove = val3;
					obj3 = (object)val3;
				}
				CharacterMotor.PreMove += (Manipulator)obj3;
				object obj4 = <>O.<3>__ProjectileExplosion_DetonateServer;
				if (obj4 == null)
				{
					Manipulator val4 = ProjectileExplosion_DetonateServer;
					<>O.<3>__ProjectileExplosion_DetonateServer = val4;
					obj4 = (object)val4;
				}
				ProjectileExplosion.DetonateServer += (Manipulator)obj4;
				object obj5 = <>O.<4>__GenericCharacterMain_ApplyJumpVelocity;
				if (obj5 == null)
				{
					Manipulator val5 = GenericCharacterMain_ApplyJumpVelocity;
					<>O.<4>__GenericCharacterMain_ApplyJumpVelocity = val5;
					obj5 = (object)val5;
				}
				GenericCharacterMain.ApplyJumpVelocity += (Manipulator)obj5;
				object obj6 = <>O.<5>__GlobalEventManager_OnCharacterHitGroundServer;
				if (obj6 == null)
				{
					hook_OnCharacterHitGroundServer val6 = GlobalEventManager_OnCharacterHitGroundServer;
					<>O.<5>__GlobalEventManager_OnCharacterHitGroundServer = val6;
					obj6 = (object)val6;
				}
				GlobalEventManager.OnCharacterHitGroundServer += (hook_OnCharacterHitGroundServer)obj6;
				object obj7 = <>O.<6>__ContentManager_collectContentPackProviders;
				if (obj7 == null)
				{
					CollectContentPackProvidersDelegate val7 = ContentManager_collectContentPackProviders;
					<>O.<6>__ContentManager_collectContentPackProviders = val7;
					obj7 = (object)val7;
				}
				ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj7;
				object obj8 = <>O.<7>__Run_Start;
				if (obj8 == null)
				{
					hook_Start val8 = Run_Start;
					<>O.<7>__Run_Start = val8;
					obj8 = (object)val8;
				}
				Run.Start += (hook_Start)obj8;
				object obj9 = <>O.<8>__RoR2Application_OnLoad;
				if (obj9 == null)
				{
					hook_OnLoad val9 = RoR2Application_OnLoad;
					<>O.<8>__RoR2Application_OnLoad = val9;
					obj9 = (object)val9;
				}
				RoR2Application.OnLoad += (hook_OnLoad)obj9;
				object obj10 = <>O.<9>__CharacterSelectController_OnEnable;
				if (obj10 == null)
				{
					hook_OnEnable val10 = CharacterSelectController_OnEnable;
					<>O.<9>__CharacterSelectController_OnEnable = val10;
					obj10 = (object)val10;
				}
				CharacterSelectController.OnEnable += (hook_OnEnable)obj10;
				object obj11 = <>O.<10>__FogDamageController_MyFixedUpdate;
				if (obj11 == null)
				{
					Manipulator val11 = FogDamageController_MyFixedUpdate;
					<>O.<10>__FogDamageController_MyFixedUpdate = val11;
					obj11 = (object)val11;
				}
				FogDamageController.MyFixedUpdate += (Manipulator)obj11;
				object obj12 = <>O.<11>__GenericCharacterMain_ProcessJump_bool;
				if (obj12 == null)
				{
					Manipulator val12 = GenericCharacterMain_ProcessJump_bool;
					<>O.<11>__GenericCharacterMain_ProcessJump_bool = val12;
					obj12 = (object)val12;
				}
				GenericCharacterMain.ProcessJump_bool += (Manipulator)obj12;
				object obj13 = <>O.<12>__CharacterMotor_OnLanded;
				if (obj13 == null)
				{
					Manipulator val13 = CharacterMotor_OnLanded;
					<>O.<12>__CharacterMotor_OnLanded = val13;
					obj13 = (object)val13;
				}
				CharacterMotor.OnLanded += (Manipulator)obj13;
				object obj14 = <>O.<13>__CharacterBody_RecalculateStats;
				if (obj14 == null)
				{
					Manipulator val14 = CharacterBody_RecalculateStats;
					<>O.<13>__CharacterBody_RecalculateStats = val14;
					obj14 = (object)val14;
				}
				CharacterBody.RecalculateStats += (Manipulator)obj14;
				object obj15 = <>O.<14>__CameraRigController_LateUpdate;
				if (obj15 == null)
				{
					Manipulator val15 = CameraRigController_LateUpdate;
					<>O.<14>__CameraRigController_LateUpdate = val15;
					obj15 = (object)val15;
				}
				CameraRigController.LateUpdate += (Manipulator)obj15;
				object obj16 = <>O.<15>__BulletAttack_ProcessHit;
				if (obj16 == null)
				{
					hook_ProcessHit val16 = BulletAttack_ProcessHit;
					<>O.<15>__BulletAttack_ProcessHit = val16;
					obj16 = (object)val16;
				}
				BulletAttack.ProcessHit += (hook_ProcessHit)obj16;
				object obj17 = <>O.<16>__Row_FromSkillSlot;
				if (obj17 == null)
				{
					Manipulator val17 = Row_FromSkillSlot;
					<>O.<16>__Row_FromSkillSlot = val17;
					obj17 = (object)val17;
				}
				Row.FromSkillSlot += (Manipulator)obj17;
				object obj18 = <>O.<17>__LoadoutPanelController_DestroyRows;
				if (obj18 == null)
				{
					hook_DestroyRows val18 = LoadoutPanelController_DestroyRows;
					<>O.<17>__LoadoutPanelController_DestroyRows = val18;
					obj18 = (object)val18;
				}
				LoadoutPanelController.DestroyRows += (hook_DestroyRows)obj18;
				object obj19 = <>O.<18>__Row_FinishSetup;
				if (obj19 == null)
				{
					hook_FinishSetup val19 = Row_FinishSetup;
					<>O.<18>__Row_FinishSetup = val19;
					obj19 = (object)val19;
				}
				Row.FinishSetup += (hook_FinishSetup)obj19;
				object obj20 = <>O.<19>__Row_FromSkin;
				if (obj20 == null)
				{
					Manipulator val20 = Row_FromSkin;
					<>O.<19>__Row_FromSkin = val20;
					obj20 = (object)val20;
				}
				Row.FromSkin += (Manipulator)obj20;
				Hook val21 = new Hook((MethodBase)typeof(LoadoutPanelController).GetMethod("Rebuild", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BrynzaAPI).GetMethod("LoadoutPanelController_Rebuild", BindingFlags.Static | BindingFlags.NonPublic), new HookConfig
				{
					Priority = int.MaxValue
				});
				Hook val22 = new Hook((MethodBase)typeof(LoadoutPanelController).GetMethod("Awake", BindingFlags.Instance | BindingFlags.NonPublic), typeof(BrynzaAPI).GetMethod("LoadoutPanelController_Awake", BindingFlags.Static | BindingFlags.NonPublic), new HookConfig
				{
					Priority = int.MaxValue
				});
				object obj21 = <>O.<20>__CharacterModel_UpdateRendererMaterials;
				if (obj21 == null)
				{
					hook_UpdateRendererMaterials val23 = CharacterModel_UpdateRendererMaterials;
					<>O.<20>__CharacterModel_UpdateRendererMaterials = val23;
					obj21 = (object)val23;
				}
				CharacterModel.UpdateRendererMaterials += (hook_UpdateRendererMaterials)obj21;
				object obj22 = <>O.<21>__CharacterModel_UpdateMaterials;
				if (obj22 == null)
				{
					Manipulator val24 = CharacterModel_UpdateMaterials;
					<>O.<21>__CharacterModel_UpdateMaterials = val24;
					obj22 = (object)val24;
				}
				CharacterModel.UpdateMaterials += (Manipulator)obj22;
				object obj23 = <>O.<22>__BulletAttack_DefaultHitCallbackImplementation;
				if (obj23 == null)
				{
					Manipulator val25 = BulletAttack_DefaultHitCallbackImplementation;
					<>O.<22>__BulletAttack_DefaultHitCallbackImplementation = val25;
					obj23 = (object)val25;
				}
				BulletAttack.DefaultHitCallbackImplementation += (Manipulator)obj23;
				object obj24 = <>O.<23>__AimAnimator_UpdateAnimatorParameters;
				if (obj24 == null)
				{
					Manipulator val26 = AimAnimator_UpdateAnimatorParameters;
					<>O.<23>__AimAnimator_UpdateAnimatorParameters = val26;
					obj24 = (object)val26;
				}
				AimAnimator.UpdateAnimatorParameters += (Manipulator)obj24;
				object obj25 = <>O.<24>__CharacterBody_TriggerJumpEventGlobally;
				if (obj25 == null)
				{
					hook_TriggerJumpEventGlobally val27 = CharacterBody_TriggerJumpEventGlobally;
					<>O.<24>__CharacterBody_TriggerJumpEventGlobally = val27;
					obj25 = (object)val27;
				}
				CharacterBody.TriggerJumpEventGlobally += (hook_TriggerJumpEventGlobally)obj25;
				object obj26 = <>O.<25>__CharacterBody_Awake;
				if (obj26 == null)
				{
					hook_Awake val28 = CharacterBody_Awake;
					<>O.<25>__CharacterBody_Awake = val28;
					obj26 = (object)val28;
				}
				CharacterBody.Awake += (hook_Awake)obj26;
				object obj27 = <>O.<26>__EffectData_Copy;
				if (obj27 == null)
				{
					hook_Copy val29 = EffectData_Copy;
					<>O.<26>__EffectData_Copy = val29;
					obj27 = (object)val29;
				}
				EffectData.Copy += (hook_Copy)obj27;
				object obj28 = <>O.<27>__EffectData_Reset;
				if (obj28 == null)
				{
					hook_Reset val30 = EffectData_Reset;
					<>O.<27>__EffectData_Reset = val30;
					obj28 = (object)val30;
				}
				EffectData.Reset += (hook_Reset)obj28;
				object obj29 = <>O.<28>__EffectData_Serialize;
				if (obj29 == null)
				{
					hook_Serialize val31 = EffectData_Serialize;
					<>O.<28>__EffectData_Serialize = val31;
					obj29 = (object)val31;
				}
				EffectData.Serialize += (hook_Serialize)obj29;
				object obj30 = <>O.<29>__EffectData_Deserialize;
				if (obj30 == null)
				{
					hook_Deserialize val32 = EffectData_Deserialize;
					<>O.<29>__EffectData_Deserialize = val32;
					obj30 = (object)val32;
				}
				EffectData.Deserialize += (hook_Deserialize)obj30;
				object obj31 = <>O.<30>__EffectComponent_Reset;
				if (obj31 == null)
				{
					Manipulator val33 = EffectComponent_Reset;
					<>O.<30>__EffectComponent_Reset = val33;
					obj31 = (object)val33;
				}
				EffectComponent.Reset += (Manipulator)obj31;
				object obj32 = <>O.<31>__EffectManager_SpawnEffect_EffectIndex_EffectData_bool;
				if (obj32 == null)
				{
					Manipulator val34 = EffectManager_SpawnEffect_EffectIndex_EffectData_bool;
					<>O.<31>__EffectManager_SpawnEffect_EffectIndex_EffectData_bool = val34;
					obj32 = (object)val34;
				}
				EffectManager.SpawnEffect_EffectIndex_EffectData_bool += (Manipulator)obj32;
				Hook val35 = new Hook((MethodBase)Reflection.GetPropertyGetter(typeof(CameraRigController), "isControlAllowed"), typeof(BrynzaAPI).GetMethod("CameraRigController_isControlAllowed", BindingFlags.Static | BindingFlags.NonPublic));
				Hook val36 = new Hook((MethodBase)Reflection.GetPropertyGetter(typeof(CameraRigController), "isHudAllowed"), typeof(BrynzaAPI).GetMethod("CameraRigController_isControlAllowed", BindingFlags.Static | BindingFlags.NonPublic));
				object obj33 = <>O.<32>__CharacterMotor_FixedUpdate;
				if (obj33 == null)
				{
					hook_FixedUpdate val37 = CharacterMotor_FixedUpdate;
					<>O.<32>__CharacterMotor_FixedUpdate = val37;
					obj33 = (object)val37;
				}
				CharacterMotor.FixedUpdate += (hook_FixedUpdate)obj33;
				Hook val38 = new Hook((MethodBase)AccessTools.Method(typeof(Interactor), "Awake", (Type[])null, (Type[])null), typeof(BrynzaAPI).GetMethod("Interactor_Awake", BindingFlags.Static | BindingFlags.NonPublic));
				object obj34 = <>O.<33>__CharacterMotor_FixedUpdate1;
				if (obj34 == null)
				{
					Manipulator val39 = CharacterMotor_FixedUpdate1;
					<>O.<33>__CharacterMotor_FixedUpdate1 = val39;
					obj34 = (object)val39;
				}
				CharacterMotor.FixedUpdate += (Manipulator)obj34;
				Hook val40 = new Hook((MethodBase)AccessTools.Method(typeof(Inventory), "Awake", (Type[])null, (Type[])null), typeof(BrynzaAPI).GetMethod("Inventory_Awake", BindingFlags.Static | BindingFlags.NonPublic));
				Hook val41 = new Hook((MethodBase)Reflection.GetPropertyGetter(typeof(CharacterBody), "regen"), typeof(BrynzaAPI).GetMethod("DynamicRegenHook", BindingFlags.Static | BindingFlags.NonPublic));
				Hook val42 = new Hook((MethodBase)Reflection.GetPropertyGetter(typeof(CharacterBody), "attackSpeed"), typeof(BrynzaAPI).GetMethod("DynamicAttackSpeedHook", BindingFlags.Static | BindingFlags.NonPublic));
				Hook val43 = new Hook((MethodBase)Reflection.GetPropertyGetter(typeof(CharacterBody), "moveSpeed"), typeof(BrynzaAPI).GetMethod("DynamicMoveSpeedHook", BindingFlags.Static | BindingFlags.NonPublic));
				object obj35 = <>O.<34>__CharacterBody_RecalculateStats2;
				if (obj35 == null)
				{
					hook_RecalculateStats val44 = CharacterBody_RecalculateStats2;
					<>O.<34>__CharacterBody_RecalculateStats2 = val44;
					obj35 = (object)val44;
				}
				CharacterBody.RecalculateStats += (hook_RecalculateStats)obj35;
				object obj36 = <>O.<35>__GenericPickupController_CreatePickup;
				if (obj36 == null)
				{
					Manipulator val45 = GenericPickupController_CreatePickup;
					<>O.<35>__GenericPickupController_CreatePickup = val45;
					obj36 = (object)val45;
				}
				GenericPickupController.CreatePickup += (Manipulator)obj36;
				object obj37 = <>O.<36>__GenericCharacterMain_PerformInputs;
				if (obj37 == null)
				{
					hook_PerformInputs val46 = GenericCharacterMain_PerformInputs;
					<>O.<36>__GenericCharacterMain_PerformInputs = val46;
					obj37 = (object)val46;
				}
				GenericCharacterMain.PerformInputs += (hook_PerformInputs)obj37;
				object obj38 = <>O.<37>__BlastAttack_CollectHits;
				if (obj38 == null)
				{
					Manipulator val47 = BlastAttack_CollectHits;
					<>O.<37>__BlastAttack_CollectHits = val47;
					obj38 = (object)val47;
				}
				BlastAttack.CollectHits += (Manipulator)obj38;
				object obj39 = <>O.<38>__BlastAttack_HandleHits1;
				if (obj39 == null)
				{
					Manipulator val48 = BlastAttack_HandleHits1;
					<>O.<38>__BlastAttack_HandleHits1 = val48;
					obj39 = (object)val48;
				}
				BlastAttack.HandleHits += (Manipulator)obj39;
				object obj40 = <>O.<39>__CharacterBody_FixedUpdate;
				if (obj40 == null)
				{
					hook_FixedUpdate val49 = CharacterBody_FixedUpdate;
					<>O.<39>__CharacterBody_FixedUpdate = val49;
					obj40 = (object)val49;
				}
				CharacterBody.FixedUpdate += (hook_FixedUpdate)obj40;
				object obj41 = <>O.<40>__AlwaysSprint;
				if (obj41 == null)
				{
					CanAlwaysSprint val50 = AlwaysSprint;
					<>O.<40>__AlwaysSprint = val50;
					obj41 = (object)val50;
				}
				CharacterBodyAPI.AddAlwaysSprintCondition((CanAlwaysSprint)obj41);
				harmonyPatcher = new Harmony("com.brynzananas.brynzaapi");
				harmonyPatcher.CreateClassProcessor(typeof(Patches)).Patch();
			}
		}

		private static void CharacterBody_FixedUpdate(orig_FixedUpdate orig, CharacterBody self)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			self.SetPositionDelta((self.transform.position - self.GetPreviousPosition()) / Time.fixedDeltaTime);
			self.SetPreviousPosition(self.transform.position);
		}

		private static Result BlastAttack_Fire(orig_Fire orig, BlastAttack self)
		{
			//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)
			//IL_0096: 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_009b: 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_0084: 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_0031: 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)
			Result result = orig.Invoke(self);
			if (debugExplosion)
			{
				Vector3? endPosition = self.GetEndPosition();
				if (endPosition.HasValue)
				{
					Utils.CreateDebugCapsule(self.position, endPosition.Value, self.radius, new Color(0f, 0f, 0f, 0.3f), 3f);
				}
				else
				{
					Utils.CreateDebugSphere(self.position, self.radius, new Color(0f, 0f, 0f, 0.3f), 3f);
				}
			}
			return result;
		}

		private static void BlastAttack_HandleHits1(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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)
			ILCursor val = new ILCursor(il);
			if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 2)
			}))
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
				return;
			}
			val.Emit(OpCodes.Ldloc, 0);
			val.Emit(OpCodes.Ldloc, 2);
			val.Emit(OpCodes.Ldarg, 0);
			val.EmitDelegate<Func<Vector3, HitPoint, BlastAttack, Vector3>>((Func<Vector3, HitPoint, BlastAttack, Vector3>)IAmTooAssedToMakeSmartIlEditsGoMySingleDelegateThatWilDoEverything);
			val.Emit(OpCodes.Stloc_0);
		}

		private static void Deebuug2(BlastAttackDamageInfo blastAttackDamageInfo)
		{
			//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)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			Deeebuuug(blastAttackDamageInfo.force, blastAttackDamageInfo.position);
		}

		private static void Deeebuuug(Vector3 direction, Vector3 origin)
		{
			//IL_0001: 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_002b: 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_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			Utils.CreateDebugSphere(origin, 1f, new Color(1f, 1f, 1f, 0.3f), 3f);
			Utils.CreateDebugLine(origin, origin + direction, new Color(1f, 1f, 1f, 0.3f), 3f, 1f);
		}

		private static Vector3 IAmTooAssedToMakeSmartIlEditsGoMySingleDelegateThatWilDoEverything(Vector3 vector3, HitPoint hitPoint, BlastAttack blastAttack)
		{
			//IL_0001: 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)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: 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_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)
			//IL_0061: 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_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			Vector3? nearestPositionOnLineFromHitPosition = hitPoint.GetNearestPositionOnLineFromHitPosition();
			Vector3 position = blastAttack.position;
			if (!nearestPositionOnLineFromHitPosition.HasValue)
			{
				Vector3? endPosition = blastAttack.GetEndPosition();
				if (!endPosition.HasValue)
				{
					return position;
				}
				Vector3 lineDir = endPosition.Value - blastAttack.position;
				position = Utils.NearestPointOnLine(blastAttack.position, lineDir, hitPoint.hitPosition);
			}
			else
			{
				position = nearestPositionOnLineFromHitPosition.Value;
			}
			return position;
		}

		private static bool NullableVector3HasValue(Vector3? vector3)
		{
			return vector3.HasValue;
		}

		private static Vector3 NullableVector3Value(Vector3? vector3)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			return vector3.Value;
		}

		private static BlastAttack_CollectHitsValues WhatAmIDoing(Vector3 point1, float radius, int layer, BlastAttack blastAttack)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: 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_0021: Unknown result type (might be due to invalid IL or missing references)
			return new BlastAttack_CollectHitsValues
			{
				point1 = point1,
				point2 = blastAttack.GetEndPosition().Value,
				radius = radius,
				layer = layer
			};
		}

		private static void BlastAttack_CollectHits(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected O, but got Unknown
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: 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_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0209: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Expected O, but got Unknown
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_033c: Expected O, but got Unknown
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall<Physics>(x, "OverlapSphere")
			}))
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
				return;
			}
			int count = val.Context.Body.Variables.Count;
			val.Body.Variables.Add(new VariableDefinition(il.Import(typeof(BlastAttack_CollectHitsValues))));
			Instruction next = val.Next;
			Instruction next2 = val.Next.Next;
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<BlastAttack, Vector3?>>((Func<BlastAttack, Vector3?>)Extensions.GetEndPosition);
			val.EmitDelegate<Func<Vector3?, bool>>((Func<Vector3?, bool>)NullableVector3HasValue);
			val.Emit(OpCodes.Brfalse_S, next);
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<Func<Vector3, float, int, BlastAttack, BlastAttack_CollectHitsValues>>((Func<Vector3, float, int, BlastAttack, BlastAttack_CollectHitsValues>)WhatAmIDoing);
			val.Emit(OpCodes.Stloc, count);
			val.Emit(OpCodes.Ldloc, count);
			val.Emit(OpCodes.Ldfld, AccessTools.Field(typeof(BlastAttack_CollectHitsValues), "point1"));
			val.Emit(OpCodes.Ldloc, count);
			val.Emit(OpCodes.Ldfld, AccessTools.Field(typeof(BlastAttack_CollectHitsValues), "point2"));
			val.Emit(OpCodes.Ldloc, count);
			val.Emit(OpCodes.Ldfld, AccessTools.Field(typeof(BlastAttack_CollectHitsValues), "radius"));
			val.Emit(OpCodes.Ldloc, count);
			val.Emit(OpCodes.Ldfld, AccessTools.Field(typeof(BlastAttack_CollectHitsValues), "layer"));
			val.Emit(OpCodes.Call, (MethodBase)AccessTools.Method(typeof(Physics), "OverlapCapsule", new Type[4]
			{
				typeof(Vector3),
				typeof(Vector3),
				typeof(float),
				typeof(int)
			}, (Type[])null));
			val.Emit(OpCodes.Br_S, next2);
			int hitPointLocalIndex = 17;
			val = new ILCursor(il);
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref hitPointLocalIndex),
				(Instruction x) => ILPatternMatchingExt.MatchStelemAny<HitPoint>(x)
			}))
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!"));
				return;
			}
			val.Emit(OpCodes.Ldloca, hitPointLocalIndex);
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<<>A{00000001}<HitPoint, BlastAttack>>((<>A{00000001}<HitPoint, BlastAttack>)HandleHitPoint1);
			int id = 19;
			val = new ILCursor(il);
			if (!val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref id),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<HitPoint>(x, "hitNormal"),
				(Instruction x) => ILPatternMatchingExt.MatchCall<Vector3>(x, "op_UnaryNegation"),
				(Instruction x) => ILPatternMatchingExt.MatchNewobj<Ray>(x)
			}))
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 3 failed!"));
				return;
			}
			val.Emit(OpCodes.Ldloca, id);
			val.EmitDelegate<<>F{00000008}<Ray, HitPoint, Ray>>((<>F{00000008}<Ray, HitPoint, Ray>)HandleRay1);
		}

		private static void HandleHitPoint1(ref HitPoint hitPoint, BlastAttack blastAttack)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: 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_002a: 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_0031: 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_003d: 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)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			Vector3? endPosition = blastAttack.GetEndPosition();
			if (endPosition.HasValue)
			{
				Vector3 lineDir = endPosition.Value - blastAttack.position;
				Vector3 val = Utils.NearestPointOnLine(blastAttack.position, lineDir, hitPoint.hitPosition);
				hitPoint.SetNearestPositionOnLineFromHitPosition(val);
				hitPoint.hitNormal = hitPoint.hitPosition - val;
				hitPoint.distanceSqr = ((Vector3)(ref hitPoint.hitNormal)).sqrMagnitude;
			}
		}

		private static Ray HandleRay1(Ray ray, ref HitPoint hitPoint)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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_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_0032: Unknown result type (might be due to invalid IL or missing references)
			Vector3? nearestPositionOnLineFromHitPosition = hitPoint.GetNearestPositionOnLineFromHitPosition();
			if (!nearestPositionOnLineFromHitPosition.HasValue)
			{
				return ray;
			}
			((Ray)(ref ray)).origin = nearestPositionOnLineFromHitPosition.Value;
			return ray;
		}

		private static bool AlwaysSprint(CharacterBody characterBody)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return CharacterBodyAPI.HasModdedBodyFlag(characterBody, Assets.SprintAllTime);
		}

		private static void GenericPickupController_CreatePickup(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int index = 0;
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref index),
				(Instruction x) => ILPatternMatchingExt.MatchCall<NetworkServer>(x, "Spawn")
			}))
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
				return;
			}
			val.Emit(OpCodes.Ldloc, index);
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<<>A{00000008}<GameObject, CreatePickupInfo>>((<>A{00000008}<GameObject, CreatePickupInfo>)HandlePickupStuff);
		}

		private static void GenericCharacterMain_PerformInputs(orig_PerformInputs orig, GenericCharacterMain self)
		{
			orig.Invoke(self);
			if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)((EntityState)self).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)self).skillLocator.GetSprintSkill()))
			{
				self.HandleSkill(((EntityState)self).skillLocator.GetSprintSkill(), ref ((EntityState)self).inputBank.sprint);
			}
		}

		private void PickupDropletController_CreatePickupDroplet_CreatePickupInfo_Vector3_Vector3(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0062: 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)
			ILCursor val = new ILCursor(il);
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall<NetworkServer>(x, "Spawn")
			}))
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
				return;
			}
			val.Emit(OpCodes.Dup);
			val.Emit(OpCodes.Ldarg_0);
			val.EmitDelegate<<>A{00000008}<GameObject, CreatePickupInfo>>((<>A{00000008}<GameObject, CreatePickupInfo>)HandlePickupStuff);
		}

		private static void HandlePickupStuff(GameObject gameObject, ref CreatePickupInfo createPickupInfo)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			BrynzaAPI.OnPickupCreated?.Invoke(createPickupInfo, gameObject);
		}

		private static void CharacterBody_RecalculateStats2(orig_RecalculateStats orig, CharacterBody self)
		{
			useDynamicStats = false;
			useMoveSpeedDynamicStat = false;
			orig.Invoke(self);
			useDynamicStats = true;
		}

		private static void CharacterMotor_FixedUpdate1(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)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, (MethodBase)Reflection.GetPropertyGetter(typeof(Vector3), "sqrMagnitude"))
			}))
			{
				val.Emit(OpCodes.Dup);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<<>A{00000001}<Vector3, CharacterMotor>>((<>A{00000001}<Vector3, CharacterMotor>)IShouldPasteMethodsWithAccessToolsInteadOfThis);
			}
			else
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static void IShouldPasteMethodsWithAccessToolsInteadOfThis(ref Vector3 vector3, CharacterMotor characterMotor)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				characterMotor.SetPositionDelta(vector3 * -1f / Time.fixedDeltaTime);
			}
		}

		private static void Interactor_Awake(Action<Interactor> action, Interactor interactor)
		{
			action(interactor);
			interactor.SetCharacterBody(((Component)interactor).GetComponent<CharacterBody>());
		}

		private static void Inventory_Awake(Action<Inventory> action, Inventory inventory)
		{
			action(inventory);
			inventory.SetCharacterMaster(((Component)inventory).GetComponent<CharacterMaster>());
		}

		private static void CharacterMotor_FixedUpdate(orig_FixedUpdate orig, CharacterMotor self)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (self.isGrounded)
			{
				self.SetMaxAirVelocity(0f);
				return;
			}
			Vector3 velocity = self.velocity;
			if (!self.isFlying)
			{
				velocity.y = 0f;
			}
			if (((Vector3)(ref velocity)).sqrMagnitude > self.GetMaxAirVelocity() * self.GetMaxAirVelocity())
			{
				self.SetMaxAirVelocity(((Vector3)(ref velocity)).magnitude);
			}
		}

		private static void EffectManager_SpawnEffect_EffectIndex_EffectData_bool(ILContext il)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			ILCursor c = new ILCursor(il);
			ilhook(1, 6);
			ilhook(2, 7);
			static void SetEffectInstance(EffectData effectData, EffectComponent effectComponent)
			{
				effectData.SetEffectInstance(effectComponent);
			}
			void ilhook(int i1, int i2)
			{
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_004b: Unknown result type (might be due to invalid IL or missing references)
				if (c.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
				{
					(Instruction x) => ILPatternMatchingExt.MatchStloc(x, i2)
				}))
				{
					c.Emit(OpCodes.Ldarg_1);
					c.Emit(OpCodes.Ldloc, i2);
					c.EmitDelegate<Action<EffectData, EffectComponent>>((Action<EffectData, EffectComponent>)SetEffectInstance);
				}
				else
				{
					Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook " + i1 + " failed!"));
				}
			}
		}

		private static float DynamicAttackSpeedHook(Func<CharacterBody, float> orig, CharacterBody self)
		{
			float value = orig(self);
			if (useDynamicStats)
			{
				BrynzaAPI.GetDynamicAttackSpeed?.Invoke(self, ref value);
			}
			return value;
		}

		private static float DynamicMoveSpeedHook(Func<CharacterBody, float> orig, CharacterBody self)
		{
			float value = orig(self);
			if (useMoveSpeedDynamicStat)
			{
				BrynzaAPI.GetDynamicMoveSpeed?.Invoke(self, ref value);
			}
			return value;
		}

		private static float DynamicRegenHook(Func<CharacterBody, float> orig, CharacterBody self)
		{
			float value = orig(self);
			if (useDynamicStats)
			{
				BrynzaAPI.GetDynamicRegen?.Invoke(self, ref value);
			}
			return value;
		}

		private static bool CameraRigController_isControlAllowed(Func<CameraRigController, bool> orig, CameraRigController self)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)self.targetBody) && CharacterBodyAPI.HasModdedBodyFlag(self.targetBody, Assets.FirstPerson))
			{
				return true;
			}
			return orig(self);
		}

		private static void EffectComponent_Reset(ILContext il)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			ILCursor c = new ILCursor(il);
			ilhook(1);
			ilhook(2);
			static Vector3 GetScale(EffectComponent effectComponent)
			{
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				return effectComponent.effectData.GetScale().Value;
			}
			static bool HasScale(EffectComponent effectComponent)
			{
				return effectComponent.effectData.GetScale().HasValue;
			}
			void ilhook(int i)
			{
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				//IL_013b: Unknown result type (might be due to invalid IL or missing references)
				int num = default(int);
				if (c.TryGotoNext((MoveType)0, new Func<Instruction, bool>[4]
				{
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num),
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num),
					(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref num),
					(Instruction x) => ILPatternMatchingExt.MatchNewobj<Vector3>(x)
				}))
				{
					Instruction next = c.Next;
					Instruction next2 = c.Next.Next.Next.Next.Next;
					c.Emit(OpCodes.Ldarg_0);
					c.EmitDelegate<Func<EffectComponent, bool>>((Func<EffectComponent, bool>)HasScale);
					c.Emit(OpCodes.Brfalse_S, next);
					c.Emit(OpCodes.Ldarg_0);
					c.EmitDelegate<Func<EffectComponent, Vector3>>((Func<EffectComponent, Vector3>)GetScale);
					c.Emit(OpCodes.Br_S, next2);
					c.Goto(next2, (MoveType)0, false);
				}
				else
				{
					Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook " + i + " failed!"));
				}
			}
		}

		private static void EffectData_Deserialize(orig_Deserialize orig, EffectData self, NetworkReader reader)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, reader);
			if (reader.ReadBoolean())
			{
				self.SetScale(reader.ReadVector3());
			}
			else
			{
				self.SetScale(null);
			}
		}

		private static void EffectData_Serialize(orig_Serialize orig, EffectData self, NetworkWriter writer)
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, writer);
			bool hasValue = self.GetScale().HasValue;
			writer.Write(hasValue);
			if (hasValue)
			{
				writer.Write(self.GetScale().Value);
			}
		}

		private static void EffectData_Reset(orig_Reset orig, EffectData self)
		{
			orig.Invoke(self);
			self.SetScale(null);
		}

		private static void EffectData_Copy(orig_Copy orig, EffectData src, EffectData dest)
		{
			orig.Invoke(src, dest);
			dest.SetScale(src.GetScale());
		}

		private static void CharacterBody_Awake(orig_Awake orig, CharacterBody self)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			self.SetClientBuffs(BuffCatalog.GetPerBuffBuffer<int>());
			self.SetPreviousPosition(self.transform.position);
			self.SetPositionDelta(Vector3.zero);
		}

		private static void UnsetHooks()
		{
			//IL_0028: 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_0033: Expected O, but got Unknown
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Expected O, but got Unknown
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Expected O, but got Unknown
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Expected O, but got Unknown
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Expected O, but got Unknown
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Expected O, but got Unknown
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Expected O, but got Unknown
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Expected O, but got Unknown
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Expected O, but got Unknown
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Expected O, but got Unknown
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Expected O, but got Unknown
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Expected O, but got Unknown
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Expected O, but got Unknown
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Expected O, but got Unknown
			//IL_0259: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Expected O, but got Unknown
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Expected O, but got Unknown
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Expected O, but got Unknown
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Expected O, but got Unknown
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Expected O, but got Unknown
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Expected O, but got Unknown
			//IL_031f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Expected O, but got Unknown
			//IL_0340: Unknown result type (might be due to invalid IL or missing references)
			//IL_0345: Unknown result type (might be due to invalid IL or missing references)
			//IL_034b: Expected O, but got Unknown
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_036c: Expected O, but got Unknown
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_0387: Unknown result type (might be due to invalid IL or missing references)
			//IL_038d: Expected O, but got Unknown
			//IL_03a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ae: Expected O, but got Unknown
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cf: Expected O, but got Unknown
			//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Expected O, but got Unknown
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0411: Expected O, but got Unknown
			if (hooksEnabled)
			{
				hooksEnabled = false;
				object obj = <>O.<0>__CameraModePlayerBasic_CollectLookInputInternal;
				if (obj == null)
				{
					Manipulator val = CameraModePlayerBasic_CollectLookInputInternal;
					<>O.<0>__CameraModePlayerBasic_CollectLookInputInternal = val;
					obj = (object)val;
				}
				CameraModePlayerBasic.CollectLookInputInternal -= (Manipulator)obj;
				object obj2 = <>O.<1>__GenericSkill_Awake;
				if (obj2 == null)
				{
					Manipulator val2 = GenericSkill_Awake;
					<>O.<1>__GenericSkill_Awake = val2;
					obj2 = (object)val2;
				}
				GenericSkill.Awake -= (Manipulator)obj2;
				object obj3 = <>O.<2>__CharacterMotor_PreMove;
				if (obj3 == null)
				{
					Manipulator val3 = CharacterMotor_PreMove;
					<>O.<2>__CharacterMotor_PreMove = val3;
					obj3 = (object)val3;
				}
				CharacterMotor.PreMove -= (Manipulator)obj3;
				object obj4 = <>O.<3>__ProjectileExplosion_DetonateServer;
				if (obj4 == null)
				{
					Manipulator val4 = ProjectileExplosion_DetonateServer;
					<>O.<3>__ProjectileExplosion_DetonateServer = val4;
					obj4 = (object)val4;
				}
				ProjectileExplosion.DetonateServer -= (Manipulator)obj4;
				object obj5 = <>O.<4>__GenericCharacterMain_ApplyJumpVelocity;
				if (obj5 == null)
				{
					Manipulator val5 = GenericCharacterMain_ApplyJumpVelocity;
					<>O.<4>__GenericCharacterMain_ApplyJumpVelocity = val5;
					obj5 = (object)val5;
				}
				GenericCharacterMain.ApplyJumpVelocity -= (Manipulator)obj5;
				object obj6 = <>O.<5>__GlobalEventManager_OnCharacterHitGroundServer;
				if (obj6 == null)
				{
					hook_OnCharacterHitGroundServer val6 = GlobalEventManager_OnCharacterHitGroundServer;
					<>O.<5>__GlobalEventManager_OnCharacterHitGroundServer = val6;
					obj6 = (object)val6;
				}
				GlobalEventManager.OnCharacterHitGroundServer -= (hook_OnCharacterHitGroundServer)obj6;
				object obj7 = <>O.<6>__ContentManager_collectContentPackProviders;
				if (obj7 == null)
				{
					CollectContentPackProvidersDelegate val7 = ContentManager_collectContentPackProviders;
					<>O.<6>__ContentManager_collectContentPackProviders = val7;
					obj7 = (object)val7;
				}
				ContentManager.collectContentPackProviders -= (CollectContentPackProvidersDelegate)obj7;
				object obj8 = <>O.<7>__Run_Start;
				if (obj8 == null)
				{
					hook_Start val8 = Run_Start;
					<>O.<7>__Run_Start = val8;
					obj8 = (object)val8;
				}
				Run.Start -= (hook_Start)obj8;
				object obj9 = <>O.<8>__RoR2Application_OnLoad;
				if (obj9 == null)
				{
					hook_OnLoad val9 = RoR2Application_OnLoad;
					<>O.<8>__RoR2Application_OnLoad = val9;
					obj9 = (object)val9;
				}
				RoR2Application.OnLoad -= (hook_OnLoad)obj9;
				object obj10 = <>O.<9>__CharacterSelectController_OnEnable;
				if (obj10 == null)
				{
					hook_OnEnable val10 = CharacterSelectController_OnEnable;
					<>O.<9>__CharacterSelectController_OnEnable = val10;
					obj10 = (object)val10;
				}
				CharacterSelectController.OnEnable -= (hook_OnEnable)obj10;
				object obj11 = <>O.<10>__FogDamageController_MyFixedUpdate;
				if (obj11 == null)
				{
					Manipulator val11 = FogDamageController_MyFixedUpdate;
					<>O.<10>__FogDamageController_MyFixedUpdate = val11;
					obj11 = (object)val11;
				}
				FogDamageController.MyFixedUpdate -= (Manipulator)obj11;
				object obj12 = <>O.<11>__GenericCharacterMain_ProcessJump_bool;
				if (obj12 == null)
				{
					Manipulator val12 = GenericCharacterMain_ProcessJump_bool;
					<>O.<11>__GenericCharacterMain_ProcessJump_bool = val12;
					obj12 = (object)val12;
				}
				GenericCharacterMain.ProcessJump_bool -= (Manipulator)obj12;
				object obj13 = <>O.<12>__CharacterMotor_OnLanded;
				if (obj13 == null)
				{
					Manipulator val13 = CharacterMotor_OnLanded;
					<>O.<12>__CharacterMotor_OnLanded = val13;
					obj13 = (object)val13;
				}
				CharacterMotor.OnLanded -= (Manipulator)obj13;
				object obj14 = <>O.<13>__CharacterBody_RecalculateStats;
				if (obj14 == null)
				{
					Manipulator val14 = CharacterBody_RecalculateStats;
					<>O.<13>__CharacterBody_RecalculateStats = val14;
					obj14 = (object)val14;
				}
				CharacterBody.RecalculateStats -= (Manipulator)obj14;
				object obj15 = <>O.<15>__BulletAttack_ProcessHit;
				if (obj15 == null)
				{
					hook_ProcessHit val15 = BulletAttack_ProcessHit;
					<>O.<15>__BulletAttack_ProcessHit = val15;
					obj15 = (object)val15;
				}
				BulletAttack.ProcessHit -= (hook_ProcessHit)obj15;
				object obj16 = <>O.<16>__Row_FromSkillSlot;
				if (obj16 == null)
				{
					Manipulator val16 = Row_FromSkillSlot;
					<>O.<16>__Row_FromSkillSlot = val16;
					obj16 = (object)val16;
				}
				Row.FromSkillSlot -= (Manipulator)obj16;
				object obj17 = <>O.<17>__LoadoutPanelController_DestroyRows;
				if (obj17 == null)
				{
					hook_DestroyRows val17 = LoadoutPanelController_DestroyRows;
					<>O.<17>__LoadoutPanelController_DestroyRows = val17;
					obj17 = (object)val17;
				}
				LoadoutPanelController.DestroyRows -= (hook_DestroyRows)obj17;
				object obj18 = <>O.<18>__Row_FinishSetup;
				if (obj18 == null)
				{
					hook_FinishSetup val18 = Row_FinishSetup;
					<>O.<18>__Row_FinishSetup = val18;
					obj18 = (object)val18;
				}
				Row.FinishSetup -= (hook_FinishSetup)obj18;
				object obj19 = <>O.<19>__Row_FromSkin;
				if (obj19 == null)
				{
					Manipulator val19 = Row_FromSkin;
					<>O.<19>__Row_FromSkin = val19;
					obj19 = (object)val19;
				}
				Row.FromSkin -= (Manipulator)obj19;
				object obj20 = <>O.<20>__CharacterModel_UpdateRendererMaterials;
				if (obj20 == null)
				{
					hook_UpdateRendererMaterials val20 = CharacterModel_UpdateRendererMaterials;
					<>O.<20>__CharacterModel_UpdateRendererMaterials = val20;
					obj20 = (object)val20;
				}
				CharacterModel.UpdateRendererMaterials -= (hook_UpdateRendererMaterials)obj20;
				object obj21 = <>O.<21>__CharacterModel_UpdateMaterials;
				if (obj21 == null)
				{
					Manipulator val21 = CharacterModel_UpdateMaterials;
					<>O.<21>__CharacterModel_UpdateMaterials = val21;
					obj21 = (object)val21;
				}
				CharacterModel.UpdateMaterials -= (Manipulator)obj21;
				object obj22 = <>O.<22>__BulletAttack_DefaultHitCallbackImplementation;
				if (obj22 == null)
				{
					Manipulator val22 = BulletAttack_DefaultHitCallbackImplementation;
					<>O.<22>__BulletAttack_DefaultHitCallbackImplementation = val22;
					obj22 = (object)val22;
				}
				BulletAttack.DefaultHitCallbackImplementation -= (Manipulator)obj22;
				object obj23 = <>O.<23>__AimAnimator_UpdateAnimatorParameters;
				if (obj23 == null)
				{
					Manipulator val23 = AimAnimator_UpdateAnimatorParameters;
					<>O.<23>__AimAnimator_UpdateAnimatorParameters = val23;
					obj23 = (object)val23;
				}
				AimAnimator.UpdateAnimatorParameters -= (Manipulator)obj23;
				object obj24 = <>O.<24>__CharacterBody_TriggerJumpEventGlobally;
				if (obj24 == null)
				{
					hook_TriggerJumpEventGlobally val24 = CharacterBody_TriggerJumpEventGlobally;
					<>O.<24>__CharacterBody_TriggerJumpEventGlobally = val24;
					obj24 = (object)val24;
				}
				CharacterBody.TriggerJumpEventGlobally -= (hook_TriggerJumpEventGlobally)obj24;
				object obj25 = <>O.<25>__CharacterBody_Awake;
				if (obj25 == null)
				{
					hook_Awake val25 = CharacterBody_Awake;
					<>O.<25>__CharacterBody_Awake = val25;
					obj25 = (object)val25;
				}
				CharacterBody.Awake -= (hook_Awake)obj25;
				object obj26 = <>O.<26>__EffectData_Copy;
				if (obj26 == null)
				{
					hook_Copy val26 = EffectData_Copy;
					<>O.<26>__EffectData_Copy = val26;
					obj26 = (object)val26;
				}
				EffectData.Copy -= (hook_Copy)obj26;
				object obj27 = <>O.<27>__EffectData_Reset;
				if (obj27 == null)
				{
					hook_Reset val27 = EffectData_Reset;
					<>O.<27>__EffectData_Reset = val27;
					obj27 = (object)val27;
				}
				EffectData.Reset -= (hook_Reset)obj27;
				object obj28 = <>O.<28>__EffectData_Serialize;
				if (obj28 == null)
				{
					hook_Serialize val28 = EffectData_Serialize;
					<>O.<28>__EffectData_Serialize = val28;
					obj28 = (object)val28;
				}
				EffectData.Serialize -= (hook_Serialize)obj28;
				object obj29 = <>O.<29>__EffectData_Deserialize;
				if (obj29 == null)
				{
					hook_Deserialize val29 = EffectData_Deserialize;
					<>O.<29>__EffectData_Deserialize = val29;
					obj29 = (object)val29;
				}
				EffectData.Deserialize -= (hook_Deserialize)obj29;
				object obj30 = <>O.<30>__EffectComponent_Reset;
				if (obj30 == null)
				{
					Manipulator val30 = EffectComponent_Reset;
					<>O.<30>__EffectComponent_Reset = val30;
					obj30 = (object)val30;
				}
				EffectComponent.Reset -= (Manipulator)obj30;
				object obj31 = <>O.<31>__EffectManager_SpawnEffect_EffectIndex_EffectData_bool;
				if (obj31 == null)
				{
					Manipulator val31 = EffectManager_SpawnEffect_EffectIndex_EffectData_bool;
					<>O.<31>__EffectManager_SpawnEffect_EffectIndex_EffectData_bool = val31;
					obj31 = (object)val31;
				}
				EffectManager.SpawnEffect_EffectIndex_EffectData_bool -= (Manipulator)obj31;
			}
		}

		private static void CharacterBody_TriggerJumpEventGlobally(orig_TriggerJumpEventGlobally orig, CharacterBody self)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			self.SetLastJumpTime(FixedTimeStamp.now);
		}

		private static void AimAnimator_UpdateAnimatorParameters(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<AimAnimator>(x, "pitchClipCycleEnd"),
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f)
			}))
			{
				int index = val.Index;
				val.Index = index + 1;
				val.Remove();
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<AimAnimator, float>>((Func<AimAnimator, float>)SetPitch);
			}
			else
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
			}
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0f),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<AimAnimator>(x, "yawClipCycleEnd")
			}))
			{
				val.Remove();
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<AimAnimator, float>>((Func<AimAnimator, float>)SetYaw);
			}
			else
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 2 failed!"));
			}
			static float SetPitch(AimAnimator aimAnimator)
			{
				return aimAnimator.GetPitchClipCycleStart();
			}
			static float SetYaw(AimAnimator aimAnimator)
			{
				return aimAnimator.GetYawClipCycleStart();
			}
		}

		private static void BlastAttackDamageInfo_Write(orig_Write orig, ref BlastAttackDamageInfo self, NetworkWriter writer)
		{
			orig.Invoke(ref self, writer);
			writer.Write(self.GetForceMassIsOne());
			writer.Write(self.GetForceAlwaysApply());
			writer.Write(self.GetForceDisableAirControlUntilCollision());
		}

		private static void BlastAttackDamageInfo_Read(orig_Read orig, ref BlastAttackDamageInfo self, NetworkReader reader)
		{
			orig.Invoke(ref self, reader);
			self.SetForceMassIsOne(reader.ReadBoolean());
			self.SetForceAlwaysApply(reader.ReadBoolean());
			self.SetForceDisableAirControlUntilCollision(reader.ReadBoolean());
		}

		private static void BlastAttack_PerformDamageServer(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_005c: 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)
			ILCursor val = new ILCursor(il);
			ILLabel val2 = null;
			int locid = 9;
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchNewobj<DamageInfo>(x),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, ref locid)
			}))
			{
				val.Emit(OpCodes.Ldloc, locid);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<<>A{00000008}<DamageInfo, BlastAttackDamageInfo>>((<>A{00000008}<DamageInfo, BlastAttackDamageInfo>)SetBlastAttackForce);
			}
			else
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
			}
			static void SetBlastAttackForce(DamageInfo damageInfo, ref BlastAttackDamageInfo blastAttackDamageInfo)
			{
				damageInfo.SetForceMassIsOne(blastAttackDamageInfo.GetForceMassIsOne());
				damageInfo.SetForceAlwaysApply(blastAttackDamageInfo.GetForceAlwaysApply());
				damageInfo.SetForceDisableAirControlUntilCollision(blastAttackDamageInfo.GetForceDisableAirControlUntilCollision());
			}
		}

		private static void BlastAttack_HandleHits(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_005c: 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)
			ILCursor val = new ILCursor(il);
			ILLabel val2 = null;
			int locid = 9;
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloca(x, ref locid),
				(Instruction x) => ILPatternMatchingExt.MatchInitobj<BlastAttackDamageInfo>(x)
			}))
			{
				val.Emit(OpCodes.Ldloca, locid);
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<<>A{00000001}<BlastAttackDamageInfo, BlastAttack>>((<>A{00000001}<BlastAttackDamageInfo, BlastAttack>)SetBlastAttackForce);
			}
			else
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
			}
			static void SetBlastAttackForce(ref BlastAttackDamageInfo blastAttackDamageInfo, BlastAttack blastAttack)
			{
				blastAttackDamageInfo.SetForceMassIsOne(blastAttack.GetForceMassIsOne());
				blastAttackDamageInfo.SetForceAlwaysApply(blastAttack.GetForceAlwaysApply());
				blastAttackDamageInfo.SetForceDisableAirControlUntilCollision(blastAttack.GetForceDisableAirControlUntilCollision());
			}
		}

		private static void BulletAttack_Fire(ILContext il)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Expected O, but got Unknown
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			ILLabel iLLabel = null;
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<BulletAttack>(x, "weapon"),
				(Instruction x) => ILPatternMatchingExt.MatchCall<Object>(x, "op_Implicit"),
				(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref iLLabel)
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<BulletAttack, bool>>((Func<BulletAttack, bool>)GetNoWeaponIfOwner);
				val.Emit(OpCodes.Brtrue_S, (object)iLLabel);
			}
			else
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook 1 failed!"));
			}
			static bool GetNoWeaponIfOwner(BulletAttack bulletAttack)
			{
				return bulletAttack.GetNoWeaponIfOwner();
			}
		}

		private static void HealthComponent_TakeDamageForce_DamageInfo_bool_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_0129: 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_0157: 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_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int locId = 3;
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[6]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locId),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 1),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld<DamageInfo>(x, "force"),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 2),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 3),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt<CharacterMotor>(x, "ApplyForce")
			}))
			{
				Instruction next = val.Next.Next.Next.Next.Next.Next.Next;
				Instruction next2 = val.Next.Next;
				int index = val.Index;
				val.Index = index + 1;
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<DamageInfo, bool>>((Func<DamageInfo, bool>)HasIsMassIsOne);
				val.Emit(OpCodes.Brfalse_S, next2);
				val.Emit(OpCodes.Ldarg_1);
				val.Emit(OpCodes.Ldarg_2);
				val.Emit(OpCodes.Ldarg_3);
				val.EmitDelegate<Action<CharacterMotor, DamageInfo, bool, bool>>((Action<CharacterMotor, DamageInfo, bool, bool>)ApplyForce);
				val.Emit(OpCodes.Br, next);
			}
			else
			{
				Log.LogError((object)(((MemberReference)il.Method).Name + " IL Hook failed!"));
			}
			static void ApplyForce(CharacterMotor characterMotor, DamageInfo damageInfo, bool awlaysApply, bool disableAirControlUntilCollision)
			{
				//IL_0003: 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)
				//IL_0023: 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_0037: Unknown result type (might be due to invalid IL or missing references)
				PhysForceInfo val2 = default(PhysForceInfo);
				((PhysForceInfo)(ref val2)).disableAirControlUntilCollision = disableAirControlUntilCollision;
				((PhysForceInfo)(ref val2)).ignoreGroundStick = awlaysApply;
				val2.force = damageInfo.force;
				((PhysForceInfo)(ref val2)).massIsOne = damageInfo.GetForceMassIsOne();
				PhysForceInfo val3 = val2;
				characterMotor.ApplyForceImpulse(ref val3);
			}
			static bool HasIsMassIsOne(DamageInfo damageInfo)
			{
				return damageInfo.GetForceMassIsOne();
			}
		}

		private static DamageInfo NetworkExtensions_ReadDamageInfo(orig_ReadDamageInfo orig, NetworkReader reader)
		{
			DamageInfo val = orig.Invoke(reader);
			val.SetForceMassIsOne(reader.ReadBoolean());
			val.SetForceAlwaysApply(reader.ReadBoolean());
			val.SetForceDisableAirControlUntilCollision(reader.ReadBoolean());
			return val;
		}

		private static void NetworkExtensions_Write_NetworkWriter_DamageInfo(orig_Write_NetworkWriter_DamageInfo orig, NetworkWriter writer, DamageInfo damageInfo)
		{
			orig.Invoke(writer, damageInfo);
			writer.Write(damageInfo.GetForceMassIsOne());
			writer.Write(damageInfo.GetForceAlwaysApply());
			writer.Write(damageInfo.GetForceDisableAirControlUntilCollision());
		}

		private static void BulletAttack_DefaultHitCallbackImplementation(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_003f: 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)
			ILCursor val = new ILCursor(il);
			int num = 3;
			i

plugins/BrynzaInterop.dll

Decompiled 6 days 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+aec1cee244ac95c4df4ea7a111c8c9a87d72eb44")]
[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]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[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]
	[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]
	[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)
		{
			return (genericSkill.bapi_extraSkills != null) ? (from i in Enumerable.Range(0, genericSkill.bapi_extraSkills.Count)
				select (GenericSkill)((genericSkill.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)
		{
			return (skillLocator.bapi_bonusSkills != null) ? (from i in Enumerable.Range(0, skillLocator.bapi_bonusSkills.Count)
				select (GenericSkill)((skillLocator.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 Vector3 GetPositionDelta(CharacterMotor characterMotor)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return characterMotor.bapi_positionDelta;
		}

		public static void SetPositionDelta(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_positionDelta = value;
		}

		public static float GetMaxAirVelocity(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_maxAirVelocity;
		}

		public static void SetMaxAirVelocity(CharacterMotor characterMotor, float value)
		{
			characterMotor.bapi_maxAirVelocity = 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 bool GetUseMaxAirVelocity(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_useMaxAirVelocity;
		}

		public static void SetUseMaxAirVelocity(CharacterMotor characterMotor, bool value)
		{
			characterMotor.bapi_useMaxAirVelocity = 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 float GetAirControlFromVelocityAdd(CharacterMotor characterMotor)
		{
			return characterMotor.bapi_airControlFromVelocityAdd;
		}

		public static void SetAirControlFromVelocityAdd(CharacterMotor characterMotor, float value)
		{
			characterMotor.bapi_airControlFromVelocityAdd = 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 SetForceMassIsOne(BulletAttack bulletAttack, bool value)
		{
		}

		public static bool GetForceMassIsOne(BulletAttack bulletAttack)
		{
			return false;
		}

		public static void SetForceMassIsOne(BlastAttack blastAttack, bool value)
		{
		}

		public static bool GetForceMassIsOne(BlastAttack blastAttack)
		{
			return false;
		}

		public static void SetForceMassIsOne(ref BlastAttackDamageInfo blastAttackDamageInfo, bool value)
		{
		}

		public static bool GetForceMassIsOne(ref BlastAttackDamageInfo blastAttackDamageInfo)
		{
			return false;
		}

		public static void SetForceMassIsOne(DamageInfo damageInfo, bool value)
		{
		}

		public static bool GetForceMassIsOne(DamageInfo damageInfo)
		{
			return false;
		}

		public static void SetForceAlwaysApply(BulletAttack bulletAttack, bool value)
		{
		}

		public static bool GetForceAlwaysApply(BulletAttack bulletAttack)
		{
			return false;
		}

		public static void SetForceAlwaysApply(BlastAttack blastAttack, bool value)
		{
		}

		public static bool GetForceAlwaysApply(BlastAttack blastAttack)
		{
			return false;
		}

		public static void SetForceAlwaysApply(ref BlastAttackDamageInfo blastAttackDamageInfo, bool value)
		{
		}

		public static bool GetForceAlwaysApply(ref BlastAttackDamageInfo blastAttackDamageInfo)
		{
			return false;
		}

		public static void SetForceAlwaysApply(DamageInfo damageInfo, bool value)
		{
		}

		public static bool GetForceAlwaysApply(DamageInfo damageInfo)
		{
			return false;
		}

		public static void SetForceDisableAirControlUntilCollision(BulletAttack bulletAttack, bool value)
		{
		}

		public static bool GetForceDisableAirControlUntilCollision(BulletAttack bulletAttack)
		{
			return false;
		}

		public static void SetForceDisableAirControlUntilCollision(BlastAttack blastAttack, bool value)
		{
		}

		public static bool GetForceDisableAirControlUntilCollision(BlastAttack blastAttack)
		{
			return false;
		}

		public static void SetForceDisableAirControlUntilCollision(ref BlastAttackDamageInfo blastAttackDamageInfo, bool value)
		{
		}

		public static bool GetForceDisableAirControlUntilCollision(ref BlastAttackDamageInfo blastAttackDamageInfo)
		{
			return false;
		}

		public static void SetForceDisableAirControlUntilCollision(DamageInfo damageInfo, bool value)
		{
		}

		public static bool GetForceDisableAirControlUntilCollision(DamageInfo damageInfo)
		{
			return false;
		}

		public static void SetBonusForce(BulletAttack bulletAttack, 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)
			bulletAttack.bapi_bonusForce = value;
		}

		public static Vector3 GetBonusForce(BulletAttack bulletAttack)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return bulletAttack.bapi_bonusForce;
		}

		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;
		}

		public static bool GetDontFadeWhenNearCamera(ref RendererInfo rendererInfo)
		{
			return rendererInfo.bapi_dontFadeCloseOn;
		}

		public static void SetDontFadeWhenNearCamera(ref RendererInfo rendererInfo, bool value)
		{
			rendererInfo.bapi_dontFadeCloseOn = value;
		}

		public static void SetNoWeaponIfOwner(BulletAttack bulletAttack, bool value)
		{
			bulletAttack.bapi_noWeaponIfOwner = value;
		}

		public static bool GetNoWeaponIfOwner(BulletAttack bulletAttack)
		{
			return bulletAttack.bapi_noWeaponIfOwner;
		}

		public static float GetPitchClipCycleStart(AimAnimator aimAnimator)
		{
			return aimAnimator.bapi_pitchClipCycleStart;
		}

		public static void SetPitchClipCycleStart(AimAnimator aimAnimator, float value)
		{
			aimAnimator.bapi_pitchClipCycleStart = value;
		}

		public static float GetYawClipCycleStart(AimAnimator aimAnimator)
		{
			return aimAnimator.bapi_yawClipCycleStart;
		}

		public static void SetYawClipCycleStart(AimAnimator aimAnimator, float value)
		{
			aimAnimator.bapi_yawClipCycleStart = value;
		}

		public static FixedTimeStamp GetLastJumpTime(CharacterBody characterBody)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return characterBody.bapi_lastJumpTime;
		}

		public static void SetLastJumpTime(CharacterBody characterBody, FixedTimeStamp 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)
			characterBody.bapi_lastJumpTime = value;
		}

		public static void SetClientBuffs(CharacterBody characterBody, int[] value)
		{
			characterBody.bapi_clientBuffs = value;
		}

		public static int[] GetClientBuffs(CharacterBody characterBody)
		{
			return characterBody.bapi_clientBuffs;
		}

		public static void SetScale(EffectData effectData, Vector3? value)
		{
			effectData.bapi_scale = value;
		}

		public static Vector3? GetScale(EffectData effectData)
		{
			return effectData.bapi_scale;
		}

		public static void SetEffectInstance(EffectData effectData, EffectComponent effectComponent)
		{
			effectData.bapi_effectInstance = effectComponent;
		}

		public static EffectComponent GetEffectInstance(EffectData effectData)
		{
			return effectData.bapi_effectInstance;
		}

		public static CharacterBody GetCharacterBody(Interactor interactor)
		{
			return interactor.bapi_characterBody;
		}

		public static void SetCharacterBody(Interactor interactor, CharacterBody characterBody)
		{
			interactor.bapi_characterBody = characterBody;
		}

		public static bool GetAppliedChanges(DccsPool dccsPool)
		{
			return dccsPool.bapi_appliedChanges;
		}

		public static void SetAppliedChanges(DccsPool dccsPool, bool value)
		{
			dccsPool.bapi_appliedChanges = value;
		}

		public static CharacterMaster GetCharacterMaster(Inventory inventory)
		{
			return inventory.bapi_characterMaster;
		}

		public static void SetCharacterMaster(Inventory inventory, CharacterMaster characterMaster)
		{
			inventory.bapi_characterMaster = characterMaster;
		}

		public static void SetSprint(GenericSkill genericSkill, bool value)
		{
			genericSkill.bapi_sprint = value;
		}

		public static bool GetSprint(GenericSkill genericSkill)
		{
			return genericSkill.bapi_sprint;
		}

		public static void SetSprintSkill(SkillLocator skillLocator, GenericSkill value)
		{
			skillLocator.bapi_sprintSkill = value;
		}

		public static GenericSkill GetSprintSkill(SkillLocator skillLocator)
		{
			return skillLocator.bapi_sprintSkill;
		}

		public static void SetEndPosition(BlastAttack blastAttack, Vector3? vector3)
		{
			blastAttack.bapi_endPosition = vector3;
		}

		public static Vector3? GetEndPosition(BlastAttack blastAttack)
		{
			return blastAttack.bapi_endPosition;
		}

		public static void SetNearestPositionOnLineFromHitPosition(ref HitPoint hitPoint, Vector3? vector3)
		{
			hitPoint.bapi_nearestPositionOnLineFromHitPosition = vector3;
		}

		public static Vector3? GetNearestPositionOnLineFromHitPosition(HitPoint hitPoint)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return hitPoint.bapi_nearestPositionOnLineFromHitPosition;
		}

		public static void SetPreviousPosition(CharacterBody characterBody, Vector3 vector3)
		{
			//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)
			characterBody.bapi_previousPosition = vector3;
		}

		public static Vector3 GetPreviousPosition(CharacterBody characterBody)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return characterBody.bapi_previousPosition;
		}

		public static void SetPositionDelta(CharacterBody characterBody, Vector3 vector3)
		{
			//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)
			characterBody.bapi_positionDelta = vector3;
		}

		public static Vector3 GetPositionDelta(CharacterBody characterBody)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return characterBody.bapi_positionDelta;
		}
	}
}