Decompiled source of WolfFixes v1.3.0

WolfoFixes.dll

Decompiled 3 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
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 EntityStates;
using EntityStates.Chef;
using EntityStates.Croco;
using EntityStates.DroneCombiner;
using EntityStates.Engi.SpiderMine;
using EntityStates.EngiTurret.EngiTurretWeapon;
using EntityStates.Fauna;
using EntityStates.GlobalSkills.LunarDetonator;
using EntityStates.InfiniteTowerSafeWard;
using EntityStates.LemurianBruiserMonster;
using EntityStates.LemurianMonster;
using EntityStates.MajorConstruct.Weapon;
using EntityStates.Merc;
using EntityStates.QuestVolatileBattery;
using EntityStates.ScavMonster;
using EntityStates.VagrantNovaItem;
using HG;
using HarmonyLib;
using IL.EntityStates.CaptainSupplyDrop;
using IL.EntityStates.Commando.CommandoWeapon;
using IL.EntityStates.ShrineHalcyonite;
using IL.RoR2;
using IL.RoR2.Artifacts;
using IL.RoR2.Items;
using IL.RoR2.UI;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using MonoMod.RuntimeDetour;
using On;
using On.EntityStates.Chef;
using On.EntityStates.Croco;
using On.EntityStates.DroneCombiner;
using On.EntityStates.Engi.SpiderMine;
using On.EntityStates.Fauna;
using On.EntityStates.GlobalSkills.LunarDetonator;
using On.EntityStates.InfiniteTowerSafeWard;
using On.EntityStates.LemurianBruiserMonster;
using On.EntityStates.LemurianMonster;
using On.EntityStates.MajorConstruct.Weapon;
using On.EntityStates.Merc;
using On.EntityStates.QuestVolatileBattery;
using On.EntityStates.ScavMonster;
using On.EntityStates.VagrantNovaItem;
using On.RoR2;
using On.RoR2.Artifacts;
using On.RoR2.CharacterAI;
using On.RoR2.Stats;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RoR2;
using RoR2.CharacterAI;
using RoR2.CharacterSpeech;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.Stats;
using RoR2.UI;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.UI;
using WolfoLibrary;

[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("Wolfo")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A fix and library mod with various commands, methods and classes")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+4ef541cf04ba1111fff45792d8ed29de3a01225d")]
[assembly: AssemblyProduct("WolfoFixes")]
[assembly: AssemblyTitle("WolfoFixes")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace WolfoFixes
{
	internal class BodyFixes
	{
		public delegate Vector3 orig_footPosition(CharacterBody self);

		[CompilerGenerated]
		private static class <>O
		{
			public static hook_OnEnter <0>__FixDumbFruit;

			public static Manipulator <1>__FixCaptainBeaconNoCrit;

			public static Manipulator <2>__CommandoReloadStateRemove;

			public static hook_OnSpawnedServer <3>__XI_GhostEliteMinionFix;

			public static hook_OnEnter <4>__WhirlwindGround_OnEnter;

			public static hook_SetActiveEquipmentSlot <5>__Inventory_SetActiveEquipmentSlot;

			public static Func<orig_footPosition, CharacterBody, Vector3> <6>__FuckedUpFootPosition;

			public static hook_CheckDroneHasItems <7>__CharacterBody_CheckDroneHasItems;
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_OnEnter <>9__4_0;

			public static hook_OnExit <>9__4_1;

			public static Func<Instruction, bool> <>9__13_1;

			public static Func<bool, ProjectileDamage, bool> <>9__13_0;

			public static Func<Instruction, bool> <>9__16_1;

			public static Func<int, int> <>9__16_0;

			internal void <Start>b__4_0(orig_OnEnter orig, Spawn self)
			{
				orig.Invoke(self);
				if (NetworkServer.active)
				{
					((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility);
				}
			}

			internal void <Start>b__4_1(orig_OnExit orig, Spawn self)
			{
				orig.Invoke(self);
				if (NetworkServer.active)
				{
					((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
					((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f);
				}
			}

			internal bool <FixCaptainBeaconNoCrit>b__13_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchStfld(x, "RoR2.BulletAttack", "isCrit");
			}

			internal bool <FixCaptainBeaconNoCrit>b__13_0(bool a, ProjectileDamage projectileDamage)
			{
				return projectileDamage.crit;
			}

			internal bool <CommandoReloadStateRemove>b__16_1(Instruction x)
			{
				return ILPatternMatchingExt.MatchCallvirt(x, "RoR2.GenericSkill", "get_stock");
			}

			internal int <CommandoReloadStateRemove>b__16_0(int stock)
			{
				return 1;
			}
		}

		public static void FixBarnalceMinorsSpammingNotImplementedWithOpsTransport(Action<PseudoCharacterMotor, Vector3> orig, PseudoCharacterMotor self, Vector3 newVelocity)
		{
		}

		private static void Inventory_SetActiveEquipmentSlot(orig_SetActiveEquipmentSlot orig, Inventory self, byte slotIndex)
		{
			self.wasRecentlyExtraEquipmentSwapped = true;
			orig.Invoke(self, slotIndex);
		}

		private static void WhirlwindGround_OnEnter(orig_OnEnter orig, WhirlwindGround self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				((EntityState)self).characterBody.AddTimedBuff(Buffs.IgnoreFallDamage, 0.8f, 1);
			}
		}

		private static void FixHeresyForEnemies(orig_SetSkillOverride orig, GenericSkill self, object source, SkillDef skillDef, SkillOverridePriority priority)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0004: Invalid comparison between Unknown and I4
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			if ((int)priority == 3 && Object.op_Implicit((Object)(object)self.characterBody) && !self.characterBody.isPlayerControlled)
			{
				EntityStateMachine stateMachine = self.stateMachine;
				orig.Invoke(self, source, skillDef, priority);
				if (Object.op_Implicit((Object)(object)stateMachine))
				{
					self.stateMachine = stateMachine;
				}
			}
			else
			{
				orig.Invoke(self, source, skillDef, priority);
			}
		}

		public static void Start()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Expected O, but got Unknown
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Expected O, but got Unknown
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Expected O, but got Unknown
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: 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_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_025a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Expected O, but got Unknown
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_029a: Expected O, but got Unknown
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fc: Expected O, but got Unknown
			//IL_02b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bb: Expected O, but got Unknown
			object obj = <>c.<>9__4_0;
			if (obj == null)
			{
				hook_OnEnter val = delegate(orig_OnEnter orig, Spawn self)
				{
					orig.Invoke(self);
					if (NetworkServer.active)
					{
						((EntityState)self).characterBody.AddBuff(Buffs.HiddenInvincibility);
					}
				};
				<>c.<>9__4_0 = val;
				obj = (object)val;
			}
			Spawn.OnEnter += (hook_OnEnter)obj;
			object obj2 = <>c.<>9__4_1;
			if (obj2 == null)
			{
				hook_OnExit val2 = delegate(orig_OnExit orig, Spawn self)
				{
					orig.Invoke(self);
					if (NetworkServer.active)
					{
						((EntityState)self).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
						((EntityState)self).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 3f);
					}
				};
				<>c.<>9__4_1 = val2;
				obj2 = (object)val2;
			}
			Spawn.OnExit += (hook_OnExit)obj2;
			CharacterBody component = Addressables.LoadAssetAsync<GameObject>((object)"1336d77e77299964884c3bd02757fde7").WaitForCompletion().GetComponent<CharacterBody>();
			component.baseNameToken = "EQUIPMENT_DEATHPROJECTILE_NAME";
			component.portraitIcon = (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"dda5febead506894fa6e053cea042ddc").WaitForCompletion();
			object obj3 = <>O.<0>__FixDumbFruit;
			if (obj3 == null)
			{
				hook_OnEnter val3 = FixDumbFruit;
				<>O.<0>__FixDumbFruit = val3;
				obj3 = (object)val3;
			}
			HabitatFruitDeathState.OnEnter += (hook_OnEnter)obj3;
			HabitatFruitDeathState.deathSoundString = "Play_jellyfish_death";
			HabitatFruitDeathState.healPackMaxVelocity = 60f;
			HabitatFruitDeathState.fractionalHealing = 0.15f;
			HabitatFruitDeathState.scale = 1f;
			object obj4 = <>O.<1>__FixCaptainBeaconNoCrit;
			if (obj4 == null)
			{
				Manipulator val4 = FixCaptainBeaconNoCrit;
				<>O.<1>__FixCaptainBeaconNoCrit = val4;
				obj4 = (object)val4;
			}
			HitGroundState.OnEnter += (Manipulator)obj4;
			object obj5 = <>O.<2>__CommandoReloadStateRemove;
			if (obj5 == null)
			{
				Manipulator val5 = CommandoReloadStateRemove;
				<>O.<2>__CommandoReloadStateRemove = val5;
				obj5 = (object)val5;
			}
			FirePistol2.FixedUpdate += (Manipulator)obj5;
			object obj6 = <>O.<3>__XI_GhostEliteMinionFix;
			if (obj6 == null)
			{
				hook_OnSpawnedServer val6 = XI_GhostEliteMinionFix;
				<>O.<3>__XI_GhostEliteMinionFix = val6;
				obj6 = (object)val6;
			}
			NetworkedBodySpawnSlot.OnSpawnedServer += (hook_OnSpawnedServer)obj6;
			Addressables.LoadAssetAsync<EntityStateConfiguration>((object)"04deef0aeeb41dc4aa4ad14f7f967526").WaitForCompletion().serializedFieldsCollection.serializedFields[3].fieldName = "baseDuration";
			Addressables.LoadAssetAsync<GameObject>((object)"c00152ae354576245849336ff7e67ba6").WaitForCompletion().GetComponent<ProjectileExplosion>()
				.childrenDamageCoefficient = 1f / 35f;
			CharacterBody component2 = Addressables.LoadAssetAsync<GameObject>((object)"746b53f076ca9af4d89f67c981d2bbf9").WaitForCompletion().GetComponent<CharacterBody>();
			component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x800);
			CharacterBody component3 = Addressables.LoadAssetAsync<GameObject>((object)"a0a8fa4272069874b9e538c59bbda5ed").WaitForCompletion().GetComponent<CharacterBody>();
			component3.bodyFlags = (BodyFlags)(component3.bodyFlags | 0x800);
			CharacterBody component4 = Addressables.LoadAssetAsync<GameObject>((object)"7dfb4548829852a49a4b2840046787ed").WaitForCompletion().GetComponent<CharacterBody>();
			component4.bodyFlags = (BodyFlags)(component4.bodyFlags | 0x800);
			CharacterBody component5 = Addressables.LoadAssetAsync<GameObject>((object)"769510dc6be546b40aa3aca3cf93945c").WaitForCompletion().GetComponent<CharacterBody>();
			component5.bodyFlags = (BodyFlags)(component5.bodyFlags | 0x800);
			CharacterBody component6 = Addressables.LoadAssetAsync<GameObject>((object)"8684165ea0542bf4bae1eea1f5865386").WaitForCompletion().GetComponent<CharacterBody>();
			component6.bodyFlags = (BodyFlags)(component6.bodyFlags | 0x800);
			CharacterBody component7 = Addressables.LoadAssetAsync<GameObject>((object)"9d63f2d3bc6c52c44883128cc4b97bf4").WaitForCompletion().GetComponent<CharacterBody>();
			component7.bodyFlags = (BodyFlags)(component7.bodyFlags | 0x800);
			DLC3Fixes();
			object obj7 = <>O.<4>__WhirlwindGround_OnEnter;
			if (obj7 == null)
			{
				hook_OnEnter val7 = WhirlwindGround_OnEnter;
				<>O.<4>__WhirlwindGround_OnEnter = val7;
				obj7 = (object)val7;
			}
			WhirlwindGround.OnEnter += (hook_OnEnter)obj7;
			object obj8 = <>O.<5>__Inventory_SetActiveEquipmentSlot;
			if (obj8 == null)
			{
				hook_SetActiveEquipmentSlot val8 = Inventory_SetActiveEquipmentSlot;
				<>O.<5>__Inventory_SetActiveEquipmentSlot = val8;
				obj8 = (object)val8;
			}
			Inventory.SetActiveEquipmentSlot += (hook_SetActiveEquipmentSlot)obj8;
			MethodInfo setMethod = typeof(PseudoCharacterMotor).GetProperty("velocityAuthority", BindingFlags.Instance | BindingFlags.Public).GetSetMethod();
			MethodInfo method = typeof(BodyFixes).GetMethod("FixBarnalceMinorsSpammingNotImplementedWithOpsTransport", BindingFlags.Static | BindingFlags.Public);
			Hook val9 = new Hook((MethodBase)setMethod, method);
		}

		public static void DLC3Fixes()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Expected O, but got Unknown
			SkillDef val = Addressables.LoadAssetAsync<SkillDef>((object)"1df669ea25cc9cc408ff56b4a2571af9").WaitForCompletion();
			((SerializableEntityStateType)(ref val.activationState)).typeName = "EntityStates.Drone.DroneJailer.AssumePosition";
			Hook val2 = new Hook((MethodBase)typeof(CharacterBody).GetProperty("footPosition", BindingFlags.Instance | BindingFlags.Public).GetGetMethod(), (Delegate)new Func<orig_footPosition, CharacterBody, Vector3>(FuckedUpFootPosition));
			object obj = <>O.<7>__CharacterBody_CheckDroneHasItems;
			if (obj == null)
			{
				hook_CheckDroneHasItems val3 = CharacterBody_CheckDroneHasItems;
				<>O.<7>__CharacterBody_CheckDroneHasItems = val3;
				obj = (object)val3;
			}
			CharacterBody.CheckDroneHasItems += (hook_CheckDroneHasItems)obj;
		}

		private static bool CharacterBody_CheckDroneHasItems(orig_CheckDroneHasItems orig, CharacterBody self)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Invalid comparison between Unknown and I4
			//IL_0086: 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_0092: Invalid comparison between Unknown and I4
			//IL_00e3: 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_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			bool flag = orig.Invoke(self);
			if ((self.bodyFlags & 2) > 0)
			{
				if (self.inventory.GetItemCountPermanent(Items.CaptainDefenseMatrix) > 0 || self.inventory.GetItemCountPermanent(Items.DroneWeaponsBoost) > 0 || self.inventory.GetItemCountPermanent(Items.DroneDynamiteDisplay) > 0 || self.inventory.GetItemCountPermanent(Items.TransferDebuffOnHit) > 0)
				{
					self.bodyFlags = (BodyFlags)(self.bodyFlags | 0x200000);
					flag = true;
				}
			}
			else if ((self.bodyFlags & 0x2000) > 0 && (self.inventory.GetItemCountPermanent(Items.DroneWeaponsBoost) > 0 || self.inventory.GetItemCountPermanent(Items.DroneDynamiteDisplay) > 0))
			{
				self.bodyFlags = (BodyFlags)(self.bodyFlags | 0x200000);
				flag = true;
			}
			if (!flag && ((Enum)self.bodyFlags).HasFlag((Enum)(object)(BodyFlags)2097152))
			{
				self.bodyFlags = (BodyFlags)(self.bodyFlags & -2097153);
			}
			return flag;
		}

		public static Vector3 FuckedUpFootPosition(orig_footPosition orig, CharacterBody 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_0030: 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_0034: Unknown result type (might be due to invalid IL or missing references)
			Vector3 result = orig(self);
			if (Object.op_Implicit((Object)(object)self.characterMotor))
			{
				result.y += self.characterMotor.capsuleYOffset;
			}
			return result;
		}

		public static void CallLate()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			CharacterBody childBody = BodyPrefabs.ChildBody;
			childBody.bodyFlags = (BodyFlags)(childBody.bodyFlags | 0x200);
		}

		public static void XI_GhostEliteMinionFix(orig_OnSpawnedServer orig, NetworkedBodySpawnSlot self, GameObject ownerBodyObject, SpawnResult spawnResult, Action<ISlot, SpawnResult> callback)
		{
			//IL_0004: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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, ownerBodyObject, spawnResult, callback);
			if (!spawnResult.success || !Object.op_Implicit((Object)(object)spawnResult.spawnedInstance) || !Object.op_Implicit((Object)(object)ownerBodyObject))
			{
				return;
			}
			CharacterBody component = ownerBodyObject.GetComponent<CharacterBody>();
			Inventory component2 = spawnResult.spawnedInstance.GetComponent<Inventory>();
			if (Object.op_Implicit((Object)(object)component2))
			{
				component2.CopyEquipmentFrom(component.inventory);
				if (component.inventory.GetItemCount(Items.Ghost) > 0)
				{
					component2.GiveItem(Items.Ghost, 1);
					component2.GiveItem(Items.HealthDecay, 30);
					component2.GiveItem(Items.BoostDamage, 150);
				}
			}
		}

		public static void ChefFixes()
		{
		}

		private static void FallDamageImmunityOnOilSpillCancel(orig_OnExit orig, OilSpillBase self)
		{
			((EntityState)self).characterBody.AddTimedBuff(Buffs.IgnoreFallDamage, 0.25f);
			orig.Invoke(self);
		}

		private static void FixCaptainBeaconNoCrit(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.BulletAttack", "isCrit")
			}))
			{
				val.Emit(OpCodes.Ldloc_1);
				val.EmitDelegate<Func<bool, ProjectileDamage, bool>>((Func<bool, ProjectileDamage, bool>)((bool a, ProjectileDamage projectileDamage) => projectileDamage.crit));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixCaptainBeaconNoCrit");
			}
		}

		private static void XI_LaserFix(orig_OnExit orig, FireLaser self)
		{
			orig.Invoke(self);
			((EntityState)self).outer.SetNextState(((FireBeam)self).GetNextState());
		}

		private static void FixDumbFruit(orig_OnEnter orig, HabitatFruitDeathState self)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			Transform transform = ((Component)((EntityState)self).characterBody.mainHurtBox).transform;
			EffectManager.SimpleImpactEffect(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Jellyfish/JellyfishDeath.prefab").WaitForCompletion(), transform.position, Vector3.up, false);
			if (NetworkServer.active)
			{
				GameObject val = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Prefabs/NetworkedObjects/HealPack"), transform.position, Random.rotation);
				val.GetComponent<TeamFilter>().teamIndex = (TeamIndex)1;
				val.GetComponentInChildren<HealthPickup>().fractionalHealing = HabitatFruitDeathState.fractionalHealing;
				val.transform.localScale = new Vector3(HabitatFruitDeathState.scale, HabitatFruitDeathState.scale, HabitatFruitDeathState.scale);
				val.GetComponent<Rigidbody>().AddForce(Random.insideUnitSphere * HabitatFruitDeathState.healPackMaxVelocity, (ForceMode)2);
				NetworkServer.Spawn(val);
			}
		}

		public static void CommandoReloadStateRemove(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.GenericSkill", "get_stock")
			}))
			{
				val.EmitDelegate<Func<int, int>>((Func<int, int>)((int stock) => 1));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : CommandoReloadStateRemove");
			}
		}

		private static void WhirlwindBase_OnEnter(orig_OnEnter orig, WhirlwindBase self)
		{
			orig.Invoke(self);
			if (NetworkServer.active)
			{
				((EntityState)self).characterBody.AddTimedBuff(Buffs.IgnoreFallDamage, self.duration);
			}
		}
	}
	internal class MithrixPhase4Fix : MonoBehaviour
	{
		public bool stoleItems = false;

		public void Start()
		{
			SetStateOnHurt component = ((Component)this).GetComponent<SetStateOnHurt>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.canBeHitStunned = true;
			}
			HurtBoxGroup component2 = ((Component)this).GetComponent<HurtBoxGroup>();
			if (Object.op_Implicit((Object)(object)component2) && component2.hurtBoxesDeactivatorCounter == 0)
			{
				component2.SetHurtboxesActive(true);
			}
		}
	}
	internal class DCCS_SpawnPool
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_IsUnlockedBeforeLooping <0>__NoPreLoopPostLoop;

			public static hook_PreStartClient <1>__FixRareStagesWithoutNodesWhenCalledFor;

			public static hook_OnStartServer <2>__AccessCodesMissionController_OnStartServer;

			public static Action<SceneDirector, DirectorCardCategorySelection> <3>__SceneDirector_onGenerateInteractableCardSelection;
		}

		public static void Main()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Expected O, but got Unknown
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Expected O, but got Unknown
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Expected O, but got Unknown
			DCCSFixes();
			SpawnCardFixes();
			SceneCollection val = Addressables.LoadAssetAsync<SceneCollection>((object)"RoR2/Base/SceneGroups/sgStage1.asset").WaitForCompletion();
			((SceneEntry)(ref val._sceneEntries[0])).weight = WConfig.cfgStage1Weight.Value;
			((SceneEntry)(ref val._sceneEntries[1])).weight = WConfig.cfgStage1Weight.Value;
			((SceneEntry)(ref val._sceneEntries[2])).weight = WConfig.cfgStage1Weight.Value;
			((SceneEntry)(ref val._sceneEntries[3])).weight = WConfig.cfgStage1Weight.Value;
			((SceneEntry)(ref val._sceneEntries[5])).weight = 1f;
			SceneCollection val2 = Addressables.LoadAssetAsync<SceneCollection>((object)"RoR2/Base/SceneGroups/loopSgStage1.asset").WaitForCompletion();
			((SceneEntry)(ref val2._sceneEntries[0])).weight = WConfig.cfgStage1Weight.Value;
			((SceneEntry)(ref val2._sceneEntries[1])).weight = WConfig.cfgStage1Weight.Value;
			((SceneEntry)(ref val2._sceneEntries[2])).weight = WConfig.cfgStage1Weight.Value;
			((SceneEntry)(ref val2._sceneEntries[3])).weight = WConfig.cfgStage1Weight.Value;
			object obj = <>O.<0>__NoPreLoopPostLoop;
			if (obj == null)
			{
				hook_IsUnlockedBeforeLooping val3 = NoPreLoopPostLoop;
				<>O.<0>__NoPreLoopPostLoop = val3;
				obj = (object)val3;
			}
			BazaarController.IsUnlockedBeforeLooping += (hook_IsUnlockedBeforeLooping)obj;
			object obj2 = <>O.<1>__FixRareStagesWithoutNodesWhenCalledFor;
			if (obj2 == null)
			{
				hook_PreStartClient val4 = FixRareStagesWithoutNodesWhenCalledFor;
				<>O.<1>__FixRareStagesWithoutNodesWhenCalledFor = val4;
				obj2 = (object)val4;
			}
			Stage.PreStartClient += (hook_PreStartClient)obj2;
			object obj3 = <>O.<2>__AccessCodesMissionController_OnStartServer;
			if (obj3 == null)
			{
				hook_OnStartServer val5 = AccessCodesMissionController_OnStartServer;
				<>O.<2>__AccessCodesMissionController_OnStartServer = val5;
				obj3 = (object)val5;
			}
			AccessCodesMissionController.OnStartServer += (hook_OnStartServer)obj3;
			SceneDirector.onGenerateInteractableCardSelection += SceneDirector_onGenerateInteractableCardSelection;
		}

		private static void SceneDirector_onGenerateInteractableCardSelection(SceneDirector self, DirectorCardCategorySelection dccs)
		{
			if (!WConfig.cfgTempShopWeight.Value)
			{
				return;
			}
			int num = dccs.FindCategoryIndexByName("Chests");
			if (num == -1)
			{
				return;
			}
			DirectorCard directorCard = DccsUtil.GetDirectorCard(ref dccs.categories[num].cards, "ItemsShop");
			if (directorCard != null)
			{
				DirectorCard directorCard2 = DccsUtil.GetDirectorCard(ref dccs.categories[num].cards, "1");
				if (directorCard2 != null && directorCard2.selectionWeight == 24)
				{
					directorCard.selectionWeight = 1;
					Debug.Log((object)"Fixing TempShop weight on SotS stage");
				}
			}
		}

		private static void AccessCodesMissionController_OnStartServer(orig_OnStartServer orig, AccessCodesMissionController self)
		{
			if (SceneInfo.instance.sceneDef.baseSceneName == "repurposedcrater")
			{
				self.ignoreSolusWingDeath = true;
			}
			orig.Invoke(self);
		}

		private static void FixRareStagesWithoutNodesWhenCalledFor(orig_PreStartClient orig, Stage self)
		{
			//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)
			//IL_00a0: 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)
			orig.Invoke(self);
			if (!NetworkServer.active)
			{
				return;
			}
			string baseSceneName = SceneInfo.instance.sceneDef.baseSceneName;
			string text = baseSceneName;
			string text2 = text;
			if (!(text2 == "itancientloft"))
			{
				if (text2 == "itmoon")
				{
					NodeGraph val = Addressables.LoadAssetAsync<NodeGraph>((object)"RoR2/DLC1/itmoon/itmoon_GroundNodeGraph.asset").WaitForCompletion();
					for (int i = 0; i < val.nodes.Length; i += 10)
					{
						ref NodeFlags flags = ref val.nodes[i].flags;
						flags = (NodeFlags)((uint)flags | 1u);
					}
				}
			}
			else
			{
				NodeGraph val2 = Addressables.LoadAssetAsync<NodeGraph>((object)"RoR2/DLC1/itancientloft/itancientloft_GroundNodeGraph.asset").WaitForCompletion();
				for (int j = 0; j < val2.nodes.Length; j += 10)
				{
					ref NodeFlags flags2 = ref val2.nodes[j].flags;
					flags2 = (NodeFlags)((uint)flags2 | 1u);
				}
			}
		}

		public static bool NoPreLoopPostLoop(orig_IsUnlockedBeforeLooping orig, BazaarController self, SceneDef sceneDef)
		{
			if (WConfig.cfgLoopSeers.Value && Object.op_Implicit((Object)(object)sceneDef.loopedSceneDef) && Run.instance.stageClearCount >= 5)
			{
				return false;
			}
			return orig.Invoke(self, sceneDef);
		}

		public static void DCCSFixes()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: 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)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Expected O, but got Unknown
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Expected O, but got Unknown
			DccsPool val = Addressables.LoadAssetAsync<DccsPool>((object)"RoR2/DLC2/artifactworld02/dpArtifactWorld02Monsters.asset").WaitForCompletion();
			((PoolEntry)val.poolCategories[0].includedIfConditionsMet[0]).dccs = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"RoR2/DLC2/artifactworld02/dccsArtifactWorld02Monsters_DLC1.asset").WaitForCompletion();
			DirectorCardCategorySelection val2 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"eca601c0708cfe940b371b5cae6a4872").WaitForCompletion();
			val2.categories[0].cards[0].spawnCard = null;
			val2.categories[1].cards[0].spawnCard = null;
			val2.categories[0].cards[0].spawnCardReference = new AssetReferenceT<SpawnCard>("cf55a1f0cb720ec4eb136a5976013bd0");
			val2.categories[1].cards[0].spawnCardReference = new AssetReferenceT<SpawnCard>("0ca64dc7fa66f4e4a88352d08bf15e66");
			DirectorCardCategorySelection val3 = Addressables.LoadAssetAsync<DirectorCardCategorySelection>((object)"359a1dff413474745a1d4076c1b26aa7").WaitForCompletion();
			val3.AddCard(0, new DirectorCard
			{
				spawnCardReference = new AssetReferenceT<SpawnCard>("1d23f78593a91a04f818ca9895f4e7d7"),
				selectionWeight = 1
			});
			val3.AddCard(0, new DirectorCard
			{
				spawnCardReference = new AssetReferenceT<SpawnCard>("db1a26c64dfaf5043949b2aedf193269"),
				selectionWeight = 1
			});
		}

		public static void SpawnCardFixes()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			CharacterSpawnCard obj = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"f7aba48d470b1594281c0eab455a12dd").WaitForCompletion();
			((SpawnCard)obj).forbiddenFlags = (NodeFlags)(((SpawnCard)obj).forbiddenFlags & 0xFE);
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"32c40c2b1da4a4244871ef499447ac1a").WaitForCompletion().maxSpawnsPerStage = 1;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"2eaec01927ea16245822dcb50080cba3").WaitForCompletion().skipSpawnWhenDevotionArtifactEnabled = true;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"5a86990b032424e48b4b8456f7d684c9").WaitForCompletion().skipSpawnWhenSacrificeArtifactEnabled = false;
		}
	}
	internal class DevotionFixes
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_OnDevotionArtifactDisabled <0>__Fix_EliteListBeingBlank;

			public static hook_CreateItemTakenOrb <1>__Fix_NullrefWhenOrb;

			public static hook_UpdateAllMinions <2>__AddItemToAllFirst;

			public static Manipulator <3>__RemoveNormalItemGiving;

			public static Manipulator <4>__CheckIfNullBody;

			public static hook_OnDevotedBodyDead <5>__CheckIfInventoryNull;

			public static hook_GetOrCreateDevotionInventoryController <6>__CheckIfRandomlyPlayerMasterNull;

			public static hook_EvolveDevotedLumerian <7>__FixEvolveWithoutBody;

			public static Action<Run> <8>__OnRunDestroy;

			public static hook_OnEnter <9>__SoundBugged;

			public static hook_OnEnter <10>__NoSoundEven;
		}

		[CompilerGenerated]
		private sealed class <FixItemComponentsBeingDeleted>d__10 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public DevotionInventoryController self;

			private MinionGroup <minionGroup>5__1;

			private MinionOwnership[] <>s__2;

			private int <>s__3;

			private MinionOwnership <minionOwnership>5__4;

			private DevotedLemurianController <devotedLemurianController>5__5;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <FixItemComponentsBeingDeleted>d__10(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<minionGroup>5__1 = null;
				<>s__2 = null;
				<minionOwnership>5__4 = null;
				<devotedLemurianController>5__5 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0026: Unknown result type (might be due to invalid IL or missing references)
				//IL_0030: Expected O, but got Unknown
				//IL_0064: Unknown result type (might be due to invalid IL or missing references)
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSeconds(1f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					if (Object.op_Implicit((Object)(object)self._summonerMaster))
					{
						<minionGroup>5__1 = MinionGroup.FindGroup(((NetworkBehaviour)self._summonerMaster).netId);
						if (<minionGroup>5__1 != null)
						{
							<>s__2 = <minionGroup>5__1.members;
							for (<>s__3 = 0; <>s__3 < <>s__2.Length; <>s__3++)
							{
								<minionOwnership>5__4 = <>s__2[<>s__3];
								if (Object.op_Implicit((Object)(object)<minionOwnership>5__4) && ((Component)((Component)<minionOwnership>5__4).GetComponent<CharacterMaster>()).TryGetComponent<DevotedLemurianController>(ref <devotedLemurianController>5__5) && Object.op_Implicit((Object)(object)<devotedLemurianController>5__5.LemurianBody) && Object.op_Implicit((Object)(object)<devotedLemurianController>5__5.LemurianBody.inventory))
								{
									<devotedLemurianController>5__5.LemurianBody.OnInventoryChanged();
								}
								<devotedLemurianController>5__5 = null;
								<minionOwnership>5__4 = null;
							}
							<>s__2 = null;
						}
						<minionGroup>5__1 = null;
					}
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public static void Start()
		{
			//IL_0011: 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_001c: Expected O, but got Unknown
			//IL_0032: 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)
			//IL_003d: Expected O, but got Unknown
			//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)
			//IL_005e: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Expected O, but got Unknown
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Expected O, but got Unknown
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Expected O, but got Unknown
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//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_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Expected O, but got Unknown
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Expected O, but got Unknown
			object obj = <>O.<0>__Fix_EliteListBeingBlank;
			if (obj == null)
			{
				hook_OnDevotionArtifactDisabled val = Fix_EliteListBeingBlank;
				<>O.<0>__Fix_EliteListBeingBlank = val;
				obj = (object)val;
			}
			DevotionInventoryController.OnDevotionArtifactDisabled += (hook_OnDevotionArtifactDisabled)obj;
			object obj2 = <>O.<1>__Fix_NullrefWhenOrb;
			if (obj2 == null)
			{
				hook_CreateItemTakenOrb val2 = Fix_NullrefWhenOrb;
				<>O.<1>__Fix_NullrefWhenOrb = val2;
				obj2 = (object)val2;
			}
			LemurianEggController.CreateItemTakenOrb += (hook_CreateItemTakenOrb)obj2;
			object obj3 = <>O.<2>__AddItemToAllFirst;
			if (obj3 == null)
			{
				hook_UpdateAllMinions val3 = AddItemToAllFirst;
				<>O.<2>__AddItemToAllFirst = val3;
				obj3 = (object)val3;
			}
			DevotionInventoryController.UpdateAllMinions += (hook_UpdateAllMinions)obj3;
			object obj4 = <>O.<3>__RemoveNormalItemGiving;
			if (obj4 == null)
			{
				Manipulator val4 = RemoveNormalItemGiving;
				<>O.<3>__RemoveNormalItemGiving = val4;
				obj4 = (object)val4;
			}
			DevotionInventoryController.UpdateMinionInventory += (Manipulator)obj4;
			object obj5 = <>O.<4>__CheckIfNullBody;
			if (obj5 == null)
			{
				Manipulator val5 = CheckIfNullBody;
				<>O.<4>__CheckIfNullBody = val5;
				obj5 = (object)val5;
			}
			DevotionInventoryController.UpdateMinionInventory += (Manipulator)obj5;
			object obj6 = <>O.<5>__CheckIfInventoryNull;
			if (obj6 == null)
			{
				hook_OnDevotedBodyDead val6 = CheckIfInventoryNull;
				<>O.<5>__CheckIfInventoryNull = val6;
				obj6 = (object)val6;
			}
			DevotedLemurianController.OnDevotedBodyDead += (hook_OnDevotedBodyDead)obj6;
			object obj7 = <>O.<6>__CheckIfRandomlyPlayerMasterNull;
			if (obj7 == null)
			{
				hook_GetOrCreateDevotionInventoryController val7 = CheckIfRandomlyPlayerMasterNull;
				<>O.<6>__CheckIfRandomlyPlayerMasterNull = val7;
				obj7 = (object)val7;
			}
			DevotionInventoryController.GetOrCreateDevotionInventoryController += (hook_GetOrCreateDevotionInventoryController)obj7;
			object obj8 = <>O.<7>__FixEvolveWithoutBody;
			if (obj8 == null)
			{
				hook_EvolveDevotedLumerian val8 = FixEvolveWithoutBody;
				<>O.<7>__FixEvolveWithoutBody = val8;
				obj8 = (object)val8;
			}
			DevotionInventoryController.EvolveDevotedLumerian += (hook_EvolveDevotedLumerian)obj8;
			Run.onRunDestroyGlobal += DevotionInventoryController.OnRunDestroy;
			if (WConfig.cfgDevotionSpareDroneParts.Value)
			{
				GameObject val9 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/DevotedLemurianBody.prefab").WaitForCompletion();
				GameObject val10 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/CU8/DevotedLemurianBruiserBody.prefab").WaitForCompletion();
				CharacterBody component = val9.GetComponent<CharacterBody>();
				component.bodyFlags = (BodyFlags)(component.bodyFlags | 0x2000);
				CharacterBody component2 = val10.GetComponent<CharacterBody>();
				component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x2000);
			}
			object obj9 = <>O.<9>__SoundBugged;
			if (obj9 == null)
			{
				hook_OnEnter val11 = SoundBugged;
				<>O.<9>__SoundBugged = val11;
				obj9 = (object)val11;
			}
			SpawnState.OnEnter += (hook_OnEnter)obj9;
			object obj10 = <>O.<10>__NoSoundEven;
			if (obj10 == null)
			{
				hook_OnEnter val12 = NoSoundEven;
				<>O.<10>__NoSoundEven = val12;
				obj10 = (object)val12;
			}
			SpawnState.OnEnter += (hook_OnEnter)obj10;
		}

		private static void NoSoundEven(orig_OnEnter orig, SpawnState self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).characterBody.master).GetComponent<DevotedLemurianController>()))
			{
				Util.PlaySound(SpawnState.devotionHissSoundString, ((EntityState)self).gameObject);
				Util.PlaySound(SpawnState.devotionSpawnSoundString, ((EntityState)self).gameObject);
			}
		}

		private static void SoundBugged(orig_OnEnter orig, SpawnState self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)((Component)((EntityState)self).characterBody.master).GetComponent<DevotedLemurianController>()))
			{
				Util.PlaySound(SpawnState.devotionHissSoundString, ((EntityState)self).gameObject);
				Util.PlaySound(SpawnState.devotionSpawnSoundString, ((EntityState)self).gameObject);
			}
		}

		private static void FixEvolveWithoutBody(orig_EvolveDevotedLumerian orig, DevotionInventoryController self, DevotedLemurianController devotedLemurianController)
		{
			//IL_005f: 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)
			if ((Object)(object)devotedLemurianController.LemurianBody == (Object)null && Object.op_Implicit((Object)(object)devotedLemurianController._lemurianMaster))
			{
				switch (devotedLemurianController.DevotedEvolutionLevel)
				{
				case 1:
					devotedLemurianController.LemurianInventory.SetEquipmentIndex(DevotionInventoryController.lowLevelEliteBuffs[Random.Range(0, DevotionInventoryController.lowLevelEliteBuffs.Count)]);
					break;
				case 2:
					devotedLemurianController.LemurianInventory.SetEquipmentIndex((EquipmentIndex)(-1));
					devotedLemurianController._lemurianMaster.bodyPrefab = BodyCatalog.FindBodyPrefab("DevotedLemurianBruiserBody");
					break;
				case 3:
					devotedLemurianController.LemurianInventory.SetEquipmentIndex(DevotionInventoryController.highLevelEliteBuffs[Random.Range(0, DevotionInventoryController.highLevelEliteBuffs.Count)]);
					break;
				}
			}
			else
			{
				orig.Invoke(self, devotedLemurianController);
			}
		}

		private static DevotionInventoryController CheckIfRandomlyPlayerMasterNull(orig_GetOrCreateDevotionInventoryController orig, Interactor summoner)
		{
			foreach (DevotionInventoryController instance in DevotionInventoryController.InstanceList)
			{
				if ((Object)(object)instance._summonerMaster == (Object)null)
				{
					Object.Destroy((Object)(object)instance);
				}
			}
			return orig.Invoke(summoner);
		}

		private static void CheckIfInventoryNull(orig_OnDevotedBodyDead orig, DevotedLemurianController self)
		{
			if (Object.op_Implicit((Object)(object)self) && (Object)(object)self._devotionInventoryController != (Object)null)
			{
				orig.Invoke(self);
			}
		}

		private static void CheckIfNullBody(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DevotionInventoryController", "activationSoundEventDef")
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<GameObject, DevotedLemurianController, GameObject>>((Func<GameObject, DevotedLemurianController, GameObject>)((GameObject obj, DevotedLemurianController lem) => ((Object)(object)lem.LemurianBody == (Object)null) ? null : obj));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : CheckIfNullBody");
			}
		}

		private static void RemoveNormalItemGiving(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0042: 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.MatchCallvirt(x, "RoR2.Inventory", "GiveItemPermanent")
			}))
			{
				val.Prev.OpCode = OpCodes.Ldc_I4_0;
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed: FixOneBehindRemoveItemHerel");
			}
		}

		private static void FixBodyComponentsSometimesJustNotBeingThere(orig_UpdateMinionInventory orig, DevotionInventoryController self, DevotedLemurianController devotedLemurianController, bool shouldEvolve)
		{
			orig.Invoke(self, devotedLemurianController, shouldEvolve);
			if (Object.op_Implicit((Object)(object)devotedLemurianController.LemurianBody) && Object.op_Implicit((Object)(object)devotedLemurianController.LemurianBody.inventory))
			{
				devotedLemurianController.LemurianBody.OnInventoryChanged();
			}
		}

		private static void AddItemToAllFirst(orig_UpdateAllMinions orig, DevotionInventoryController self, bool shouldEvolve)
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			if (shouldEvolve && Object.op_Implicit((Object)(object)self._summonerMaster))
			{
				MinionGroup val = MinionGroup.FindGroup(((NetworkBehaviour)self._summonerMaster).netId);
				if (val != null)
				{
					MinionOwnership[] members = val.members;
					DevotedLemurianController val3 = default(DevotedLemurianController);
					foreach (MinionOwnership val2 in members)
					{
						if (Object.op_Implicit((Object)(object)val2) && ((Component)((Component)val2).GetComponent<CharacterMaster>()).TryGetComponent<DevotedLemurianController>(ref val3))
						{
							self._devotionMinionInventory.GiveItem(val3.DevotionItem, 1);
						}
					}
				}
			}
			orig.Invoke(self, shouldEvolve);
			((MonoBehaviour)self).StartCoroutine(FixItemComponentsBeingDeleted(self));
		}

		[IteratorStateMachine(typeof(<FixItemComponentsBeingDeleted>d__10))]
		public static IEnumerator FixItemComponentsBeingDeleted(DevotionInventoryController self)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <FixItemComponentsBeingDeleted>d__10(0)
			{
				self = self
			};
		}

		private static void Fix_EliteListBeingBlank(orig_OnDevotionArtifactDisabled orig, RunArtifactManager runArtifactManager, ArtifactDef artifactDef)
		{
			if ((Object)(object)artifactDef == (Object)(object)Artifacts.Devotion)
			{
				List<EquipmentIndex> lowLevelEliteBuffs = new List<EquipmentIndex>(DevotionInventoryController.lowLevelEliteBuffs);
				List<EquipmentIndex> highLevelEliteBuffs = new List<EquipmentIndex>(DevotionInventoryController.highLevelEliteBuffs);
				orig.Invoke(runArtifactManager, artifactDef);
				DevotionInventoryController.lowLevelEliteBuffs = lowLevelEliteBuffs;
				DevotionInventoryController.highLevelEliteBuffs = highLevelEliteBuffs;
			}
			else
			{
				orig.Invoke(runArtifactManager, artifactDef);
			}
		}

		private static void Fix_NullrefWhenOrb(orig_CreateItemTakenOrb orig, LemurianEggController self, Vector3 effectOrigin, GameObject targetObject, ItemIndex itemIndex)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)DevotionInventoryController.s_effectPrefab))
			{
				DevotionInventoryController.OnDevotionArtifactEnabled(RunArtifactManager.instance, Artifacts.Devotion);
				Items.BoostDamage.hidden = true;
				Items.BoostHp.hidden = true;
			}
			orig.Invoke(self, effectOrigin, targetObject, itemIndex);
		}
	}
	internal class EquipmentFixes
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static Manipulator <0>__FixSawmarang;

			public static hook_SetupWings <1>__BugWingsAlways_SetupWings;

			public static hook_OnDisable <2>__BugWingsAlways_OnDisable;

			public static hook_OnEnter <3>__FallbackIfNoItemDisplay;
		}

		public static void Start()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Expected O, but got Unknown
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Expected O, but got Unknown
			Addressables.LoadAssetAsync<EquipmentDef>((object)"f2ddbb7586240e648945ad494ebe3984").WaitForCompletion().cooldown = 0f;
			Addressables.LoadAssetAsync<GameObject>((object)"9ca7d392fa3bb444b827d475b36b9253").WaitForCompletion().AddComponent<ThisIsASawmarang>();
			object obj = <>O.<0>__FixSawmarang;
			if (obj == null)
			{
				Manipulator val = FixSawmarang;
				<>O.<0>__FixSawmarang = val;
				obj = (object)val;
			}
			GlobalEventManager.ProcessHitEnemy += (Manipulator)obj;
			object obj2 = <>O.<1>__BugWingsAlways_SetupWings;
			if (obj2 == null)
			{
				hook_SetupWings val2 = BugWingsAlways_SetupWings;
				<>O.<1>__BugWingsAlways_SetupWings = val2;
				obj2 = (object)val2;
			}
			JetpackController.SetupWings += (hook_SetupWings)obj2;
			object obj3 = <>O.<2>__BugWingsAlways_OnDisable;
			if (obj3 == null)
			{
				hook_OnDisable val3 = BugWingsAlways_OnDisable;
				<>O.<2>__BugWingsAlways_OnDisable = val3;
				obj3 = (object)val3;
			}
			JetpackController.OnDisable += (hook_OnDisable)obj3;
			object obj4 = <>O.<3>__FallbackIfNoItemDisplay;
			if (obj4 == null)
			{
				hook_OnEnter val4 = FallbackIfNoItemDisplay;
				<>O.<3>__FallbackIfNoItemDisplay = val4;
				obj4 = (object)val4;
			}
			CountDown.OnEnter += (hook_OnEnter)obj4;
		}

		private static void FallbackIfNoItemDisplay(orig_OnEnter orig, CountDown self)
		{
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (self.vfxInstances.Length == 0 && Object.op_Implicit((Object)(object)((QuestVolatileBatteryBaseState)self).networkedBodyAttachment.attachedBody) && Object.op_Implicit((Object)(object)CountDown.vfxPrefab) && Object.op_Implicit((Object)(object)((QuestVolatileBatteryBaseState)self).attachedCharacterModel))
			{
				self.vfxInstances = (GameObject[])(object)new GameObject[1];
				GameObject val = Object.Instantiate<GameObject>(CountDown.vfxPrefab, ((QuestVolatileBatteryBaseState)self).networkedBodyAttachment.attachedBody.coreTransform);
				val.transform.localPosition = Vector3.zero;
				val.transform.localRotation = Quaternion.identity;
				val.transform.localScale = new Vector3(2.5f / val.transform.lossyScale.x, 2.5f / val.transform.lossyScale.y, 2.5f / val.transform.lossyScale.z);
				if (val.transform.localScale.z < 1f)
				{
					val.transform.localScale = new Vector3(1f, 1f, 1f);
				}
				Light component = ((Component)val.transform.GetChild(0)).GetComponent<Light>();
				component.range *= 3f;
				Light component2 = ((Component)val.transform.GetChild(0)).GetComponent<Light>();
				component2.intensity *= 3f;
				LightIntensityCurve component3 = ((Component)val.transform.GetChild(0)).GetComponent<LightIntensityCurve>();
				component3.timeMax /= 2f;
				self.vfxInstances[0] = val;
			}
		}

		private static void FixSawmarang(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_005f: 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.MatchLdsfld(x, "RoR2.RoR2Content/Equipment", "Saw"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.EquipmentDef", "get_equipmentIndex")
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<EquipmentIndex, DamageInfo, EquipmentIndex>>((Func<EquipmentIndex, DamageInfo, EquipmentIndex>)((EquipmentIndex eq, DamageInfo damageInfo) => Object.op_Implicit((Object)(object)damageInfo.inflictor.GetComponent<ThisIsASawmarang>()) ? Equipment.Saw.equipmentIndex : eq));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixSawmarang");
			}
		}

		private static void BugWingsAlways_SetupWings(orig_SetupWings orig, JetpackController self)
		{
			//IL_004a: 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_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			CharacterModel val = null;
			if (Object.op_Implicit((Object)(object)self.targetBody) && self.targetBody.isPlayerControlled)
			{
				val = ((Component)self.targetBody.modelLocator.modelTransform).GetComponent<CharacterModel>();
				if (Object.op_Implicit((Object)(object)val.itemDisplayRuleSet) && val.currentEquipmentDisplayIndex != Equipment.Jetpack.equipmentIndex)
				{
					DisplayRuleGroup equipmentDisplayRuleGroup = val.itemDisplayRuleSet.GetEquipmentDisplayRuleGroup(Equipment.Jetpack.equipmentIndex);
					val.InstantiateDisplayRuleGroup(equipmentDisplayRuleGroup, (ItemIndex)(-1), Equipment.Jetpack.equipmentIndex);
				}
			}
			orig.Invoke(self);
			if ((Object)(object)val != (Object)null)
			{
				DontDestroyIfJetpack dontDestroyIfJetpack = ((Component)val).GetComponent<DontDestroyIfJetpack>();
				if (!Object.op_Implicit((Object)(object)dontDestroyIfJetpack))
				{
					dontDestroyIfJetpack = ((Component)val).gameObject.AddComponent<DontDestroyIfJetpack>();
				}
				dontDestroyIfJetpack.characterModel = val;
				dontDestroyIfJetpack.Setup();
			}
		}

		private static void BugWingsAlways_OnDisable(orig_OnDisable orig, JetpackController self)
		{
			orig.Invoke(self);
			if (!Object.op_Implicit((Object)(object)self.targetBody) || !self.targetBody.isPlayerControlled)
			{
				return;
			}
			CharacterModel component = ((Component)self.targetBody.modelLocator.modelTransform).GetComponent<CharacterModel>();
			if (Object.op_Implicit((Object)(object)component.itemDisplayRuleSet))
			{
				DontDestroyIfJetpack component2 = ((Component)component).GetComponent<DontDestroyIfJetpack>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					component2.UnSetup();
				}
			}
		}
	}
	internal class ThisIsASawmarang : MonoBehaviour
	{
	}
	internal class DontDestroyIfJetpack : MonoBehaviour
	{
		public CharacterModel characterModel;

		public ParentedPrefabDisplay storedDisplay;

		public EquipmentIndex index;

		public void Setup()
		{
			//IL_0007: 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_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_003e: 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)
			index = Equipment.Jetpack.equipmentIndex;
			for (int num = characterModel.parentedPrefabDisplays.Count - 1; num >= 0; num--)
			{
				if (characterModel.parentedPrefabDisplays[num].equipmentIndex == index)
				{
					storedDisplay = characterModel.parentedPrefabDisplays[num];
					characterModel.parentedPrefabDisplays.RemoveAt(num);
					break;
				}
			}
		}

		public void UnSetup()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: 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)
			if (characterModel.currentEquipmentDisplayIndex == index)
			{
				characterModel.parentedPrefabDisplays.Add(storedDisplay);
			}
			else
			{
				((ParentedPrefabDisplay)(ref storedDisplay)).Undo();
			}
		}
	}
	internal class GameplayMisc
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static Manipulator <0>__SwarmsVengenceGooboFix;

			public static hook_PromoteIfHonor <1>__EliteOnlyArtifactManager_PromoteIfHonor;
		}

		public static void Start()
		{
			//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_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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_001c: Expected O, but got Unknown
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Expected O, but got Unknown
			object obj = <>O.<0>__SwarmsVengenceGooboFix;
			if (obj == null)
			{
				Manipulator val = SwarmsVengenceGooboFix;
				<>O.<0>__SwarmsVengenceGooboFix = val;
				obj = (object)val;
			}
			SwarmsArtifactManager.OnSpawnCardOnSpawnedServerGlobal += (Manipulator)obj;
			SceneDef val2 = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/habitat/habitat.asset").WaitForCompletion();
			val2.validForRandomSelection = true;
			val2 = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC2/helminthroost/helminthroost.asset").WaitForCompletion();
			val2.validForRandomSelection = true;
			GameObject val3 = Addressables.LoadAssetAsync<GameObject>((object)"e075b1933eaeb214180184c6d242f13a").WaitForCompletion();
			val3.GetComponent<ProjectileSimple>().lifetime = 3f;
			Object.Destroy((Object)(object)Addressables.LoadAssetAsync<GameObject>((object)"5459e8ded89cd0f4d84219750a7e10ac").WaitForCompletion().GetComponent<Deployable>());
			object obj2 = <>O.<1>__EliteOnlyArtifactManager_PromoteIfHonor;
			if (obj2 == null)
			{
				hook_PromoteIfHonor val4 = EliteOnlyArtifactManager_PromoteIfHonor;
				<>O.<1>__EliteOnlyArtifactManager_PromoteIfHonor = val4;
				obj2 = (object)val4;
			}
			EliteOnlyArtifactManager.PromoteIfHonor += (hook_PromoteIfHonor)obj2;
		}

		private static void EliteOnlyArtifactManager_PromoteIfHonor(orig_PromoteIfHonor orig, CharacterMaster instanceMaster, Xoroshiro128Plus rng, EliteDef[] eliteDefs)
		{
			orig.Invoke(instanceMaster, Run.instance.bossRewardRng, eliteDefs);
		}

		public static void AllowGhostsToSuicideProperly(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, "RoR2.HealthComponent", "Suicide")
			});
			if (val.TryGotoPrev((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0)
			}))
			{
				val.EmitDelegate<Func<HealthComponent, HealthComponent>>((Func<HealthComponent, HealthComponent>)delegate(HealthComponent stock)
				{
					stock.health = 1f;
					return stock;
				});
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : HealthComponent_ServerFixedUpdateHealthComponent_Suicide1");
			}
		}

		private static void SwarmsVengenceGooboFix(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.SpawnCard/SpawnResult", "spawnRequest"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.DirectorCore", "TrySpawnObject")
			}))
			{
				val.EmitDelegate<Func<SpawnResult, SpawnResult>>((Func<SpawnResult, SpawnResult>)delegate(SpawnResult result)
				{
					//IL_0001: 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)
					//IL_004a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0011: Unknown result type (might be due to invalid IL or missing references)
					//IL_004d: Unknown result type (might be due to invalid IL or missing references)
					//IL_0029: Unknown result type (might be due to invalid IL or missing references)
					//IL_002f: Unknown result type (might be due to invalid IL or missing references)
					if (Object.op_Implicit((Object)(object)result.spawnedInstance) && result.spawnRequest.spawnCard is MasterCopySpawnCard)
					{
						result.spawnRequest.spawnCard = (SpawnCard)(object)MasterCopySpawnCard.FromMaster(result.spawnedInstance.GetComponent<CharacterMaster>(), true, true, (Action<CharacterMaster>)null);
					}
					return result;
				});
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed: SwarmsArtifactManager_OnSpawnCardOnSpawnedServerGlobal");
			}
		}
	}
	internal class InteractableFixes
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_SetUpSeerStations <0>__FixDuplicateAndEmptyThirdSeers;

			public static hook_SetRunNextStageToTarget <1>__BazaarDisableAllSeers;

			public static hook_OnDeserialize <2>__FixBrokenAH_DroneCombinerCombining_OnDeserialize;
		}

		public static void Start()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Expected O, but got Unknown
			ShrineShapingFixes.Start();
			ShrineHalcyonFixes.Start();
			object obj = <>O.<0>__FixDuplicateAndEmptyThirdSeers;
			if (obj == null)
			{
				hook_SetUpSeerStations val = FixDuplicateAndEmptyThirdSeers;
				<>O.<0>__FixDuplicateAndEmptyThirdSeers = val;
				obj = (object)val;
			}
			BazaarController.SetUpSeerStations += (hook_SetUpSeerStations)obj;
			object obj2 = <>O.<1>__BazaarDisableAllSeers;
			if (obj2 == null)
			{
				hook_SetRunNextStageToTarget val2 = BazaarDisableAllSeers;
				<>O.<1>__BazaarDisableAllSeers = val2;
				obj2 = (object)val2;
			}
			SeerStationController.SetRunNextStageToTarget += (hook_SetRunNextStageToTarget)obj2;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"749e2ff7e1839074885efb0f82197ba7").WaitForCompletion().slightlyRandomizeOrientation = false;
			Addressables.LoadAssetAsync<InteractableSpawnCard>((object)"592ddd0e913440844b42eff65663abda").WaitForCompletion().slightlyRandomizeOrientation = false;
			object obj3 = <>O.<2>__FixBrokenAH_DroneCombinerCombining_OnDeserialize;
			if (obj3 == null)
			{
				hook_OnDeserialize val3 = FixBrokenAH_DroneCombinerCombining_OnDeserialize;
				<>O.<2>__FixBrokenAH_DroneCombinerCombining_OnDeserialize = val3;
				obj3 = (object)val3;
			}
			DroneCombinerCombining.OnDeserialize += (hook_OnDeserialize)obj3;
		}

		private static void FixBrokenAH_DroneCombinerCombining_OnDeserialize(orig_OnDeserialize orig, DroneCombinerCombining self, NetworkReader reader)
		{
			//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_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_000f: 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)
			NetworkInstanceId val = reader.ReadNetworkId();
			NetworkInstanceId val2 = reader.ReadNetworkId();
			GameObject val3 = ClientScene.FindLocalObject(val);
			GameObject val4 = ClientScene.FindLocalObject(val2);
			if (Object.op_Implicit((Object)(object)val3))
			{
				self.toUpgrade = val3.GetComponent<CharacterBody>();
			}
			if (Object.op_Implicit((Object)(object)val4))
			{
				self.toDestroy = val4.GetComponent<CharacterBody>();
			}
			self._controller = ((EntityState)self).gameObject.GetComponent<DroneCombinerController>();
		}

		private static void BazaarDisableAllSeers(orig_SetRunNextStageToTarget orig, SeerStationController self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)BazaarController.instance))
			{
				for (int i = 0; i < BazaarController.instance.seerStations.Length; i++)
				{
					((Component)BazaarController.instance.seerStations[i]).GetComponent<PurchaseInteraction>().SetAvailable(false);
				}
			}
		}

		private static void FixDuplicateAndEmptyThirdSeers(orig_SetUpSeerStations orig, BazaarController self)
		{
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: 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_00de: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			List<string> list = new List<string>();
			List<SeerStationController> list2 = new List<SeerStationController>();
			SeerStationController[] seerStations = self.seerStations;
			foreach (SeerStationController val in seerStations)
			{
				if (val.targetSceneDefIndex != -1)
				{
					string baseSceneName = SceneCatalog.indexToSceneDef[val.targetSceneDefIndex].baseSceneName;
					if (list.Contains(baseSceneName))
					{
						list2.Add(val);
					}
					else
					{
						list.Add(baseSceneName);
					}
				}
				else
				{
					list2.Add(val);
				}
			}
			if (list2.Count <= 0)
			{
				return;
			}
			SceneDef nextStageScene = Run.instance.nextStageScene;
			List<SceneDef> list3 = new List<SceneDef>();
			if ((Object)(object)nextStageScene != (Object)null)
			{
				int stageOrder = nextStageScene.stageOrder;
				Enumerator<SceneDef> enumerator = SceneCatalog.allSceneDefs.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						SceneDef current = enumerator.Current;
						if (current.stageOrder == stageOrder && ((Object)(object)current.requiredExpansion == (Object)null || Run.instance.IsExpansionEnabled(current.requiredExpansion)) && self.IsUnlockedBeforeLooping(current) && !list.Contains(current.baseSceneName))
						{
							list3.Add(current);
						}
					}
				}
				finally
				{
					((IDisposable)enumerator).Dispose();
				}
			}
			if (list3.Count <= 0)
			{
				return;
			}
			foreach (SeerStationController item in list2)
			{
				Util.ShuffleList<SceneDef>(list3, self.rng);
				int index = list3.Count - 1;
				item.SetTargetScene(list3[index]);
				list3.RemoveAt(index);
				((Component)item).GetComponent<PurchaseInteraction>().SetAvailable(true);
			}
		}
	}
	internal class ItemFixes
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static Manipulator <0>__FixStoneFluxBeingAppliedTwice;

			public static Manipulator <1>__FixChargedPerferatorCrit;

			public static Manipulator <2>__Antler_FixWrongAuth;

			public static hook_RpcRequestShardInfoClient <3>__Antler_FixNullRefOnNullMotor;

			public static Manipulator <4>__Bandolier_WrongAuthCheck;

			public static Manipulator <5>__RemoveOSPEntirelyIfYouAreBelowOSPThreshold;

			public static Manipulator <6>__FixWarpedReducingDamageAfterOSP;

			public static Manipulator <7>__FixWEchoDamageNotProccingPlanulaAnymoreAC141;

			public static Manipulator <8>__FixWEchoDamageDoubleDippingEnemyWatches;

			public static Manipulator <9>__FixWEchoDoubleDippingLunarRuin;

			public static Manipulator <10>__FixParryConsuemdOn0Damage0ProcAttacks;
		}

		public static void Start()
		{
			//IL_0011: 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_001c: Expected O, but got Unknown
			//IL_0032: 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)
			//IL_003d: Expected O, but got Unknown
			//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)
			//IL_005e: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Expected O, but got Unknown
			//IL_0108: 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_0113: Expected O, but got Unknown
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Expected O, but got Unknown
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Expected O, but got Unknown
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Expected O, but got Unknown
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Expected O, but got Unknown
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Expected O, but got Unknown
			object obj = <>O.<0>__FixStoneFluxBeingAppliedTwice;
			if (obj == null)
			{
				Manipulator val = FixStoneFluxBeingAppliedTwice;
				<>O.<0>__FixStoneFluxBeingAppliedTwice = val;
				obj = (object)val;
			}
			CharacterBody.RecalculateStats += (Manipulator)obj;
			object obj2 = <>O.<1>__FixChargedPerferatorCrit;
			if (obj2 == null)
			{
				Manipulator val2 = FixChargedPerferatorCrit;
				<>O.<1>__FixChargedPerferatorCrit = val2;
				obj2 = (object)val2;
			}
			GlobalEventManager.ProcessHitEnemy += (Manipulator)obj2;
			object obj3 = <>O.<2>__Antler_FixWrongAuth;
			if (obj3 == null)
			{
				Manipulator val3 = Antler_FixWrongAuth;
				<>O.<2>__Antler_FixWrongAuth = val3;
				obj3 = (object)val3;
			}
			CharacterBody.RpcRequestShardInfoClient += (Manipulator)obj3;
			object obj4 = <>O.<3>__Antler_FixNullRefOnNullMotor;
			if (obj4 == null)
			{
				hook_RpcRequestShardInfoClient val4 = Antler_FixNullRefOnNullMotor;
				<>O.<3>__Antler_FixNullRefOnNullMotor = val4;
				obj4 = (object)val4;
			}
			CharacterBody.RpcRequestShardInfoClient += (hook_RpcRequestShardInfoClient)obj4;
			object obj5 = <>O.<4>__Bandolier_WrongAuthCheck;
			if (obj5 == null)
			{
				Manipulator val5 = Bandolier_WrongAuthCheck;
				<>O.<4>__Bandolier_WrongAuthCheck = val5;
				obj5 = (object)val5;
			}
			SkillLocator.ApplyAmmoPack += (Manipulator)obj5;
			if (WConfig.cfgFixWarpedOSP.Value)
			{
				object obj6 = <>O.<5>__RemoveOSPEntirelyIfYouAreBelowOSPThreshold;
				if (obj6 == null)
				{
					Manipulator val6 = RemoveOSPEntirelyIfYouAreBelowOSPThreshold;
					<>O.<5>__RemoveOSPEntirelyIfYouAreBelowOSPThreshold = val6;
					obj6 = (object)val6;
				}
				HealthComponent.TakeDamageProcess += (Manipulator)obj6;
				object obj7 = <>O.<6>__FixWarpedReducingDamageAfterOSP;
				if (obj7 == null)
				{
					Manipulator val7 = FixWarpedReducingDamageAfterOSP;
					<>O.<6>__FixWarpedReducingDamageAfterOSP = val7;
					obj7 = (object)val7;
				}
				HealthComponent.TakeDamageProcess += (Manipulator)obj7;
			}
			object obj8 = <>O.<7>__FixWEchoDamageNotProccingPlanulaAnymoreAC141;
			if (obj8 == null)
			{
				Manipulator val8 = FixWEchoDamageNotProccingPlanulaAnymoreAC141;
				<>O.<7>__FixWEchoDamageNotProccingPlanulaAnymoreAC141 = val8;
				obj8 = (object)val8;
			}
			HealthComponent.TakeDamageProcess += (Manipulator)obj8;
			object obj9 = <>O.<8>__FixWEchoDamageDoubleDippingEnemyWatches;
			if (obj9 == null)
			{
				Manipulator val9 = FixWEchoDamageDoubleDippingEnemyWatches;
				<>O.<8>__FixWEchoDamageDoubleDippingEnemyWatches = val9;
				obj9 = (object)val9;
			}
			HealthComponent.TakeDamageProcess += (Manipulator)obj9;
			object obj10 = <>O.<9>__FixWEchoDoubleDippingLunarRuin;
			if (obj10 == null)
			{
				Manipulator val10 = FixWEchoDoubleDippingLunarRuin;
				<>O.<9>__FixWEchoDoubleDippingLunarRuin = val10;
				obj10 = (object)val10;
			}
			HealthComponent.TakeDamageProcess += (Manipulator)obj10;
			object obj11 = <>O.<10>__FixParryConsuemdOn0Damage0ProcAttacks;
			if (obj11 == null)
			{
				Manipulator val11 = FixParryConsuemdOn0Damage0ProcAttacks;
				<>O.<10>__FixParryConsuemdOn0Damage0ProcAttacks = val11;
				obj11 = (object)val11;
			}
			HealthComponent.TakeDamageProcess += (Manipulator)obj11;
		}

		private static void FixWEchoDoubleDippingLunarRuin(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0061: 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>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buffs", "lunarruin"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "HasBuff")
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool var, DamageInfo self) => !self.delayedDamageSecondHalf && var));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixWEchoDoubleDippingLunarRuin");
			}
		}

		private static void FixParryConsuemdOn0Damage0ProcAttacks(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_0061: 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>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC3Content/Buffs", "SureProc"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "HasBuff")
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool var, DamageInfo self) => self.procCoefficient != 0f && self.damage != 0f && var));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixParryConsuemdOn0Damage0ProcAttacks");
			}
		}

		private static void FixWarpedReducingDamageAfterOSP(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			bool flag = val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "DelayedDamage")
			});
			if (flag & val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.9f)
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<float, HealthComponent, float>>((Func<float, HealthComponent, float>)((float var, HealthComponent self) => (self.ospTimer > 0f) ? 1f : var));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixWarpedReducingDamageAfterOSP");
			}
		}

		private static void RemoveOSPEntirelyIfYouAreBelowOSPThreshold(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "get_hasOneShotProtection")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<bool, HealthComponent, bool>>((Func<bool, HealthComponent, bool>)((bool var, HealthComponent self) => !(self.combinedHealthFraction < 1f - self.body.oneShotProtectionFraction) && var));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : RemoveOSPEntirelyIfYouAreBelowOSPThreshold");
			}
		}

		private static void FixWEchoDamageDoubleDippingEnemyWatches(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			bool flag = val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "get_canPerformBackstab")
			});
			bool flag2 = val.TryGotoPrev((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, "UnityEngine.Object", "op_Implicit")
			});
			if (!flag || !flag2)
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixWEchoDamageDoubleDippingEnemyWatches Part 1");
				return;
			}
			val.Emit(OpCodes.Ldarg_1);
			val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool var, DamageInfo damageInfo) => !damageInfo.delayedDamageSecondHalf && var));
		}

		private static void FixWEchoDamageNotProccingPlanulaAnymoreAC141(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			bool flag = false;
			ILLabel val2 = default(ILLabel);
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[4]
			{
				(Instruction x) => ILPatternMatchingExt.MatchBrtrue(x, ref val2),
				(Instruction x) => ILPatternMatchingExt.MatchLdarg(x, 0),
				(Instruction x) => ILPatternMatchingExt.MatchLdfld(x, "RoR2.HealthComponent", "body"),
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "RoR2.CharacterBody", "get_armor")
			}))
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixWEchoDamageNotProccingPlanulaAnymoreAC141 Part 1");
				return;
			}
			val.Emit(OpCodes.Ldarg_1);
			val.EmitDelegate<Func<bool, DamageInfo, bool>>((Func<bool, DamageInfo, bool>)((bool var, DamageInfo damageInfo) => !damageInfo.delayedDamageSecondHalf && var));
			if (!val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[3]
			{
				(Instruction x) => ILPatternMatchingExt.MatchMul(x),
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, "UnityEngine.Mathf", "Max"),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 10)
			}))
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixWEchoDamageNotProccingPlanulaAnymoreAC141 Part 2");
				return;
			}
			val.Emit(OpCodes.Ldarg_1);
			val.EmitDelegate<Func<float, DamageInfo, float>>((Func<float, DamageInfo, float>)((float var, DamageInfo damageInfo) => damageInfo.delayedDamageSecondHalf ? 1f : var));
		}

		private static void FixStoneFluxBeingAppliedTwice(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[5]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 112),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 46),
				(Instruction x) => ILPatternMatchingExt.MatchConvR4(x),
				(Instruction x) => ILPatternMatchingExt.MatchAdd(x),
				(Instruction x) => ILPatternMatchingExt.MatchStloc(x, 112)
			}) && val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 112),
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 46)
			}))
			{
				val.EmitDelegate<Func<int, int>>((Func<int, int>)((int skill) => 0));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixStoneFluxBeingAppliedTwice");
			}
		}

		private static void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			self.hasOneShotProtection = self.hasOneShotProtection && self.oneShotProtectionFraction > 0f;
		}

		private static void Bandolier_WrongAuthCheck(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCallvirt(x, "UnityEngine.Networking.NetworkIdentity", "get_hasAuthority")
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.EmitDelegate<Func<bool, SkillLocator, bool>>((Func<bool, SkillLocator, bool>)((bool has, SkillLocator skill) => skill.hasEffectiveAuthority));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : Bandolier_WrongAuthCheck");
			}
		}

		private static void Antler_FixNullRefOnNullMotor(orig_RpcRequestShardInfoClient orig, CharacterBody self)
		{
			//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_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: 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_00e3: 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)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)self.characterMotor))
			{
				orig.Invoke(self);
				return;
			}
			Quaternion val = Quaternion.Euler(0f, Random.Range(-45f, 45f), 0f);
			Vector3 val2 = default(Vector3);
			((Vector3)(ref val2))..ctor(self.inputBank.aimDirection.x, 0f, self.inputBank.aimDirection.z);
			Vector3 val3 = val * val2;
			Vector3 val4 = ((Component)self).gameObject.transform.position + val3 * Random.Range(15f, 30f);
			NodeGraph groundNodes = SceneInfo.instance.groundNodes;
			NodeIndex val5 = groundNodes.FindClosestNode(val4, (HullClassification)0, float.PositiveInfinity);
			if (groundNodes.GetNodePosition(val5, ref val4))
			{
				float num = HullDef.Find((HullClassification)0).radius * 0.7f;
				if (!HGPhysics.DoesOverlapSphere(val4 + Vector3.up * (num + 0.25f), num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.defaultLayer)).mask) | LayerMask.op_Implicit(CommonMasks.fakeActorLayers) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.debris)).mask), (QueryTriggerInteraction)0))
				{
					self.CallCmdSpawnShard(val4);
				}
			}
		}

		private static void Antler_FixWrongAuth(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchCall(x, "UnityEngine.Networking.NetworkBehaviour", "get_hasAuthority")
			}))
			{
				val.Remove();
				val.EmitDelegate<Func<CharacterBody, bool>>((Func<CharacterBody, bool>)((CharacterBody body) => body.hasEffectiveAuthority));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : Antler_FixWrongAuth");
			}
		}

		private static void WEchoFirstHitIntoDanger(orig_OnTakeDamageServer orig, CharacterBody self, DamageReport damageReport)
		{
			if (damageReport.damageInfo.firstHitOfDelayedDamageSecondHalf)
			{
				self.outOfDangerStopwatch = 0f;
			}
			orig.Invoke(self, damageReport);
		}

		private static void FixWarpedEchoNotUsingArmor(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_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: 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.MatchLdfld(x, "RoR2.HealthComponent", "ospTimer")
			}))
			{
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<float, DamageInfo, float>>((Func<float, DamageInfo, float>)((float timer, DamageInfo damageInfo) => damageInfo.delayedDamageSecondHalf ? 0f : timer));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : WECHO dont delete first hit if OSPed");
			}
			val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Items", "DelayedDamage")
			});
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 10)
			}))
			{
				val.Emit(OpCodes.Ldloc, 9);
				val.EmitDelegate<Func<float, float, float>>((Func<float, float, float>)((float aaa, float bbb) => bbb));
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : FixWarpedEchoNotUsingArmor");
			}
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[2]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdcR4(x, 0.8f),
				(Instruction x) => ILPatternMatchingExt.MatchMul(x)
			}))
			{
				val.Emit(OpCodes.Ldarg_0);
				val.Emit(OpCodes.Ldarg_1);
				val.EmitDelegate<Func<float, HealthComponent, DamageInfo, float>>((Func<float, HealthComponent, DamageInfo, float>)delegate(float damage, HealthComponent self, DamageInfo damageInfo)
				{
					//IL_000f: Unknown result type (might be due to invalid IL or missing references)
					//IL_0019: Unknown result type (might be due to invalid IL or missing references)
					//IL_001e: Unknown result type (might be due to invalid IL or missing references)
					//IL_0023: Unknown result type (might be due to invalid IL or missing references)
					//IL_002d: Invalid comparison between Unknown and I4
					if (self.body.hasOneShotProtection && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType & DamageTypeCombo.op_Implicit((DamageType)262144)) != 262144)
					{
						float num = (self.fullCombinedHealth + self.barrier) * (1f - self.body.oneShotProtectionFraction);
						float num2 = Mathf.Max(0f, num - self.serverDamageTakenThisUpdate);
						float num3 = damage;
						damage = Mathf.Min(damage, num2);
						if (damage != num3)
						{
							WolfFixes.log.LogMessage((object)"Trigger Warped OSP");
							self.TriggerOneShotProtection();
						}
					}
					return damage;
				});
			}
			else
			{
				WolfFixes.log.LogWarning((object)"IL Failed : WARPED OSP FIX");
			}
		}

		private static void FixEchoOSP(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			ILCursor val = new ILCursor(il);
			int num = -1;
			int num2 = -1;
			int num3 = -1;
			val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.DLC2Content/Buff", "DelayedDamageBuff")
			});
			val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchNewobj(x, "RoR2.Orbs.SimpleLightningStrikeOrb")

WolfoLibrary.dll

Decompiled 3 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 EntityStates;
using EntityStates.InfiniteTowerSafeWard;
using EntityStates.MeridianEvent;
using EntityStates.Missions.BrotherEncounter;
using EntityStates.SolusHeart;
using EntityStates.SolusWing2;
using HG;
using HG.Reflection;
using IL.RoR2;
using IL.RoR2.Networking;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using Newtonsoft.Json.Utilities;
using On.EntityStates.MeridianEvent;
using On.EntityStates.Missions.BrotherEncounter;
using On.EntityStates.SolusHeart;
using On.EntityStates.SolusWing2;
using On.RoR2;
using On.RoR2.EntitlementManagement;
using On.RoR2.UI.LogBook;
using R2API;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.EntitlementManagement;
using RoR2.ExpansionManagement;
using RoR2.Hologram;
using RoR2.Items;
using RoR2.Stats;
using RoR2.UI;
using RoR2.UI.LogBook;
using RoR2.UI.MainMenu;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.AddressableAssets.ResourceLocators;
using UnityEngine.Networking;
using UnityEngine.UI;
using WolfoLibrary.Testing;

[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("Wolfo")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("A fix and library mod with various commands, methods and classes")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+4ef541cf04ba1111fff45792d8ed29de3a01225d")]
[assembly: AssemblyProduct("WolfoLibrary")]
[assembly: AssemblyTitle("WolfoLibrary")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace WolfoLibrary
{
	internal static class VoidElite
	{
		public static void VoidAffix()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			EquipmentDef val = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/EliteVoid/EliteVoidEquipment.asset").WaitForCompletion();
			GameObject val2 = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/DisplayAffixVoid.prefab").WaitForCompletion(), "PickupAffixVoidW", false);
			val2.transform.GetChild(0).GetChild(2).SetAsFirstSibling();
			val2.transform.GetChild(1).localPosition = new Vector3(0f, 0.7f, 0f);
			val2.transform.GetChild(1).GetChild(0).localPosition = new Vector3(0f, -0.5f, -0.6f);
			val2.transform.GetChild(1).GetChild(0).localScale = new Vector3(1.5f, 1.5f, 1.5f);
			((Component)val2.transform.GetChild(1).GetChild(1)).gameObject.SetActive(false);
			((Component)val2.transform.GetChild(1).GetChild(3)).gameObject.SetActive(false);
			val2.transform.GetChild(0).eulerAngles = new Vector3(310f, 0f, 0f);
			val2.transform.GetChild(0).localScale = new Vector3(0.75f, 0.75f, 0.75f);
			ItemDisplay component = val2.GetComponent<ItemDisplay>();
			ArrayUtils.ArrayRemoveAtAndResize<RendererInfo>(ref component.rendererInfos, 4, 1);
			val2.AddComponent<ModelPanelParameters>();
			val.pickupModelReference = new AssetReferenceT<GameObject>("");
			val.pickupModelPrefab = val2;
		}
	}
	internal class VoidSuppressor
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Init <0>__MakeTiered;

			public static hook_SetEntries <1>__MakeUntiered;

			public static Action<Run> <2>__MakeTieredAgain;

			public static hook_ctor <3>__RemoveFromCompletion;

			public static hook_PreStartClient <4>__AddPriceHologram;

			public static hook_RefreshPickupDisplays <5>__FixPickupDisplayTooSmallDueToLossyScale;
		}

		public static void SuppresedScrap()
		{
			//IL_006b: 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_0076: Expected O, but got Unknown
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Expected O, but got Unknown
			MissedContent.Items.ScrapWhiteSuppressed.pickupToken = "ITEM_SCRAPWHITE_PICKUP";
			MissedContent.Items.ScrapGreenSuppressed.pickupToken = "ITEM_SCRAPGREEN_PICKUP";
			MissedContent.Items.ScrapRedSuppressed.pickupToken = "ITEM_SCRAPRED_PICKUP";
			MissedContent.Items.ScrapWhiteSuppressed.descriptionToken = "ITEM_SCRAPWHITE_DESC";
			MissedContent.Items.ScrapGreenSuppressed.descriptionToken = "ITEM_SCRAPGREEN_DESC";
			MissedContent.Items.ScrapRedSuppressed.descriptionToken = "ITEM_SCRAPRED_DESC";
			object obj = <>O.<0>__MakeTiered;
			if (obj == null)
			{
				hook_Init val = MakeTiered;
				<>O.<0>__MakeTiered = val;
				obj = (object)val;
			}
			PickupCatalog.Init += (hook_Init)obj;
			object obj2 = <>O.<1>__MakeUntiered;
			if (obj2 == null)
			{
				hook_SetEntries val2 = MakeUntiered;
				<>O.<1>__MakeUntiered = val2;
				obj2 = (object)val2;
			}
			PickupCatalog.SetEntries += (hook_SetEntries)obj2;
			Run.onRunStartGlobal += MakeTieredAgain;
			object obj3 = <>O.<3>__RemoveFromCompletion;
			if (obj3 == null)
			{
				hook_ctor val3 = RemoveFromCompletion;
				<>O.<3>__RemoveFromCompletion = val3;
				obj3 = (object)val3;
			}
			GameCompletionStatsHelper.ctor += (hook_ctor)obj3;
		}

		public static void FixInteractable()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: 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_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Expected O, but got Unknown
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Expected O, but got Unknown
			GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidSuppressor/VoidSuppressor.prefab").WaitForCompletion();
			VoidSuppressorBehavior component = val.GetComponent<VoidSuppressorBehavior>();
			component.useRefreshDelay = 1.05f;
			val.GetComponent<PurchaseInteraction>().isShrine = true;
			val.GetComponent<VoidSuppressorBehavior>().effectColor.a = 0.85f;
			Transform child = val.transform.GetChild(0);
			((Component)child.GetChild(7).GetChild(1).GetChild(1)).gameObject.SetActive(true);
			child.GetChild(7).localPosition = new Vector3(0f, -0.5f, -0.5f);
			child.GetChild(7).GetChild(1).GetChild(0)
				.localScale = new Vector3(1.2f, 1.2f, 1.2f);
			Renderer component2 = ((Component)child.GetChild(5)).GetComponent<Renderer>();
			Bounds localBounds = default(Bounds);
			((Bounds)(ref localBounds)).extents = new Vector3(5f, 5f, 5f);
			component2.localBounds = localBounds;
			GameObject val2 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/HUDSimple.prefab").WaitForCompletion();
			try
			{
				Transform val3 = val2.GetComponent<ChildLocator>().FindChild("ScoreboardPanel").Find("Container/SuppressedItems");
				((Component)val3).GetComponent<LayoutElement>().minHeight = 96f;
				((Component)val3).GetComponent<ItemInventoryDisplay>().verticalMargin = 16f;
			}
			catch (Exception ex)
			{
				Debug.LogException(ex);
			}
			object obj = <>O.<4>__AddPriceHologram;
			if (obj == null)
			{
				hook_PreStartClient val4 = AddPriceHologram;
				<>O.<4>__AddPriceHologram = val4;
				obj = (object)val4;
			}
			VoidSuppressorBehavior.PreStartClient += (hook_PreStartClient)obj;
			object obj2 = <>O.<5>__FixPickupDisplayTooSmallDueToLossyScale;
			if (obj2 == null)
			{
				hook_RefreshPickupDisplays val5 = FixPickupDisplayTooSmallDueToLossyScale;
				<>O.<5>__FixPickupDisplayTooSmallDueToLossyScale = val5;
				obj2 = (object)val5;
			}
			VoidSuppressorBehavior.RefreshPickupDisplays += (hook_RefreshPickupDisplays)obj2;
		}

		private static void MakeUntiered(orig_SetEntries orig, PickupDef[] pickupDefs)
		{
			orig.Invoke(pickupDefs);
			MissedContent.Items.ScrapWhiteSuppressed.tier = (ItemTier)5;
			MissedContent.Items.ScrapGreenSuppressed.tier = (ItemTier)5;
			MissedContent.Items.ScrapRedSuppressed.tier = (ItemTier)5;
		}

		private static void MakeTieredAgain(Run obj)
		{
			MissedContent.Items.ScrapWhiteSuppressed.tier = (ItemTier)0;
			MissedContent.Items.ScrapGreenSuppressed.tier = (ItemTier)1;
			MissedContent.Items.ScrapRedSuppressed.tier = (ItemTier)2;
			Run.onRunStartGlobal -= MakeTieredAgain;
		}

		private static IEnumerator MakeTiered(orig_Init orig)
		{
			MissedContent.Items.ScrapWhiteSuppressed.tier = (ItemTier)0;
			MissedContent.Items.ScrapGreenSuppressed.tier = (ItemTier)1;
			MissedContent.Items.ScrapRedSuppressed.tier = (ItemTier)2;
			return orig.Invoke();
		}

		private static void RemoveFromCompletion(orig_ctor orig, GameCompletionStatsHelper self)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: 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_0028: 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)
			orig.Invoke(self);
			PickupDef pickupDef = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(MissedContent.Items.ScrapWhiteSuppressed.itemIndex));
			PickupDef pickupDef2 = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(MissedContent.Items.ScrapGreenSuppressed.itemIndex));
			PickupDef pickupDef3 = PickupCatalog.GetPickupDef(PickupCatalog.FindPickupIndex(MissedContent.Items.ScrapRedSuppressed.itemIndex));
			self.encounterablePickups.Remove(pickupDef);
			self.encounterablePickups.Remove(pickupDef2);
			self.encounterablePickups.Remove(pickupDef3);
		}

		private static void FixPickupDisplayTooSmallDueToLossyScale(orig_RefreshPickupDisplays orig, VoidSuppressorBehavior self)
		{
			//IL_001a: 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)
			Transform transform = ((Component)self.pickupDisplays[0]).transform;
			float num = 0.89628005f / transform.parent.localScale.x;
			transform.localScale = new Vector3(num, num, num);
			orig.Invoke(self);
		}

		private static void AddPriceHologram(orig_PreStartClient orig, VoidSuppressorBehavior self)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			GameObject val = new GameObject("PriceTransform");
			val.transform.SetParent(((Component)self).transform, false);
			val.transform.localPosition = new Vector3(0.2f, 1f, 2f);
			HologramProjector val2 = ((Component)self).GetComponent<HologramProjector>();
			if ((Object)(object)val2 == (Object)null)
			{
				val2 = ((Component)self).gameObject.AddComponent<HologramProjector>();
			}
			val2.disableHologramRotation = true;
			val.transform.localEulerAngles = new Vector3(0f, 180f, 0f);
			val2.hologramPivot = val.transform;
		}
	}
	public class WConfig
	{
		public static ConfigFile ConfigFile = new ConfigFile(Paths.ConfigPath + "\\Wolfo.WolfoFixes.cfg", true);

		public static ConfigEntry<bool> cfgTestMultiplayer;

		public static ConfigEntry<bool> cfgTestLogbook;

		public static ConfigEntry<bool> cfgLoadOrder;

		public static void Awake()
		{
			InitConfig();
		}

		public static void InitConfig()
		{
			cfgTestLogbook = ConfigFile.Bind<bool>("Testing", "Everything Logbook", false, "Add all items, equipments and mobs to logbook, including untiered and cut.");
			cfgTestMultiplayer = ConfigFile.Bind<bool>("Testing", "Multiplayer Test", false, "Allows you to join yourself via connect localhost:7777");
			cfgLoadOrder = ConfigFile.Bind<bool>("Testing", "Debugging", false, "Log prints when certain events happen");
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.Wolfo.WolfoLibrary", "WolfoLibrary", "1.3.0")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class WolfoLib : BaseUnityPlugin
	{
		public static ManualLogSource log;

		public void Awake()
		{
			log = ((BaseUnityPlugin)this).Logger;
			Commands.Awake();
			Test.Awake();
		}

		public void Start()
		{
			Commands.cheatsEnabled = Chainloader.PluginInfos.ContainsKey("iHarbHD.DebugToolkit");
			WConfig.Awake();
			Test.Start();
			ExtraActions.Start();
			Tags.Start();
			VoidElite.VoidAffix();
			VoidSuppressor.SuppresedScrap();
			VoidSuppressor.FixInteractable();
		}

		public static void AddAllConfigAsRiskConfig(ConfigFile config)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Expected O, but got Unknown
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Expected O, but got Unknown
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ce: Expected O, but got Unknown
			ConfigEntryBase[] configEntries = config.GetConfigEntries();
			ConfigEntryBase[] array = configEntries;
			foreach (ConfigEntryBase val in array)
			{
				if (val.SettingType == typeof(bool))
				{
					ModSettingsManager.AddOption((BaseOption)new CheckBoxOption((ConfigEntry<bool>)(object)val, true));
				}
				else if (val.SettingType == typeof(float))
				{
					ModSettingsManager.AddOption((BaseOption)new FloatFieldOption((ConfigEntry<float>)(object)val, true));
				}
				else if (val.SettingType == typeof(int))
				{
					ModSettingsManager.AddOption((BaseOption)new IntFieldOption((ConfigEntry<int>)(object)val, true));
				}
				else if (val.SettingType.IsEnum)
				{
					ModSettingsManager.AddOption((BaseOption)new ChoiceOption(val, true));
				}
				else
				{
					log.LogWarning((object)("Could not add config " + val.Definition.Key + " of type : " + val.SettingType));
				}
			}
		}
	}
	public static class ArrayUtil
	{
		public static T[] Remove<T>(this T[] array, params T[] items)
		{
			return (array ?? Enumerable.Empty<T>()).Except(items).ToArray();
		}
	}
	public static class ExtraActions
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_OnEnter <0>__BrotherPhase1;

			public static hook_Start <1>__VoidlingStart;

			public static hook_OnEnter <2>__FalseSonPhase1;

			public static hook_OnExit <3>__Mission1Tunnel_OnExit;

			public static hook_OnEnter <4>__CutsceneTransformation_OnEnter;

			public static Manipulator <5>__MonsterDCCSGenerateHook;
		}

		public static Action onMithrixPhase1;

		public static Action onVoidlingPhase1;

		public static Action onFalseSonPhase1;

		public static Action onSolusWing;

		public static Action onSolusHeart;

		public static Action<DirectorCardCategorySelection> onMonsterDCCS;

		public static void Start()
		{
			//IL_0011: 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_001c: Expected O, but got Unknown
			//IL_0032: 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)
			//IL_003d: Expected O, but got Unknown
			//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)
			//IL_005e: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Expected O, but got Unknown
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			object obj = <>O.<0>__BrotherPhase1;
			if (obj == null)
			{
				hook_OnEnter val = BrotherPhase1;
				<>O.<0>__BrotherPhase1 = val;
				obj = (object)val;
			}
			Phase1.OnEnter += (hook_OnEnter)obj;
			object obj2 = <>O.<1>__VoidlingStart;
			if (obj2 == null)
			{
				hook_Start val2 = VoidlingStart;
				<>O.<1>__VoidlingStart = val2;
				obj2 = (object)val2;
			}
			VoidRaidGauntletController.Start += (hook_Start)obj2;
			object obj3 = <>O.<2>__FalseSonPhase1;
			if (obj3 == null)
			{
				hook_OnEnter val3 = FalseSonPhase1;
				<>O.<2>__FalseSonPhase1 = val3;
				obj3 = (object)val3;
			}
			Phase1.OnEnter += (hook_OnEnter)obj3;
			object obj4 = <>O.<3>__Mission1Tunnel_OnExit;
			if (obj4 == null)
			{
				hook_OnExit val4 = Mission1Tunnel_OnExit;
				<>O.<3>__Mission1Tunnel_OnExit = val4;
				obj4 = (object)val4;
			}
			Mission1Tunnel.OnExit += (hook_OnExit)obj4;
			object obj5 = <>O.<4>__CutsceneTransformation_OnEnter;
			if (obj5 == null)
			{
				hook_OnEnter val5 = CutsceneTransformation_OnEnter;
				<>O.<4>__CutsceneTransformation_OnEnter = val5;
				obj5 = (object)val5;
			}
			CutsceneTransformation.OnEnter += (hook_OnEnter)obj5;
			object obj6 = <>O.<5>__MonsterDCCSGenerateHook;
			if (obj6 == null)
			{
				Manipulator val6 = MonsterDCCSGenerateHook;
				<>O.<5>__MonsterDCCSGenerateHook = val6;
				obj6 = (object)val6;
			}
			ClassicStageInfo.RebuildCards += (Manipulator)obj6;
		}

		private static void CutsceneTransformation_OnEnter(orig_OnEnter orig, CutsceneTransformation self)
		{
			orig.Invoke(self);
			onSolusHeart?.Invoke();
		}

		private static void Mission1Tunnel_OnExit(orig_OnExit orig, Mission1Tunnel self)
		{
			orig.Invoke(self);
			onSolusWing?.Invoke();
		}

		private static void VoidlingStart(orig_Start orig, VoidRaidGauntletController self)
		{
			orig.Invoke(self);
			onVoidlingPhase1?.Invoke();
		}

		public static void MonsterDCCSGenerateHook(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchStfld(x, "RoR2.ClassicStageInfo", "modifiableMonsterCategories")
			}))
			{
				val.EmitDelegate<Func<DirectorCardCategorySelection, DirectorCardCategorySelection>>((Func<DirectorCardCategorySelection, DirectorCardCategorySelection>)delegate(DirectorCardCategorySelection dccs)
				{
					if (Object.op_Implicit((Object)(object)dccs) && !(dccs is FamilyDirectorCardCategorySelection))
					{
						onMonsterDCCS?.Invoke(dccs);
					}
					return dccs;
				});
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: SotV_EnemyRemovals");
			}
		}

		private static void FalseSonPhase1(orig_OnEnter orig, Phase1 self)
		{
			orig.Invoke(self);
			onFalseSonPhase1?.Invoke();
		}

		private static void BrotherPhase1(orig_OnEnter orig, Phase1 self)
		{
			orig.Invoke(self);
			onMithrixPhase1?.Invoke();
		}
	}
	public class DccsUtil
	{
		public static void RemoveCard(DirectorCardCategorySelection dccs, int cat, string card)
		{
			string text = "";
			switch (cat)
			{
			case 2:
				text = "Basic Monsters";
				break;
			case 1:
				text = "Minibosses";
				break;
			case 0:
				text = "Champions";
				break;
			}
			cat = dccs.FindCategoryIndexByName(text);
			if (cat != -1)
			{
				int num = FindSpawnCard(ref dccs.categories[cat].cards, card);
				if (num != -1)
				{
					WolfoLib.log.LogMessage((object)("Removed " + card + " from " + (object)SceneInfo.instance.sceneDef));
					ArrayUtils.ArrayRemoveAtAndResize<DirectorCard>(ref dccs.categories[cat].cards, num, 1);
					return;
				}
			}
			WolfoLib.log.LogWarning((object)("Failed to remove " + card + " from " + (object)SceneInfo.instance.sceneDef));
		}

		public static int FindSpawnCard(ref DirectorCard[] insert, string LookingFor)
		{
			for (int i = 0; i < insert.Length; i++)
			{
				if (Object.op_Implicit((Object)(object)insert[i].GetSpawnCard()) && ((Object)insert[i].GetSpawnCard()).name.EndsWith(LookingFor))
				{
					return i;
				}
			}
			return -1;
		}

		public static DirectorCard GetDirectorCard(ref DirectorCard[] insert, string LookingFor)
		{
			for (int i = 0; i < insert.Length; i++)
			{
				if (Object.op_Implicit((Object)(object)insert[i].GetSpawnCard()) && ((Object)insert[i].GetSpawnCard()).name.EndsWith(LookingFor))
				{
					return insert[i];
				}
			}
			return null;
		}
	}
	public class HLang
	{
	}
	public class AdvancedPickupDropTable : BasicPickupDropTable
	{
		private bool generated;

		public bool clearAfterGenerating;

		public bool unbiasedByItemCount = false;

		public float eliteEquipmentWeight;

		public override UniquePickup GeneratePickupPreReplacement(Xoroshiro128Plus rng)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			RegenerateReal();
			return PickupDropTable.GeneratePickupFromWeightedSelection(rng, base.selector);
		}

		public override void GenerateDistinctPickupsPreReplacement(List<UniquePickup> dest, int desiredCount, Xoroshiro128Plus rng)
		{
			RegenerateReal();
			PickupDropTable.GenerateDistinctFromWeightedSelection<UniquePickup>(dest, desiredCount, rng, base.selector);
		}

		public override void Regenerate(Run run)
		{
			generated = false;
		}

		public void RegenerateReal()
		{
			if (!generated)
			{
				generated = true;
				if (unbiasedByItemCount)
				{
					GenerateUnbiased(Run.instance);
				}
				else
				{
					((BasicPickupDropTable)this).RegenerateDropTable(Run.instance);
				}
				AddEliteEquip(Run.instance);
			}
		}

		private void GenerateUnbiased(Run run)
		{
			base.selector.Clear();
			AddUnbiased(run.availableTier1DropList, base.tier1Weight);
			AddUnbiased(run.availableTier2DropList, base.tier2Weight);
			AddUnbiased(run.availableTier3DropList, base.tier3Weight);
			AddUnbiased(run.availableBossDropList, base.bossWeight);
			AddUnbiased(run.availableLunarItemDropList, base.lunarItemWeight);
			AddUnbiased(run.availableLunarEquipmentDropList, base.lunarEquipmentWeight);
			AddUnbiased(run.availableLunarCombinedDropList, base.lunarCombinedWeight);
			AddUnbiased(run.availableEquipmentDropList, base.equipmentWeight);
			AddUnbiased(run.availableVoidTier1DropList, base.voidTier1Weight);
			AddUnbiased(run.availableVoidTier2DropList, base.voidTier2Weight);
			AddUnbiased(run.availableVoidTier3DropList, base.voidTier3Weight);
			AddUnbiased(run.availableVoidBossDropList, base.voidBossWeight);
			AddUnbiased(run.availableFoodTierDropList, base.foodTierWeight);
		}

		private void AddUnbiased(List<PickupIndex> sourceDropList, float chance)
		{
			//IL_0032: 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)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: 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_0068: Unknown result type (might be due to invalid IL or missing references)
			if (chance <= 0f || sourceDropList.Count == 0)
			{
				return;
			}
			float num = chance / (float)sourceDropList.Count;
			foreach (PickupIndex sourceDrop in sourceDropList)
			{
				if (!((BasicPickupDropTable)this).IsFilterRequired() || ((BasicPickupDropTable)this).PassesFilter(sourceDrop))
				{
					base.selector.AddChoice(new UniquePickup
					{
						pickupIndex = sourceDrop
					}, chance);
				}
			}
		}

		private void AddEliteEquip(Run run)
		{
			//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_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			if (eliteEquipmentWeight == 0f)
			{
				return;
			}
			List<EquipmentIndex> eliteEquipment = ModUtil.GetEliteEquipment();
			float num = (unbiasedByItemCount ? (eliteEquipmentWeight / (float)eliteEquipment.Count) : eliteEquipmentWeight);
			foreach (EquipmentIndex item in eliteEquipment)
			{
				base.selector.AddChoice(new UniquePickup
				{
					pickupIndex = PickupCatalog.FindPickupIndex(item)
				}, num);
			}
		}
	}
	public class ForcedTeamCSC : CharacterSpawnCard
	{
		public TeamIndex teamIndexOverride = (TeamIndex)2;

		public override void Spawn(Vector3 position, Quaternion rotation, DirectorSpawnRequest directorSpawnRequest, ref SpawnResult result)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			directorSpawnRequest.teamIndexOverride = teamIndexOverride;
			((CharacterSpawnCard)this).Spawn(position, rotation, directorSpawnRequest, ref result);
		}
	}
	public static class Tags
	{
		public static ItemTag EvolutionBlacklist = (ItemTag)94;

		public static ItemTag ScavengerBlacklist = (ItemTag)95;

		public static BasicPickupDropTable dtMonsterTeamLunar;

		public static BasicPickupDropTable dtAISafeBoss;

		public static void AddTag(ItemDef def, ItemTag tag)
		{
			ArrayUtils.ArrayAppend<ItemTag>(ref def.tags, ref tag);
		}

		public static void RemoveTag(ItemDef def, ItemTag tag)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected I4, but got Unknown
			def.tags = def.tags.Remove((ItemTag)(int)tag);
		}

		public static void Start()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Expected I4, but got Unknown
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Expected I4, but got Unknown
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Expected I4, but got Unknown
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Expected I4, but got Unknown
			BasicPickupDropTable val = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier1Item.asset").WaitForCompletion();
			BasicPickupDropTable val2 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier2Item.asset").WaitForCompletion();
			BasicPickupDropTable val3 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/MonsterTeamGainsItems/dtMonsterTeamTier3Item.asset").WaitForCompletion();
			dtMonsterTeamLunar = ScriptableObject.CreateInstance<BasicPickupDropTable>();
			((Object)dtMonsterTeamLunar).name = "dtMonsterTeamLunar";
			dtMonsterTeamLunar.tier1Weight = 0f;
			dtMonsterTeamLunar.tier2Weight = 0f;
			dtMonsterTeamLunar.tier3Weight = 0f;
			dtMonsterTeamLunar.lunarItemWeight = 1f;
			ArenaMonsterItemDropTable val4 = Addressables.LoadAssetAsync<ArenaMonsterItemDropTable>((object)"RoR2/Base/arena/dtArenaMonsterTier1.asset").WaitForCompletion();
			ArenaMonsterItemDropTable val5 = Addressables.LoadAssetAsync<ArenaMonsterItemDropTable>((object)"RoR2/Base/arena/dtArenaMonsterTier2.asset").WaitForCompletion();
			ArenaMonsterItemDropTable val6 = Addressables.LoadAssetAsync<ArenaMonsterItemDropTable>((object)"RoR2/Base/arena/dtArenaMonsterTier3.asset").WaitForCompletion();
			BasicPickupDropTable val7 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtAISafeTier1Item.asset").WaitForCompletion();
			BasicPickupDropTable val8 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtAISafeTier2Item.asset").WaitForCompletion();
			BasicPickupDropTable val9 = Addressables.LoadAssetAsync<BasicPickupDropTable>((object)"RoR2/Base/Common/dtAISafeTier3Item.asset").WaitForCompletion();
			dtAISafeBoss = ScriptableObject.CreateInstance<BasicPickupDropTable>();
			((Object)dtAISafeBoss).name = "dtAISafeBoss";
			dtAISafeBoss.tier1Weight = 0f;
			dtAISafeBoss.tier2Weight = 0f;
			dtAISafeBoss.tier3Weight = 0f;
			dtAISafeBoss.bossWeight = 1f;
			ItemTag[] array = new ItemTag[6];
			RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			array[5] = (ItemTag)(int)ScavengerBlacklist;
			ItemTag[] bannedItemTags = (ItemTag[])(object)array;
			ItemTag[] array2 = new ItemTag[10];
			RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			array2[4] = (ItemTag)(int)EvolutionBlacklist;
			array2[5] = (ItemTag)(int)ScavengerBlacklist;
			ItemTag[] bannedItemTags2 = (ItemTag[])(object)array2;
			ItemTag[] array3 = new ItemTag[9];
			RuntimeHelpers.InitializeArray(array3, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/);
			array3[4] = (ItemTag)(int)ScavengerBlacklist;
			ItemTag[] bannedItemTags3 = (ItemTag[])(object)array3;
			val.bannedItemTags = bannedItemTags2;
			val2.bannedItemTags = bannedItemTags2;
			val3.bannedItemTags = bannedItemTags2;
			dtMonsterTeamLunar.bannedItemTags = bannedItemTags2;
			val4.bannedItemTags = bannedItemTags3;
			val5.bannedItemTags = bannedItemTags3;
			val6.bannedItemTags = bannedItemTags3;
			val7.bannedItemTags = bannedItemTags;
			val8.bannedItemTags = bannedItemTags;
			val9.bannedItemTags = bannedItemTags;
			dtAISafeBoss.bannedItemTags = bannedItemTags;
		}
	}
	public static class ModUtil
	{
		public enum SkinVariant
		{
			Default,
			Snow,
			Sand
		}

		public static List<EquipmentIndex> GetEliteEquipment(bool droppableOnly = true)
		{
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			List<EquipmentIndex> list = new List<EquipmentIndex>();
			try
			{
				for (int i = 0; i < EquipmentCatalog.equipmentDefs.Length; i++)
				{
					EquipmentDef val = EquipmentCatalog.equipmentDefs[i];
					if (Object.op_Implicit((Object)(object)val.passiveBuffDef) && Object.op_Implicit((Object)(object)val.passiveBuffDef.eliteDef) && ((val.dropOnDeathChance > 0f && (!Object.op_Implicit((Object)(object)Run.instance) || !Run.instance.expansionLockedEquipment.Contains(val.equipmentIndex))) || !droppableOnly))
					{
						list.Add(val.equipmentIndex);
					}
				}
				if (!droppableOnly)
				{
					list.Remove(MissedContent.Equipment.EliteSecretSpeedEquipment.equipmentIndex);
					list.Remove(Equipment.EliteYellowEquipment.equipmentIndex);
					list.Remove(Equipment.EliteGoldEquipment.equipmentIndex);
				}
			}
			catch (Exception ex)
			{
				Debug.LogWarning((object)ex);
			}
			return list;
		}

		public static SkinVariant GetInteractableSkinFromStage(SceneDef scene)
		{
			switch (scene.baseSceneName)
			{
			case "snowyforest":
			case "nest":
			case "frozenwall":
			case "itfrozenwall":
				return SkinVariant.Snow;
			case "goolake":
			case "itgoolake":
			case "lemuriantemple":
			case "ironalluvium":
			case "ironalluvium2":
			case "repurposedcrater":
				return SkinVariant.Sand;
			default:
				return SkinVariant.Default;
			}
		}
	}
	public static class DLCS
	{
		public static ExpansionDef DLC1 = Addressables.LoadAssetAsync<ExpansionDef>((object)"d4f30c23b971a9b428e2796dc04ae099").WaitForCompletion();

		public static ExpansionDef DLC2 = Addressables.LoadAssetAsync<ExpansionDef>((object)"851f234056d389b42822523d1be6a167").WaitForCompletion();

		public static ExpansionDef DLC3 = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC3/DLC3.asset").WaitForCompletion();

		public static EntitlementDef entitlementDLC1 = Addressables.LoadAssetAsync<EntitlementDef>((object)"0166774839e0bd345bb11554aecbfd32").WaitForCompletion();

		public static EntitlementDef entitlementDLC2 = Addressables.LoadAssetAsync<EntitlementDef>((object)"68fcfaddae5157f4581a1fc209e4eac6").WaitForCompletion();

		public static EntitlementDef entitlementDLC3 = Addressables.LoadAssetAsync<EntitlementDef>((object)"6673dacf8c8aa87409fc73e6da34684b").WaitForCompletion();
	}
	public static class SceneList
	{
		public static SceneDef Blackbeach = Addressables.LoadAssetAsync<SceneDef>((object)"c129d2b9e62c31b4ba165091d1ae2c50").WaitForCompletion();

		public static SceneDef Blackbeach2 = Addressables.LoadAssetAsync<SceneDef>((object)"f87198140bf9b5a4f82e206231df9091").WaitForCompletion();

		public static SceneDef Golemplains = Addressables.LoadAssetAsync<SceneDef>((object)"8ba24a95e46b3944280a4b66afd0c4dc").WaitForCompletion();

		public static SceneDef Golemplains2 = Addressables.LoadAssetAsync<SceneDef>((object)"657a62eb3e4c409429c91ba6fdb7d921").WaitForCompletion();

		public static SceneDef SulfurPools = Addressables.LoadAssetAsync<SceneDef>((object)"796f9b67682b3db4c8c5af7294d0490c").WaitForCompletion();

		public static SceneDef RootJungle = Addressables.LoadAssetAsync<SceneDef>((object)"ced489f798226594db0d115af2101a9b").WaitForCompletion();

		public static SceneDef Habitat = Addressables.LoadAssetAsync<SceneDef>((object)"0b33829c6cdfad34a8160c6ae17edfcc").WaitForCompletion();

		public static SceneDef HabitatFall = Addressables.LoadAssetAsync<SceneDef>((object)"962a6a8a56f584b468a4835c82c11951").WaitForCompletion();

		public static SceneDef itGolemPlains = Addressables.LoadAssetAsync<SceneDef>((object)"dda7dbdf013275747949dfc522842635").WaitForCompletion();

		public static SceneDef itGoolake = Addressables.LoadAssetAsync<SceneDef>((object)"0a35bec906d067941a8a378b963e9e9d").WaitForCompletion();

		public static SceneDef itAncientLoft = Addressables.LoadAssetAsync<SceneDef>((object)"568295b69af09c241968fa18ca37b56d").WaitForCompletion();

		public static SceneDef itFrozenwall = Addressables.LoadAssetAsync<SceneDef>((object)"0ab15976715ddd6438e2e5bd6ddbe224").WaitForCompletion();

		public static SceneDef itDampCave = Addressables.LoadAssetAsync<SceneDef>((object)"c33b24f6ebf27db49a5cfb88dbe9b8ff").WaitForCompletion();

		public static SceneDef itSkyMeadow = Addressables.LoadAssetAsync<SceneDef>((object)"6a2712b5c8cf36f44b34c128f2759522").WaitForCompletion();

		public static SceneDef itMoon = Addressables.LoadAssetAsync<SceneDef>((object)"RoR2/DLC1/itmoon/itmoon.asset").WaitForCompletion();

		public static SceneDef Moon2 = Addressables.LoadAssetAsync<SceneDef>((object)"5d69f3396feb7ba428d1e53a44479594").WaitForCompletion();

		public static SceneDef MysterySpace = Addressables.LoadAssetAsync<SceneDef>((object)"1303cd0450cbaf140970e7afd5162314").WaitForCompletion();

		public static SceneDef VoidStage = Addressables.LoadAssetAsync<SceneDef>((object)"66e0cfba315981a40afae481363ea0da").WaitForCompletion();

		public static SceneDef VoidRaid = Addressables.LoadAssetAsync<SceneDef>((object)"223a0f0a86052654a9e473d13f77cb41").WaitForCompletion();
	}
	public static class MissedContent
	{
		public static class Items
		{
			public static ItemDef ScrapWhiteSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapWhiteSuppressed.asset").WaitForCompletion();

			public static ItemDef ScrapGreenSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapGreenSuppressed.asset").WaitForCompletion();

			public static ItemDef ScrapRedSuppressed = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/ScrapVoid/ScrapRedSuppressed.asset").WaitForCompletion();
		}

		public static class Equipment
		{
			public static EquipmentDef EliteEarthEquipment = Addressables.LoadAssetAsync<EquipmentDef>((object)"463f8f6917dd8af40860b023a520f051").WaitForCompletion();

			public static EquipmentDef EliteSecretSpeedEquipment = Addressables.LoadAssetAsync<EquipmentDef>((object)"RoR2/DLC1/EliteSecretSpeedEquipment.asset").WaitForCompletion();
		}

		public static class BodyPrefabs
		{
			public static CharacterBody SquidTurretBody = Addressables.LoadAssetAsync<GameObject>((object)"5290eaf612d386740ac26f289e06b62f").WaitForCompletion().GetComponent<CharacterBody>();

			public static CharacterBody BeetleGuardAllyBody = Addressables.LoadAssetAsync<GameObject>((object)"e21e3b9cdc2802148986eda1c923c9a1").WaitForCompletion().GetComponent<CharacterBody>();

			public static CharacterBody RoboBallGreenBuddyBody = Addressables.LoadAssetAsync<GameObject>((object)"d64335d9c1517cb4a8764a0de1d01a03").WaitForCompletion().GetComponent<CharacterBody>();

			public static CharacterBody RoboBallRedBuddyBody = Addressables.LoadAssetAsync<GameObject>((object)"e8a603acea1fa2249a83c0257a9f5f10").WaitForCompletion().GetComponent<CharacterBody>();
		}

		public static class GameEndings
		{
			public static GameEndingDef EscapeSequenceFailed = Addressables.LoadAssetAsync<GameEndingDef>((object)"RoR2/Base/ClassicRun/EscapeSequenceFailed.asset").WaitForCompletion();
		}

		public static class Survivors
		{
			public static SurvivorDef VoidSurvivor = Addressables.LoadAssetAsync<SurvivorDef>((object)"dc32bd426643dce478dd1b04fd07cdf6").WaitForCompletion();
		}

		public static class Elites
		{
			public static EliteDef edSecretSpeed = Addressables.LoadAssetAsync<EliteDef>((object)"9752d818bdea9b449845fc4df8aed07a").WaitForCompletion();

			public static EliteDef CollectiveWeak = Addressables.LoadAssetAsync<EliteDef>((object)"5834fbe05a0d4ce4eae57f87aae57920").WaitForCompletion();
		}
	}
}
namespace WolfoLibrary.Testing
{
	internal class Commands
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_Start <0>__TeamManager_Start;

			public static Action<SceneDirector> <1>__SceneDirector_onPrePopulateSceneServer;

			public static hook_VerifyLocalSteamUser <2>__EntitlementAbstractions_VerifyLocalSteamUser;
		}

		public static bool cheatsEnabled;

		public static List<EntitlementDef> disabledDefs;

		public static bool noInteractables;

		public static bool godEnemyBool;

		public static void Awake()
		{
			//IL_0011: 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_001c: Expected O, but got Unknown
			//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)
			//IL_005e: Expected O, but got Unknown
			object obj = <>O.<0>__TeamManager_Start;
			if (obj == null)
			{
				hook_Start val = TeamManager_Start;
				<>O.<0>__TeamManager_Start = val;
				obj = (object)val;
			}
			TeamManager.Start += (hook_Start)obj;
			SceneDirector.onPrePopulateSceneServer += SceneDirector_onPrePopulateSceneServer;
			object obj2 = <>O.<2>__EntitlementAbstractions_VerifyLocalSteamUser;
			if (obj2 == null)
			{
				hook_VerifyLocalSteamUser val2 = EntitlementAbstractions_VerifyLocalSteamUser;
				<>O.<2>__EntitlementAbstractions_VerifyLocalSteamUser = val2;
				obj2 = (object)val2;
			}
			EntitlementAbstractions.VerifyLocalSteamUser += (hook_VerifyLocalSteamUser)obj2;
		}

		private static bool EntitlementAbstractions_VerifyLocalSteamUser(orig_VerifyLocalSteamUser orig, EntitlementDef entitlementDef)
		{
			if (disabledDefs != null && disabledDefs.Contains(entitlementDef))
			{
				return false;
			}
			return orig.Invoke(entitlementDef);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCToggleDLC(ConCommandArgs args)
		{
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			int valueOrDefault = ((ConCommandArgs)(ref args)).TryGetArgInt(0).GetValueOrDefault(0);
			valueOrDefault--;
			if (valueOrDefault == -1)
			{
				Debug.Log((object)"Need expansion number");
				return;
			}
			if (disabledDefs == null)
			{
				disabledDefs = new List<EntitlementDef>();
			}
			EntitlementDef entitlementDef = EntitlementCatalog.GetEntitlementDef((EntitlementIndex)valueOrDefault);
			if (disabledDefs.Contains(entitlementDef))
			{
				disabledDefs.Remove(entitlementDef);
				Debug.Log((object)("Reallowing" + Language.GetString(entitlementDef.nameToken)));
			}
			else
			{
				disabledDefs.Add(entitlementDef);
				Debug.Log((object)("Disabling" + Language.GetString(entitlementDef.nameToken)));
			}
			EntitlementManager.CCEntitlementForceRefresh(args);
		}

		private static void TeamManager_Start(orig_Start orig, TeamManager self)
		{
			orig.Invoke(self);
			if (godEnemyBool)
			{
				TeamManager.instance.teamLevels[2] = (godEnemyBool ? 100001u : 0u);
			}
		}

		public static void SceneDirector_onPrePopulateSceneServer(SceneDirector obj)
		{
			if (noInteractables)
			{
				obj.interactableCredit = 0;
				obj.monsterCredit = 0;
				obj.teleporterSpawnCard = null;
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCPurchaseAll(ConCommandArgs args)
		{
			Interactor component = ((Component)((ConCommandArgs)(ref args)).senderBody).GetComponent<Interactor>();
			foreach (PurchaseInteraction instances in InstanceTracker.GetInstancesList<PurchaseInteraction>())
			{
				instances.OnInteractionBegin(component);
			}
			foreach (BossGroup instances2 in InstanceTracker.GetInstancesList<BossGroup>())
			{
				instances2.DropRewards();
			}
			foreach (HoldoutZoneController instances3 in InstanceTracker.GetInstancesList<HoldoutZoneController>())
			{
				instances3.FullyChargeHoldoutZone();
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCLoad(ConCommandArgs args)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log((object)("Loading: " + ((ConCommandArgs)(ref args)).TryGetArgString(0)));
			Debug.Log((object)Addressables.LoadAssetAsync<Object>((object)((ConCommandArgs)(ref args)).TryGetArgString(0)).WaitForCompletion());
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCkill_player(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			foreach (PlayerCharacterMasterController instance in PlayerCharacterMasterController.instances)
			{
				instance.master.TrueKill();
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCRandomItems(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else
			{
				((ConCommandArgs)(ref args)).senderBody.inventory.GiveRandomItems(((ConCommandArgs)(ref args)).TryGetArgInt(0).GetValueOrDefault(1), false, false);
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCRandomEq(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else
			{
				((ConCommandArgs)(ref args)).senderBody.inventory.GiveRandomEquipment();
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCRandomUnlock(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			int valueOrDefault = ((ConCommandArgs)(ref args)).TryGetArgInt(0).GetValueOrDefault(1);
			int num = 0;
			while (num < valueOrDefault)
			{
				int num2 = Run.instance.runRNG.RangeInt(0, UnlockableCatalog.unlockableCount);
				UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef((UnlockableIndex)num2);
				if (unlockableDef.hidden)
				{
					continue;
				}
				num++;
				foreach (NetworkUser readOnlyInstances in NetworkUser.readOnlyInstancesList)
				{
					if (readOnlyInstances.isParticipating)
					{
						readOnlyInstances.ServerHandleUnlock(unlockableDef);
					}
				}
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCRemoveEquip(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else
			{
				((ConCommandArgs)(ref args)).senderBody.inventory.RemoveEquipment((EquipmentIndex)0);
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		private static void CCRunEndWave(ConCommandArgs args)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			Run instance = Run.instance;
			InfiniteTowerRun val = (InfiniteTowerRun)(object)((instance is InfiniteTowerRun) ? instance : null);
			if (!Object.op_Implicit((Object)(object)val))
			{
				throw new ConCommandException("No Infinite Tower run is currently in progress.");
			}
			val.waveController.KillSquad();
			if (Object.op_Implicit((Object)(object)val.waveController.combatDirector))
			{
				val.waveController.combatDirector.monsterCredit = 0f;
			}
			val.waveController.totalWaveCredits = 0f;
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_RemoveUnlocks(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
			UserProfile userProfile = firstLocalUser.userProfile;
			StatSheet statSheet = userProfile.statSheet;
			if (userProfile != null)
			{
				for (int i = 0; UnlockableCatalog.unlockableCount > i; i++)
				{
					statSheet.RemoveUnlockable((UnlockableIndex)i);
				}
				int num = userProfile.achievementsList.Count - 1;
				while (0 <= num)
				{
					userProfile.RevokeAchievement(userProfile.achievementsList[num]);
					num--;
				}
				userProfile.RequestEventualSave();
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_clear_notifs(ConCommandArgs args)
		{
			LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
			UserProfile userProfile = firstLocalUser.userProfile;
			StatSheet statSheet = userProfile.statSheet;
			if (userProfile != null)
			{
				userProfile.ClearAllAchievementNotifications();
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_AllUnlocks(ConCommandArgs args)
		{
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
			UserProfile userProfile = firstLocalUser.userProfile;
			StatSheet statSheet = userProfile.statSheet;
			if (userProfile != null)
			{
				for (int i = 0; AchievementManager.achievementDefs.Length > i; i++)
				{
					userProfile.AddAchievement(AchievementManager.achievementDefs[i].identifier, false);
				}
				for (int j = 0; UnlockableCatalog.unlockableCount > j; j++)
				{
					statSheet.AddUnlockable((UnlockableIndex)j);
				}
				for (int k = 0; BodyCatalog.bodyCount > k; k++)
				{
					statSheet.PushStatValue(PerBodyStatDef.timesSummoned, (BodyIndex)k, 1uL);
				}
				for (int l = 0; SurvivorCatalog.survivorCount > l; l++)
				{
					statSheet.PushStatValue(PerBodyStatDef.totalWins, SurvivorCatalog.survivorIndexToBodyIndex[l], 1uL);
				}
				for (int m = 0; PickupCatalog.pickupCount > m; m++)
				{
					userProfile.SetPickupDiscovered(new PickupIndex(m), true);
				}
				userProfile.ClearAllAchievementNotifications();
				userProfile.RequestEventualSave();
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_evolve_lemurian(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else
			{
				DevotionInventoryController.ActivateAllDevotedEvolution();
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_poor(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else
			{
				((ConCommandArgs)(ref args)).senderMaster.money = 0u;
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_rich(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else
			{
				((ConCommandArgs)(ref args)).senderMaster.money = 2147483647u;
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_Cooldown(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else
			{
				if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster) || !Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster.GetBody()))
				{
					return;
				}
				GenericSkill[] components = ((Component)((ConCommandArgs)(ref args)).senderMaster.GetBody()).GetComponents<GenericSkill>();
				GenericSkill[] array = components;
				foreach (GenericSkill val in array)
				{
					if (val.cooldownOverride == 0f)
					{
						val.cooldownOverride = 0.01f;
					}
					else
					{
						val.cooldownOverride = 0f;
					}
				}
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_Skill(ConCommandArgs args)
		{
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected O, but got Unknown
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster) && Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster.GetBody()) && NetworkServer.active)
			{
				BodyIndex bodyIndex = ((ConCommandArgs)(ref args)).senderMaster.GetBody().bodyIndex;
				int argInt = ((ConCommandArgs)(ref args)).GetArgInt(0);
				int argInt2 = ((ConCommandArgs)(ref args)).GetArgInt(1);
				UserProfile userProfile = ((ConCommandArgs)(ref args)).GetSenderLocalUser().userProfile;
				Loadout val = new Loadout();
				userProfile.loadout.Copy(val);
				val.bodyLoadoutManager.SetSkillVariant(bodyIndex, argInt, (uint)argInt2);
				userProfile.SetLoadout(val);
				if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster))
				{
					((ConCommandArgs)(ref args)).senderMaster.SetLoadoutServer(val);
				}
				if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderBody))
				{
					((ConCommandArgs)(ref args)).senderBody.SetLoadoutServer(val);
				}
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_TurnOffModel(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster))
			{
				WolfoLib.log.LogMessage((object)"No Master");
				return;
			}
			if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster.GetBody()))
			{
				WolfoLib.log.LogMessage((object)"No Body");
				return;
			}
			GameObject gameObject = ((Component)((Component)((ConCommandArgs)(ref args)).senderMaster.GetBody()).GetComponent<ModelLocator>().modelTransform).gameObject;
			gameObject.SetActive(!gameObject.activeSelf);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_ToggleHUD(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else
			{
				HUD.cvHudEnable.SetBool(!HUD.cvHudEnable.value);
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_NoInteractables(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			noInteractables = !noInteractables;
			WolfoLib.log.LogMessage((object)(noInteractables ? "Interactables no longer spawn" : "Interactables spawn again"));
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCGodEnemy(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			godEnemyBool = !godEnemyBool;
			TeamManager.instance.teamLevels[2] = (godEnemyBool ? 10000u : 0u);
			WolfoLib.log.LogMessage((object)(godEnemyBool ? "Enemy level set to 10000" : "Enemy level set back to normal"));
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCScanner(ConCommandArgs args)
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster) && NetworkServer.active)
			{
				((ConCommandArgs)(ref args)).senderMaster.inventory.SetEquipmentIndex(Equipment.Scanner.equipmentIndex);
				((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItem(Items.BoostEquipmentRecharge, 100);
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_Damage(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster))
			{
				if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster.GetBody()))
				{
					WolfoLib.log.LogMessage((object)"No Body");
					return;
				}
				float num = Convert.ToInt16(((ConCommandArgs)(ref args))[0]);
				((ConCommandArgs)(ref args)).senderMaster.GetBody().baseDamage = num;
				((ConCommandArgs)(ref args)).senderMaster.GetBody().levelDamage = 0f;
				((ConCommandArgs)(ref args)).senderMaster.GetBody().damage = num;
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_SetHP(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster))
			{
				if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster.GetBody()))
				{
					WolfoLib.log.LogMessage((object)"No Body");
					return;
				}
				float num = Convert.ToInt16(((ConCommandArgs)(ref args))[0]);
				CharacterBody body = ((ConCommandArgs)(ref args)).senderMaster.GetBody();
				body.baseMaxHealth = num;
				body.levelMaxHealth = 0f;
				body.maxHealth = num;
				body.baseRegen = 0f;
				body.levelRegen = 0f;
				body.regen = 0f;
				body.healthComponent.health = body.maxHealth;
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_SetSpeed(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster))
			{
				if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster.GetBody()))
				{
					WolfoLib.log.LogMessage((object)"No Body");
					return;
				}
				float num = Convert.ToInt16(((ConCommandArgs)(ref args))[0]);
				CharacterBody body = ((ConCommandArgs)(ref args)).senderMaster.GetBody();
				body.moveSpeed = num;
				body.baseMoveSpeed = num;
				body.levelMoveSpeed = 0f;
				body.baseJumpCount = 10000;
				body.maxJumpCount = 10000;
				body.baseAcceleration = body.baseAcceleration / 7f * num;
				body.acceleration = body.baseAcceleration;
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CC_GotoMithrix(ConCommandArgs args)
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: 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_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			string cachedName = Stage.instance.sceneDef.cachedName;
			Component senderBody = (Component)(object)((ConCommandArgs)(ref args)).GetSenderBody();
			Vector3 val = Vector3.zero;
			switch (cachedName)
			{
			case "moon2":
				((Vector3)(ref val))..ctor(-11f, 490f, 80f);
				break;
			case "solutionalhaunt":
				((Vector3)(ref val))..ctor(252.5426f, -549.5432f, -90.2127f);
				break;
			case "meridian":
				((Vector3)(ref val))..ctor(85.2065f, 146.5167f, -70.5265f);
				break;
			case "mysteryspace":
				((Vector3)(ref val))..ctor(362.9097f, -151.5964f, 213.0157f);
				break;
			case "voidraid":
			{
				bool flag = false;
				for (int j = 0; j < CharacterBody.instancesList.Count; j++)
				{
					if (((Object)CharacterBody.instancesList[j]).name.StartsWith("MiniVoidRaid"))
					{
						flag = true;
						val = CharacterBody.instancesList[j].corePosition;
					}
				}
				if (!flag)
				{
					((Vector3)(ref val))..ctor(-105f, 0.2f, 92f);
				}
				break;
			}
			default:
			{
				if (Object.op_Implicit((Object)(object)TeleporterInteraction.instance))
				{
					val = ((Component)TeleporterInteraction.instance).transform.position;
					break;
				}
				for (int i = 0; i < CharacterBody.instancesList.Count; i++)
				{
					if (CharacterBody.instancesList[i].isBoss)
					{
						val = CharacterBody.instancesList[i].corePosition;
					}
				}
				break;
			}
			}
			if (val == Vector3.zero)
			{
				WolfoLib.log.LogMessage((object)"No Teleporter, Specific Location or Boss Monster found.");
				return;
			}
			TeleportHelper.TeleportGameObject(senderBody.gameObject, val);
			if (!(cachedName == "conduitcanyon"))
			{
				return;
			}
			List<PowerPedestal> instancesList = InstanceTracker.GetInstancesList<PowerPedestal>();
			foreach (PowerPedestal item in instancesList)
			{
				item.SetComplete(true);
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCSimuSoftlock(ConCommandArgs args)
		{
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: 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_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_019d: Expected O, but got Unknown
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Expected O, but got Unknown
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Expected O, but got Unknown
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: 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
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			if (!Object.op_Implicit((Object)(object)Run.instance))
			{
				Debug.LogWarning((object)"No Run");
			}
			if (!(Run.instance is InfiniteTowerRun))
			{
				Debug.LogWarning((object)"No Simu Run");
			}
			InfiniteTowerRun val = (InfiniteTowerRun)Run.instance;
			try
			{
				if (Object.op_Implicit((Object)(object)val.waveController))
				{
					val.waveController.OnAllEnemiesDefeatedServer();
					val.waveController.ForceFinish();
				}
				else
				{
					val.OnWaveAllEnemiesDefeatedServer((InfiniteTowerWaveController)null);
					val.CleanUpCurrentWave();
					if (Object.op_Implicit((Object)(object)val.waveInstance))
					{
						Object.Destroy((Object)(object)val.waveInstance);
					}
					if (!val.IsStageTransitionWave())
					{
						val.BeginNextWave();
					}
				}
				if (Object.op_Implicit((Object)(object)val.safeWardController) && !(val.safeWardController.wardStateMachine.state is Active))
				{
					val.safeWardController.wardStateMachine.SetState((EntityState)new Active());
				}
			}
			catch (Exception ex)
			{
				((Run)val).PickNextStageSceneFromCurrentSceneDestinations();
				DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest((SpawnCard)(object)val.stageTransitionPortalCard, new DirectorPlacementRule
				{
					minDistance = 0f,
					maxDistance = val.stageTransitionPortalMaxDistance,
					placementMode = (PlacementMode)1,
					position = ((Component)val.safeWardController).transform.position,
					spawnOnTarget = ((Component)val.safeWardController).transform
				}, val.safeWardRng));
				Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage
				{
					baseToken = val.stageTransitionChatToken
				});
				if (Object.op_Implicit((Object)(object)val.safeWardController))
				{
					val.safeWardController.WaitForPortal();
				}
				Debug.LogWarning((object)ex.ToString());
			}
			Debug.LogWarning((object)"Report any errors");
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCAllItems(ConCommandArgs args)
		{
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: 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: Invalid comparison between Unknown and I4
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Invalid comparison between Unknown and I4
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Invalid comparison between Unknown and I4
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Invalid comparison between Unknown and I4
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Invalid comparison between Unknown and I4
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Invalid comparison between Unknown and I4
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
				return;
			}
			int valueOrDefault = ((ConCommandArgs)(ref args)).TryGetArgInt(0).GetValueOrDefault(0);
			if (!Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderMaster) || !NetworkServer.active)
			{
				return;
			}
			if (valueOrDefault == 1)
			{
				for (int i = 0; i < ItemCatalog.itemCount; i++)
				{
					try
					{
						((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItemPermanent((ItemIndex)i, 1);
					}
					catch (Exception)
					{
					}
				}
				((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItemPermanent(Items.HealthDecay, 999999);
				ContagiousItemManager.originalToTransformed = Array.Empty<ItemIndex>();
				ContagiousItemManager.transformationInfos = ReadOnlyArray<TransformationInfo>.op_Implicit(Array.Empty<TransformationInfo>());
			}
			else
			{
				for (int j = 0; j < ItemCatalog.itemCount; j++)
				{
					ItemDef itemDef = ItemCatalog.GetItemDef((ItemIndex)j);
					if ((int)itemDef.tier == 5)
					{
						continue;
					}
					if (valueOrDefault != 2 && (int)itemDef.tier != 5 && (int)itemDef.tier != 9 && (int)itemDef.tier != 6 && (int)itemDef.tier != 7 && (int)itemDef.tier != 8)
					{
						try
						{
							((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItemPermanent((ItemIndex)j, 1);
						}
						catch (Exception)
						{
						}
					}
					try
					{
						((ConCommandArgs)(ref args)).senderMaster.inventory.GiveItemPermanent((ItemIndex)j, 1);
					}
					catch (Exception)
					{
					}
				}
			}
			Object.Destroy((Object)(object)((Component)((ConCommandArgs)(ref args)).senderMaster).GetComponent<MasterSuicideOnTimer>());
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCALLBuffs(ConCommandArgs args)
		{
			if (!cheatsEnabled)
			{
				Debug.Log((object)"WolfoLibrary commands are only available with DebugToolkit installed");
			}
			else if (Object.op_Implicit((Object)(object)((ConCommandArgs)(ref args)).senderBody) && NetworkServer.active)
			{
				CharacterBody senderBody = ((ConCommandArgs)(ref args)).senderBody;
				for (int i = 0; i < BuffCatalog.buffCount; i++)
				{
					((ConCommandArgs)(ref args)).senderBody.AddBuff((BuffIndex)i);
				}
			}
		}
	}
	internal class Commands_Lists
	{
		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_CurrentStats(ConCommandArgs args)
		{
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Invalid comparison between Unknown and I4
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Invalid comparison between Unknown and I4
			StatSheet val = null;
			if (PlayerCharacterMasterController.instances.Count != 0)
			{
				val = PlayerCharacterMasterController.instances[0].master.playerStatsComponent.currentStats;
			}
			else
			{
				LocalUser firstLocalUser = LocalUserManager.GetFirstLocalUser();
				UserProfile userProfile = firstLocalUser.userProfile;
				val = userProfile.statSheet;
			}
			if (val == null)
			{
				Debug.Log((object)"No Players");
				return;
			}
			string text = "";
			for (int i = 0; i < val.fields.Length; i++)
			{
				StatDef statDef = val.fields[i].statDef;
				if ((int)statDef.dataType == 0)
				{
					if (((StatField)(ref val.fields[i])).ulongValue != 0)
					{
						text += string.Format("\n[{0}] {1} | {2}", new object[3]
						{
							i,
							statDef.name,
							((StatField)(ref val.fields[i])).ulongValue
						});
					}
				}
				else if ((int)statDef.dataType == 1 && ((StatField)(ref val.fields[i])).doubleValue > 0.0)
				{
					text += string.Format("\n[{0}] {1} | {2}", new object[3]
					{
						i,
						statDef.name,
						((StatField)(ref val.fields[i])).doubleValue
					});
				}
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_StatDef(ConCommandArgs args)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			string text = "";
			StatField[] fieldsTemplate = StatSheet.fieldsTemplate;
			foreach (StatField val in fieldsTemplate)
			{
				text = text + "\n" + val.statDef.name + " | " + Language.GetString(val.statDef.displayToken);
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_SceneDef(ConCommandArgs args)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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)
			string text = "";
			Enumerator<SceneDef> enumerator = SceneCatalog.allSceneDefs.GetEnumerator();
			try
			{
				while (enumerator.MoveNext())
				{
					SceneDef current = enumerator.Current;
					if (!current.isOfflineScene)
					{
						string[] obj = new string[5] { text, "\n", current.cachedName, " | ", null };
						Color environmentColor = current.environmentColor;
						obj[4] = ((object)(Color)(ref environmentColor)).ToString();
						text = string.Concat(obj);
					}
				}
			}
			finally
			{
				((IDisposable)enumerator).Dispose();
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCListCategoriesInPercent(ConCommandArgs args)
		{
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)ClassicStageInfo.instance))
			{
				Debug.Log((object)"Must be on stage");
			}
			DirectorCardCategorySelection interactableCategories = ClassicStageInfo.instance.interactableCategories;
			if (!Object.op_Implicit((Object)(object)interactableCategories))
			{
				Debug.Log((object)"No DCCS");
			}
			float num = interactableCategories.SumOfAllCategories();
			string text = "--" + SceneInfo.instance.sceneDef.cachedName + "--\n";
			Category[] categories = interactableCategories.categories;
			foreach (Category val in categories)
			{
				text = text + val.name + " | " + val.selectionWeight / num * 100f + "%\n";
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_RuleDef(ConCommandArgs args)
		{
			string text = "";
			foreach (RuleDef allRuleDef in RuleCatalog.allRuleDefs)
			{
				text = text + "\n" + allRuleDef.globalName;
				foreach (RuleChoiceDef choice in allRuleDef.choices)
				{
					text = text + "\n-" + choice.globalName;
				}
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_EffectDef(ConCommandArgs args)
		{
			string text = "";
			EffectDef[] entries = EffectCatalog.entries;
			foreach (EffectDef val in entries)
			{
				text = text + "\n" + val.prefabName;
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_CombatDirector(ConCommandArgs args)
		{
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			SceneDirector val = Object.FindFirstObjectByType<SceneDirector>();
			if (!Object.op_Implicit((Object)(object)ClassicStageInfo.instance))
			{
				Debug.Log((object)"No SceneDirector");
				return;
			}
			string text = string.Empty;
			float num = ClassicStageInfo.instance.modifiableMonsterCategories.SumOfAllCategories();
			for (int i = 0; i < ClassicStageInfo.instance.monsterSelection.Count; i++)
			{
				ChoiceInfo<DirectorCard> val2 = ClassicStageInfo.instance.monsterSelection.choices[i];
				text += string.Format("\n{0} | {1}", new object[2]
				{
					((Object)val2.value.spawnCard).name,
					val2.weight / num * 100f + "%"
				});
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_SceneDirector(ConCommandArgs args)
		{
			//IL_0052: 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_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			SceneDirector val = Object.FindFirstObjectByType<SceneDirector>();
			if (!Object.op_Implicit((Object)(object)val))
			{
				Debug.Log((object)"No SceneDirector");
				return;
			}
			string text = string.Empty;
			float num = ClassicStageInfo.instance.interactableCategories.SumOfAllCategories();
			WeightedSelection<DirectorCard> val2 = val.GenerateInteractableCardSelection();
			for (int i = 0; i < val2.Count; i++)
			{
				ChoiceInfo<DirectorCard> val3 = val2.choices[i];
				text += string.Format("\n{0} | {1}", new object[2]
				{
					((Object)val3.value.spawnCard).name,
					val3.weight / num * 100f + "%"
				});
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCMods(ConCommandArgs args)
		{
			string text = "";
			string text2 = "";
			foreach (KeyValuePair<string, PluginInfo> pluginInfo in Chainloader.PluginInfos)
			{
				text = text + pluginInfo.ToString() + "\n";
			}
			string[] networkModList = NetworkModCompatibilityHelper._networkModList;
			foreach (string text3 in networkModList)
			{
				text2 = text2 + text3.ToString() + "\n";
			}
			Debug.Log((object)"All loaded mods");
			Debug.Log((object)text);
			Debug.Log((object)"All RequiredByAllTaggedMods");
			Debug.Log((object)text2);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_PickupDef(ConCommandArgs args)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			string text = "";
			for (int i = 0; i < PickupCatalog.entries.Length; i++)
			{
				PickupDef val = PickupCatalog.entries[i];
				text += string.Format("{3}|{0} | <color=#{2}>{1}</color>\n", val.internalName, Language.GetString(val.nameToken), ColorUtility.ToHtmlStringRGB(val.baseColor), i);
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_MusicDef(ConCommandArgs args)
		{
			string text = "";
			for (int i = 0; i < MusicTrackCatalog.musicTrackDefs.Length; i++)
			{
				MusicTrackDef val = MusicTrackCatalog.musicTrackDefs[i];
				text += string.Format("{0} | {1}\n", new object[2] { val.cachedName, val.comment });
			}
			Debug.Log((object)text);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_BuffDefFlags(ConCommandArgs args)
		{
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			string text = "\n--HiddenBuffs--";
			string text2 = "\n--IgnoredByNectar--";
			string text3 = "\n--IgnoredByNoxThorn--";
			BuffDef[] buffDefs = BuffCatalog.buffDefs;
			foreach (BuffDef val in buffDefs)
			{
				if (val.isHidden)
				{
					text = text + "\n" + ((Object)val).name;
					continue;
				}
				if (((Enum)val.flags).HasFlag((Enum)(object)(Flags)1))
				{
					text3 = text3 + "\n" + ((Object)val).name;
				}
				if (val.ignoreGrowthNectar && !val.isDebuff && !val.isCooldown && !val.isDOT)
				{
					text2 = text2 + "\n" + ((Object)val).name;
				}
			}
			Debug.Log((object)text);
			Debug.Log((object)text2);
			Debug.Log((object)text3);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_BodyFlags(ConCommandArgs args)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			string empty = string.Empty;
			CharacterBody[] bodyPrefabBodyComponents = BodyCatalog.bodyPrefabBodyComponents;
			foreach (CharacterBody val in bodyPrefabBodyComponents)
			{
				Debug.LogFormat("\n{0}\n{1}", new object[2]
				{
					((Object)val).name,
					val.bodyFlags
				});
			}
			Debug.LogFormat(empty, Array.Empty<object>());
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_SimuWaves(ConCommandArgs args)
		{
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0180: Unknown result type (might be due to invalid IL or missing references)
			List<DetachParticleOnDestroyAndEndEmission> list = Resources.FindObjectsOfTypeAll<DetachParticleOnDestroyAndEndEmission>().ToList();
			foreach (DetachParticleOnDestroyAndEndEmission item in list)
			{
				if (Object.op_Implicit((Object)(object)((Component)item).GetComponent<EffectComponent>()))
				{
					if (((Behaviour)item).enabled && (Object)(object)item.particleSystem != (Object)null)
					{
						Debug.LogWarning((object)((Object)((Component)item).transform.root).name);
					}
					else
					{
						Debug.Log((object)((Object)((Component)item).transform.root).name);
					}
				}
			}
			List<InfiniteTowerWaveCategory> list2 = Resources.FindObjectsOfTypeAll<InfiniteTowerWaveCategory>().ToList();
			foreach (InfiniteTowerWaveCategory item2 in list2)
			{
				string text = "_____\n" + ((Object)item2).name;
				for (int i = 0; i < item2.wavePrefabs.Length; i++)
				{
					Transform child = item2.wavePrefabs[i].wavePrefab.GetComponent<InfiniteTowerWaveController>().overlayEntries[1].prefab.transform.GetChild(0).GetChild(1);
					text += string.Format("\n<color=#{2}>{0}</color>\n<color=#{3}>{1}</color>\nWeight:{4}", Language.GetString(((Component)child.GetChild(0)).GetComponent<InfiniteTowerWaveCounter>().token), Language.GetString(((Component)child.GetChild(1)).GetComponent<LanguageTextMeshController>().token), ColorUtility.ToHtmlStringRGB(((Graphic)((Component)child.GetChild(0)).GetComponent<TextMeshProUGUI>()).color), ColorUtility.ToHtmlStringRGB(((Graphic)((Component)child.GetChild(1)).GetComponent<TextMeshProUGUI>()).color), item2.wavePrefabs[i].weight);
				}
				Debug.Log((object)text);
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public unsafe static void CCList_ItemTags(ConCommandArgs args)
		{
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: 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)
			for (int i = 0; i < ItemCatalog.allItemDefs.Length; i++)
			{
				ItemDef val = (ItemDef)Unsafe.Read<object>((void*)ItemCatalog.allItemDefs[i]);
				string text = "\n__" + ((Object)val).name + " | " + Language.GetString(val.nameToken) + "__";
				for (int j = 0; j < val.tags.Length; j++)
				{
					text = text + "\n" + ((object)(ItemTag)(ref val.tags[j])).ToString();
				}
				Debug.Log((object)text);
			}
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public unsafe static void CCList_ItemCategory(ConCommandArgs args)
		{
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Invalid comparison between Unknown and I4
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			string text = "______\nItems tagged as Damage";
			string text2 = "______\nItems tagged as Healing";
			string text3 = "______\nItems tagged as Utility";
			string text4 = "______\nItems tagged as AIBlacklist";
			string text5 = "______\nItems tagged as CannotDuplicate";
			for (int i = 0; i < ItemCatalog.allItemDefs.Length; i++)
			{
				ItemDef val = (ItemDef)Unsafe.Read<object>((void*)ItemCatalog.allItemDefs[i]);
				if ((int)val.tier != 5)
				{
					string text6 = string.Format("\n<color=#{1}>{0}</color>", new object[2]
					{
						Language.GetString(val.nameToken),
						ColorCatalog.GetColorHexString(val.colorIndex)
					});
					if (Array.IndexOf(val.tags, (ItemTag)1) != -1)
					{
						text += text6;
					}
					if (Array.IndexOf(val.tags, (ItemTag)2) != -1)
					{
						text2 += text6;
					}
					if (Array.IndexOf(val.tags, (ItemTag)3) != -1)
					{
						text3 += text6;
					}
					if (Array.IndexOf(val.tags, (ItemTag)4) != -1)
					{
						text4 += text6;
					}
					if (Array.IndexOf(val.tags, (ItemTag)15) != -1)
					{
						text5 += text6;
					}
				}
			}
			Debug.Log((object)text);
			Debug.Log((object)text2);
			Debug.Log((object)text3);
			Debug.Log((object)text4);
			Debug.Log((object)text5);
		}

		[ConCommand(/*Could not decode attribute arguments.*/)]
		public static void CCList_DCCS(ConCommandArgs args)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: 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_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			List<DirectorCardCategorySelection> list = new List<DirectorCardCategorySelection>();
			foreach (IResourceLocator resourceLocator in Addressables.ResourceLocators)
			{
				foreach (object key in resourceLocator.Keys)
				{
					DirectorCardCategorySelection val = Addressables.LoadAssetAsync<DirectorCardCategorySelection>(key).WaitForCompletion();
					if ((Object)(object)val != (Object)null)
					{
						CollectionUtils.AddDistinct<DirectorCardCategorySelection>((IList<DirectorCardCategorySelection>)list, val);
					}
					Addressables.LoadAssetAsync<SpawnCard>(key).WaitForCompletion();
					Addressables.LoadAssetAsync<DccsPool>(key).WaitForCompletion();
				}
			}
			List<DirectorCardCategorySelection> list2 = new List<DirectorCardCategorySelection>();
			List<DirectorCardCategorySelection> list3 = new List<DirectorCardCategorySelection>();
			List<DirectorCardCategorySelection> list4 = new List<DirectorCardCategorySelection>();
			List<DirectorCardCategorySelection> list5 = new List<DirectorCardCategorySelection>();
			List<DirectorCardCategorySelection> list6 = Resources.FindObjectsOfTypeAll<DirectorCardCategorySelection>().ToList();
			List<DccsPool> list7 = Resources.FindObjectsOfTypeAll<DccsPool>().OfType<DccsPool>().ToList();
			List<CharacterSpawnCard> list8 = Resources.FindObjectsOfTypeAll<CharacterSpawnCard>().OfType<CharacterSpawnCard>().ToList();
			List<InteractableSpawnCard> list9 = Resources.FindObjectsOfTypeAll<InteractableSpawnCard>().OfType<InteractableSpawnCard>().ToList();
			foreach (DirectorCardCategorySelection item in list)
			{
				list6.Remove(item);
				if (item is FamilyDirectorCardCategorySelection)
				{
					list4.Add(item);
				}
				else if (((Object)item).name.Contains("Interactables"))
				{
					list2.Add(item);
				}
				else if (((Object)item).name.Contains("Monsters"))
				{
					list3.Add(item);
				}
				else
				{
					list5.Add(item);
				}
			}
			list3.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name));
			list2.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name));
			list4.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name));
			list5.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name));
			list6.Sort((DirectorCardCategorySelection x, DirectorCardCategorySelection y) => string.Compare(((Object)x).name, ((Object)y).name));
			list7.Sort((DccsPool x, DccsPool y) => string.Compare(((Object)x).name, ((Object)y).name));
			list8.Sort((CharacterSpawnCard x, CharacterSpawnCard y) => string.Compare(((Object)x).name, ((Object)y).name));
			list9.Sort((InteractableSpawnCard x, InteractableSpawnCard y) => string.Compare(((Object)x).name, ((Object)y).name));
			Debug.Log((object)"\nDCCS | All Interactables");
			DumpDCCSList(list2);
			Debug.Log((object)"\nDCCS | All Monsters");
			DumpDCCSList(list3);
			Debug.Log((object)"\nDCCS | All Families");
			DumpDCCSList(list4);
			Debug.Log((object)"\nDCCS | Misc");
			DumpDCCSList(list5);
			Debug.Log((object)"\nDCCS | Not Vanilla");
			DumpDCCSList(list6);
			Debug.Log((object)"\nDP | All DccsPools");
			for (int i = 0; list7.Count > i; i++)
			{
				string text = "\n--------------------\n";
				text += ((Object)list7[i]).name;
				for (int j = 0; list7[i].poolCategories.Length > j; j++)
				{
					Category val2 = list7[i].poolCategories[j];
					text = text + "\n--[" + j + "]--" + val2.name;
					for (int k = 0; val2.alwaysIncluded.Length > k; k++)
					{
						text = text + "\n[" + k + "] " + ((Object)val2.alwaysIncluded[k].dccs).name + "  wt:" + val2.alwaysIncluded[k].weight;
					}
					for (int l = 0; val2.includedIfConditionsMet.Length > l; l++)
					{
						text = text + "\n[" + l + "] " + ((Object)((PoolEntry)val2.includedIfConditionsMet[l]).dccs).name + "  wt:" + ((PoolEntry)val2.includedIfConditionsMet[l]).weight;
					}
					for (int m = 0; val2.includedIfNoConditionsMet.Length > m; m++)
					{
						text = text + "\n[" + m + "] " + ((Object)val2.includedIfNoConditionsMet[m].dccs).name + "  wt:" + val2.includedIfNoConditionsMet[m].weight;
					}
				}
				Debug.Log((object)text);
			}
			Debug.Log((object)"--\nCharacterSpawnCards\n--");
			for (int n = 0; list8.Count > n; n++)
			{
				Debug.Log((object)(((Object)list8[n]).name + " Cost:" + ((SpawnCard)list8[n]).directorCreditCost));
			}
			Debug.Log((object)"--\nInteractableSpawnCards\n--");
			for (int num = 0; list9.Count > num; num++)
			{
				Debug.Log((object)(((Object)list9[num]).name + " Cost:" + ((SpawnCard)list9[num]).directorCreditCost));
			}
		}

		public static void DumpDCCSList(List<DirectorCardCategorySelection> allDCCS)
		{
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: 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_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: 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_01e8: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; allDCCS.Count > i; i++)
			{
				string text = "\n-------------------\n";
				text += ((Object)allDCCS[i]).name;
				DirectorCardCategorySelection obj = allDCCS[i];
				FamilyDirectorCardCategorySelection val = (FamilyDirectorCardCategorySelection)(object)((obj is FamilyDirectorCardCategorySelection) ? obj : null);
				if (Object.op_Implicit((Object)(object)val))
				{
					text = text + "\nfamilyStart: " + val.minimumStageCompletion;
					text = text + "\nfamilyEnd: " + val.maximumStageCompletion;
				}
				for (int j = 0; allDCCS[i].categories.Length > j; j++)
				{
					Category val2 = allDCCS[i].categories[j];
					text = text + "\n--[" + j + "]--" + val2.name + "--  wt:" + allDCCS[i].categories[j].selectionWeight;
					for (int k = 0; val2.cards.Length > k; k++)
					{
						text = text + "\n[" + k + "] ";
						text = (Object.op_Implicit((Object)(object)val2.cards[k].spawnCard) ? (text + ((Object)val2.cards[k].spawnCard).name) : (text + "NULL Spawn Card"));
						text = text + "  wt:" + val2.cards[k].selectionWeight + "  minStage:" + val2.cards[k].minimumStageCompletions;
						if (Object.op_Implicit((Object)(object)val2.cards[k].forbiddenUnlockableDef) || !string.IsNullOrEmpty(val2.cards[k].forbiddenUnlockable))
						{
							text = text + " forbiddenWhen: " + val2.cards[k].forbiddenUnlockable + (object)val2.cards[k].forbiddenUnlockableDef;
						}
					}
				}
				Debug.Log((object)text);
			}
		}
	}
	internal class Test
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static hook_GetOptionsFromPickupState <0>__CommandWithEveryItem;

			public static Manipulator <1>__ServerAuthManager_HandleSetClientAuth;

			public static hook_GetUserMaster <2>__Run_GetUserMaster;

			public static hook_OnLobbyJoined_bool_string <3>__SteamworksLobbyManager_OnLobbyJoined_bool_string;
		}

		public static void Awake()
		{
		}

		public static void Start()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Expected O, but got Unknown
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Expected O, but got Unknown
			if (WConfig.cfgTestLogbook.Value)
			{
				Test_Logbook.CheatLogbook();
			}
			if (WConfig.cfgTestMultiplayer.Value)
			{
				object obj = <>O.<0>__CommandWithEveryItem;
				if (obj == null)
				{
					hook_GetOptionsFromPickupState val = CommandWithEveryItem;
					<>O.<0>__CommandWithEveryItem = val;
					obj = (object)val;
				}
				PickupPickerController.GetOptionsFromPickupState += (hook_GetOptionsFromPickupState)obj;
				object obj2 = <>O.<1>__ServerAuthManager_HandleSetClientAuth;
				if (obj2 == null)
				{
					Manipulator val2 = ServerAuthManager_HandleSetClientAuth;
					<>O.<1>__ServerAuthManager_HandleSetClientAuth = val2;
					obj2 = (object)val2;
				}
				ServerAuthManager.HandleSetClientAuth += (Manipulator)obj2;
				object obj3 = <>O.<2>__Run_GetUserMaster;
				if (obj3 == null)
				{
					hook_GetUserMaster val3 = Run_GetUserMaster;
					<>O.<2>__Run_GetUserMaster = val3;
					obj3 = (object)val3;
				}
				Run.GetUserMaster += (hook_GetUserMaster)obj3;
				object obj4 = <>O.<3>__SteamworksLobbyManager_OnLobbyJoined_bool_string;
				if (obj4 == null)
				{
					hook_OnLobbyJoined_bool_string val4 = SteamworksLobbyManager_OnLobbyJoined_bool_string;
					<>O.<3>__SteamworksLobbyManager_OnLobbyJoined_bool_string = val4;
					obj4 = (object)val4;
				}
				SteamworksLobbyManager.OnLobbyJoined_bool_string += (hook_OnLobbyJoined_bool_string)obj4;
			}
			if (WConfig.cfgLoadOrder.Value)
			{
				TestLoadOrder.Start();
			}
		}

		private static void SteamworksLobbyManager_OnLobbyJoined_bool_string(orig_OnLobbyJoined_bool_string orig, SteamworksLobbyManager self, bool success, string tokenReasonFailed)
		{
			if (string.IsNullOrEmpty(tokenReasonFailed))
			{
				success = true;
			}
			orig.Invoke(self, success, tokenReasonFailed);
		}

		public static CharacterMaster Run_GetUserMaster(orig_GetUserMaster orig, Run self, NetworkUserId networkUserId)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			if (WConfig.cfgTestMultiplayer.Value)
			{
				return null;
			}
			return orig.Invoke(self, networkUserId);
		}

		public static void ServerAuthManager_HandleSetClientAuth(ILContext il)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Expected O, but got Unknown
			ILCursor val = new ILCursor(il);
			if (val.TryGotoNext((MoveType)2, new Func<Instruction, bool>[1]
			{
				(Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 3)
			}))
			{
				val.EmitDelegate<Func<NetworkConnection, NetworkConnection>>((Func<NetworkConnection, NetworkConnection>)((NetworkConnection self) => WConfig.cfgTestMultiplayer.Value ? null : self));
			}
			else
			{
				Debug.LogWarning((object)"IL Failed: ServerAuthManager_HandleSetClientAuth");
			}
		}

		private static Option[] CommandWithEveryItem(orig_GetOptionsFromPickupState orig, UniquePickup pickupIndex)
		{
			//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_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: 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_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			Option val;
			if (pickupIndex.pickupIndex == PickupCatalog.FindPickupIndex(Items.AACannon.itemIndex))
			{
				Option[] array = (Option[])(object)new Option[ItemCatalog.itemCount];
				for (int i = 0; i < ItemCatalog.itemCount; i++)
				{
					int num = i;
					val = new Option
					{
						available = true
					};
					((Option)(ref val)).pickupIndex = PickupCatalog.FindPickupIndex((ItemIndex)i);
					array[num] = val;
				}
				return array;
			}
			if (pickupIndex.pickupIndex