Decompiled source of RiskOfTheAncients2 v2.1.3

ROTA2.dll

Decompiled a day 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 HG;
using IL.RoR2;
using KinematicCharacterController;
using LookingGlass;
using LookingGlass.ItemStatsNameSpace;
using LookingGlass.StatsDisplay;
using Microsoft.CodeAnalysis;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using On.RoR2.Items;
using On.RoR2.UI;
using R2API;
using ROTA2.Buffs;
using ROTA2.Equipment;
using ROTA2.Items;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Navigation;
using RoR2.Skills;
using RoR2.UI;
using RoR2BepInExPack.GameAssetPathsBetter;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.ResourceManagement.AsyncOperations;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ROTA2")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+ba1e75fd1fc86f47f9da2744fc5d1bfcc2d45b61")]
[assembly: AssemblyProduct("ROTA2")]
[assembly: AssemblyTitle("ROTA2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[DebuggerDisplay("Count = {System.Collections.ICollection.Count}")]
[CompilerGenerated]
internal sealed class <>z__ReadOnlyArray<T> : IEnumerable, ICollection, IList, IEnumerable<T>, IReadOnlyCollection<T>, IReadOnlyList<T>, ICollection<T>, IList<T>
{
	int ICollection.Count => _items.Length;

	bool ICollection.IsSynchronized => false;

	object ICollection.SyncRoot => this;

	object IList.this[int index]
	{
		get
		{
			return _items[index];
		}
		set
		{
			throw new NotSupportedException();
		}
	}

	bool IList.IsFixedSize => true;

	bool IList.IsReadOnly => true;

	int IReadOnlyCollection<T>.Count => _items.Length;

	T IReadOnlyList<T>.this[int index] => _items[index];

	int ICollection<T>.Count => _items.Length;

	bool ICollection<T>.IsReadOnly => true;

	T IList<T>.this[int index]
	{
		get
		{
			return _items[index];
		}
		set
		{
			throw new NotSupportedException();
		}
	}

	public <>z__ReadOnlyArray(T[] items)
	{
		_items = items;
	}

	IEnumerator IEnumerable.GetEnumerator()
	{
		return ((IEnumerable)_items).GetEnumerator();
	}

	void ICollection.CopyTo(Array array, int index)
	{
		((ICollection)_items).CopyTo(array, index);
	}

	int IList.Add(object value)
	{
		throw new NotSupportedException();
	}

	void IList.Clear()
	{
		throw new NotSupportedException();
	}

	bool IList.Contains(object value)
	{
		return ((IList)_items).Contains(value);
	}

	int IList.IndexOf(object value)
	{
		return ((IList)_items).IndexOf(value);
	}

	void IList.Insert(int index, object value)
	{
		throw new NotSupportedException();
	}

	void IList.Remove(object value)
	{
		throw new NotSupportedException();
	}

	void IList.RemoveAt(int index)
	{
		throw new NotSupportedException();
	}

	IEnumerator<T> IEnumerable<T>.GetEnumerator()
	{
		return ((IEnumerable<T>)_items).GetEnumerator();
	}

	void ICollection<T>.Add(T item)
	{
		throw new NotSupportedException();
	}

	void ICollection<T>.Clear()
	{
		throw new NotSupportedException();
	}

	bool ICollection<T>.Contains(T item)
	{
		return ((ICollection<T>)_items).Contains(item);
	}

	void ICollection<T>.CopyTo(T[] array, int arrayIndex)
	{
		((ICollection<T>)_items).CopyTo(array, arrayIndex);
	}

	bool ICollection<T>.Remove(T item)
	{
		throw new NotSupportedException();
	}

	int IList<T>.IndexOf(T item)
	{
		return ((IList<T>)_items).IndexOf(item);
	}

	void IList<T>.Insert(int index, T item)
	{
		throw new NotSupportedException();
	}

	void IList<T>.RemoveAt(int index)
	{
		throw new NotSupportedException();
	}
}
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

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

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

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ROTA2
{
	public static class Compatibility
	{
		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		public static void LookingGlassCompatibility()
		{
			//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_0080: 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_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: 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_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Expected O, but got Unknown
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: 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_0170: 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_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Expected O, but got Unknown
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: 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_01e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: 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_01b0: Expected O, but got Unknown
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0275: Expected O, but got Unknown
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0300: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_031c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_0344: Unknown result type (might be due to invalid IL or missing references)
			//IL_0350: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_0359: Unknown result type (might be due to invalid IL or missing references)
			//IL_035e: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Expected O, but got Unknown
			//IL_03a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0388: Unknown result type (might be due to invalid IL or missing references)
			//IL_0392: Expected O, but got Unknown
			//IL_0418: Unknown result type (might be due to invalid IL or missing references)
			//IL_041d: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0439: Unknown result type (might be due to invalid IL or missing references)
			//IL_0445: Unknown result type (might be due to invalid IL or missing references)
			//IL_0455: Unknown result type (might be due to invalid IL or missing references)
			//IL_0461: Unknown result type (might be due to invalid IL or missing references)
			//IL_046d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: Expected O, but got Unknown
			//IL_04b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a1: Expected O, but got Unknown
			//IL_0524: Unknown result type (might be due to invalid IL or missing references)
			//IL_0529: Unknown result type (might be due to invalid IL or missing references)
			//IL_0539: Unknown result type (might be due to invalid IL or missing references)
			//IL_0545: Unknown result type (might be due to invalid IL or missing references)
			//IL_0551: Unknown result type (might be due to invalid IL or missing references)
			//IL_0509: Unknown result type (might be due to invalid IL or missing references)
			//IL_0513: Expected O, but got Unknown
			//IL_0599: Unknown result type (might be due to invalid IL or missing references)
			//IL_059e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_057b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0585: Expected O, but got Unknown
			//IL_0636: Unknown result type (might be due to invalid IL or missing references)
			//IL_063b: Unknown result type (might be due to invalid IL or missing references)
			//IL_064b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0657: Unknown result type (might be due to invalid IL or missing references)
			//IL_0663: Unknown result type (might be due to invalid IL or missing references)
			//IL_0673: Unknown result type (might be due to invalid IL or missing references)
			//IL_067f: Unknown result type (might be due to invalid IL or missing references)
			//IL_068b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0692: Unknown result type (might be due to invalid IL or missing references)
			//IL_0694: Unknown result type (might be due to invalid IL or missing references)
			//IL_0699: Unknown result type (might be due to invalid IL or missing references)
			//IL_0618: Unknown result type (might be due to invalid IL or missing references)
			//IL_0622: Expected O, but got Unknown
			//IL_06de: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_070b: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cd: Expected O, but got Unknown
			//IL_0750: Unknown result type (might be due to invalid IL or missing references)
			//IL_0755: Unknown result type (might be due to invalid IL or missing references)
			//IL_0765: Unknown result type (might be due to invalid IL or missing references)
			//IL_0771: Unknown result type (might be due to invalid IL or missing references)
			//IL_077d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0735: Unknown result type (might be due to invalid IL or missing references)
			//IL_073f: Expected O, but got Unknown
			//IL_07c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b1: Expected O, but got Unknown
			//IL_0834: Unknown result type (might be due to invalid IL or missing references)
			//IL_0839: Unknown result type (might be due to invalid IL or missing references)
			//IL_0849: Unknown result type (might be due to invalid IL or missing references)
			//IL_0855: Unknown result type (might be due to invalid IL or missing references)
			//IL_0861: Unknown result type (might be due to invalid IL or missing references)
			//IL_0819: Unknown result type (might be due to invalid IL or missing references)
			//IL_0823: Expected O, but got Unknown
			//IL_08a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_08be: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_088b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0895: Expected O, but got Unknown
			//IL_0946: Unknown result type (might be due to invalid IL or missing references)
			//IL_094b: Unknown result type (might be due to invalid IL or missing references)
			//IL_095b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0967: Unknown result type (might be due to invalid IL or missing references)
			//IL_0973: Unknown result type (might be due to invalid IL or missing references)
			//IL_0983: Unknown result type (might be due to invalid IL or missing references)
			//IL_098f: Unknown result type (might be due to invalid IL or missing references)
			//IL_099b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0928: Unknown result type (might be due to invalid IL or missing references)
			//IL_0932: Expected O, but got Unknown
			//IL_09e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a10: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a20: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a38: Unknown result type (might be due to invalid IL or missing references)
			//IL_09c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_09cf: Expected O, but got Unknown
			//IL_0a80: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a85: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a95: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aa1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0aad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0abd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ac9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0adc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ade: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a62: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a6c: Expected O, but got Unknown
			//IL_0b2b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b40: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b4c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b58: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b68: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b74: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b80: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b17: Expected O, but got Unknown
			//IL_0bc8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bcd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bdd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0be9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bf5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c05: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c11: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c1d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0baa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb4: Expected O, but got Unknown
			//IL_0c65: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c6a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c7a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c86: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c92: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ca2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c47: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c51: Expected O, but got Unknown
			//IL_0cff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d14: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d20: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ce4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cee: Expected O, but got Unknown
			//IL_0d71: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d76: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d86: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d92: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d9e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d56: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d60: Expected O, but got Unknown
			//IL_0de6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0deb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dfb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e07: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e13: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e23: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e2f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e3b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dd2: Expected O, but got Unknown
			//IL_0e83: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e98: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eb0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ec0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ecc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ed8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e65: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e6f: Expected O, but got Unknown
			//IL_0f20: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f25: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f35: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f41: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f4d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f5d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f69: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f75: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f02: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f0c: Expected O, but got Unknown
			//IL_0fba: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fbf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fcf: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fdb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fe7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f9f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0fa9: Expected O, but got Unknown
			//IL_102c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1031: Unknown result type (might be due to invalid IL or missing references)
			//IL_1041: Unknown result type (might be due to invalid IL or missing references)
			//IL_104d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1059: Unknown result type (might be due to invalid IL or missing references)
			//IL_1011: Unknown result type (might be due to invalid IL or missing references)
			//IL_101b: Expected O, but got Unknown
			//IL_109e: Unknown result type (might be due to invalid IL or missing references)
			//IL_10a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_10b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_10c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_10cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_1083: Unknown result type (might be due to invalid IL or missing references)
			//IL_108d: Expected O, but got Unknown
			//IL_1111: Unknown result type (might be due to invalid IL or missing references)
			//IL_1116: Unknown result type (might be due to invalid IL or missing references)
			//IL_1126: Unknown result type (might be due to invalid IL or missing references)
			//IL_1132: Unknown result type (might be due to invalid IL or missing references)
			//IL_113e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1145: Unknown result type (might be due to invalid IL or missing references)
			//IL_1147: Unknown result type (might be due to invalid IL or missing references)
			//IL_114c: Unknown result type (might be due to invalid IL or missing references)
			//IL_10f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_1100: Expected O, but got Unknown
			//IL_1191: Unknown result type (might be due to invalid IL or missing references)
			//IL_1196: Unknown result type (might be due to invalid IL or missing references)
			//IL_11a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_11b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_11be: Unknown result type (might be due to invalid IL or missing references)
			//IL_1176: Unknown result type (might be due to invalid IL or missing references)
			//IL_1180: Expected O, but got Unknown
			//IL_1203: Unknown result type (might be due to invalid IL or missing references)
			//IL_1208: Unknown result type (might be due to invalid IL or missing references)
			//IL_1218: Unknown result type (might be due to invalid IL or missing references)
			//IL_1224: Unknown result type (might be due to invalid IL or missing references)
			//IL_1230: Unknown result type (might be due to invalid IL or missing references)
			//IL_11e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_11f2: Expected O, but got Unknown
			//IL_1278: Unknown result type (might be due to invalid IL or missing references)
			//IL_127d: Unknown result type (might be due to invalid IL or missing references)
			//IL_128d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1299: Unknown result type (might be due to invalid IL or missing references)
			//IL_12a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_12b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_12c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_12cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_125a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1264: Expected O, but got Unknown
			//IL_1315: Unknown result type (might be due to invalid IL or missing references)
			//IL_131a: Unknown result type (might be due to invalid IL or missing references)
			//IL_132a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1336: Unknown result type (might be due to invalid IL or missing references)
			//IL_1342: Unknown result type (might be due to invalid IL or missing references)
			//IL_1352: Unknown result type (might be due to invalid IL or missing references)
			//IL_135e: Unknown result type (might be due to invalid IL or missing references)
			//IL_136a: Unknown result type (might be due to invalid IL or missing references)
			//IL_137a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1386: Unknown result type (might be due to invalid IL or missing references)
			//IL_1392: Unknown result type (might be due to invalid IL or missing references)
			//IL_13a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_13ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_13ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_12f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_1301: Expected O, but got Unknown
			//IL_1402: Unknown result type (might be due to invalid IL or missing references)
			//IL_1407: Unknown result type (might be due to invalid IL or missing references)
			//IL_1417: Unknown result type (might be due to invalid IL or missing references)
			//IL_1423: Unknown result type (might be due to invalid IL or missing references)
			//IL_142f: Unknown result type (might be due to invalid IL or missing references)
			//IL_143f: Unknown result type (might be due to invalid IL or missing references)
			//IL_144b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1457: Unknown result type (might be due to invalid IL or missing references)
			//IL_1467: Unknown result type (might be due to invalid IL or missing references)
			//IL_1473: Unknown result type (might be due to invalid IL or missing references)
			//IL_147f: Unknown result type (might be due to invalid IL or missing references)
			//IL_13e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_13ee: Expected O, but got Unknown
			//IL_14c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_14cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_14dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_14e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_14f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_1504: Unknown result type (might be due to invalid IL or missing references)
			//IL_1510: Unknown result type (might be due to invalid IL or missing references)
			//IL_151c: Unknown result type (might be due to invalid IL or missing references)
			//IL_14a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_14b3: Expected O, but got Unknown
			//IL_1564: Unknown result type (might be due to invalid IL or missing references)
			//IL_1569: Unknown result type (might be due to invalid IL or missing references)
			//IL_1579: Unknown result type (might be due to invalid IL or missing references)
			//IL_1585: Unknown result type (might be due to invalid IL or missing references)
			//IL_1591: Unknown result type (might be due to invalid IL or missing references)
			//IL_15a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_15ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_15b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_1546: Unknown result type (might be due to invalid IL or missing references)
			//IL_1550: Expected O, but got Unknown
			//IL_1601: Unknown result type (might be due to invalid IL or missing references)
			//IL_1606: Unknown result type (might be due to invalid IL or missing references)
			//IL_1616: Unknown result type (might be due to invalid IL or missing references)
			//IL_1622: Unknown result type (might be due to invalid IL or missing references)
			//IL_162e: Unknown result type (might be due to invalid IL or missing references)
			//IL_163e: Unknown result type (might be due to invalid IL or missing references)
			//IL_164a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1656: Unknown result type (might be due to invalid IL or missing references)
			//IL_1666: Unknown result type (might be due to invalid IL or missing references)
			//IL_1672: Unknown result type (might be due to invalid IL or missing references)
			//IL_167e: Unknown result type (might be due to invalid IL or missing references)
			//IL_168e: Unknown result type (might be due to invalid IL or missing references)
			//IL_169a: Unknown result type (might be due to invalid IL or missing references)
			//IL_16a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_15e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_15ed: Expected O, but got Unknown
			//IL_16ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_16f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_1703: Unknown result type (might be due to invalid IL or missing references)
			//IL_170f: Unknown result type (might be due to invalid IL or missing references)
			//IL_171b: Unknown result type (might be due to invalid IL or missing references)
			//IL_172b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1737: Unknown result type (might be due to invalid IL or missing references)
			//IL_1743: Unknown result type (might be due to invalid IL or missing references)
			//IL_1753: Unknown result type (might be due to invalid IL or missing references)
			//IL_175f: Unknown result type (might be due to invalid IL or missing references)
			//IL_176b: Unknown result type (might be due to invalid IL or missing references)
			//IL_177b: Unknown result type (might be due to invalid IL or missing references)
			//IL_1787: Unknown result type (might be due to invalid IL or missing references)
			//IL_1793: Unknown result type (might be due to invalid IL or missing references)
			//IL_16d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_16da: Expected O, but got Unknown
			//IL_17db: Unknown result type (might be due to invalid IL or missing references)
			//IL_17e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_17f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_17fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_1808: Unknown result type (might be due to invalid IL or missing references)
			//IL_1818: Unknown result type (might be due to invalid IL or missing references)
			//IL_1824: Unknown result type (might be due to invalid IL or missing references)
			//IL_1830: Unknown result type (might be due to invalid IL or missing references)
			//IL_1840: Unknown result type (might be due to invalid IL or missing references)
			//IL_184c: Unknown result type (might be due to invalid IL or missing references)
			//IL_1858: Unknown result type (might be due to invalid IL or missing references)
			//IL_1868: Unknown result type (might be due to invalid IL or missing references)
			//IL_1874: Unknown result type (might be due to invalid IL or missing references)
			//IL_1880: Unknown result type (might be due to invalid IL or missing references)
			//IL_17bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_17c7: Expected O, but got Unknown
			//IL_18c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_18cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_18dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_18e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_18f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_1905: Unknown result type (might be due to invalid IL or missing references)
			//IL_1911: Unknown result type (might be due to invalid IL or missing references)
			//IL_191d: Unknown result type (might be due to invalid IL or missing references)
			//IL_192d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1939: Unknown result type (might be due to invalid IL or missing references)
			//IL_1945: Unknown result type (might be due to invalid IL or missing references)
			//IL_1955: Unknown result type (might be due to invalid IL or missing references)
			//IL_1961: Unknown result type (might be due to invalid IL or missing references)
			//IL_196d: Unknown result type (might be due to invalid IL or missing references)
			//IL_197d: Unknown result type (might be due to invalid IL or missing references)
			//IL_1989: Unknown result type (might be due to invalid IL or missing references)
			//IL_1995: Unknown result type (might be due to invalid IL or missing references)
			//IL_19a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_19b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_19bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_18aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_18b4: Expected O, but got Unknown
			//IL_1a02: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a07: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a17: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a23: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a2f: Unknown result type (might be due to invalid IL or missing references)
			//IL_19e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_19f1: Expected O, but got Unknown
			//IL_1a59: Unknown result type (might be due to invalid IL or missing references)
			//IL_1a63: Expected O, but got Unknown
			Log.Debug("Adding LookingGlass stat display definitions.");
			Func<float, string> utility = (float x) => (!StatsDisplayClass.builtInColors.Value) ? x.ToString(StatsDisplayDefinitions.floatPrecision) : ("<style=\"cIsUtility\">" + x.ToString(StatsDisplayDefinitions.floatPrecision) + "</style");
			StatsDisplayClass.statDictionary.Add("magicResistance", delegate(CharacterBody cachedUserBody)
			{
				StatsAPI.CustomStats component = ((Component)cachedUserBody).GetComponent<StatsAPI.CustomStats>();
				return Object.op_Implicit((Object)(object)component) ? (utility((1f - component.MagicResistanceMultiplier) * 100f) + "%") : (utility(0f) + "%");
			});
			Log.Debug("Adding LookingGlass item definitions.");
			if (Plugin.ItemsEnabled[ItemBase<BootsOfSpeed>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Base Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<BootsOfSpeed>.Instance.MovementSpeedBase.Value + ItemBase<BootsOfSpeed>.Instance.MovementSpeedPerStack.Value * (float)(count - 1) }
				}, ItemBase<BootsOfSpeed>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<EnchantedMango>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Damage Per Stack: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<EnchantedMango>.Instance.DamageBonusBase.Value / 100f + ItemBase<EnchantedMango>.Instance.DamageBonusPerStack.Value / 100f * (float)(count - 1) }
				}, ItemBase<EnchantedMango>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<ConsumedMango>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<ConsumedMango>.Instance.DamageBase.Value / 100f + ItemBase<ConsumedMango>.Instance.DamagePerStack.Value / 100f * (float)(count - 1) }
				}, ItemBase<ConsumedMango>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<FairysTrinket>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Cooldown Reduction: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Bonus Health: " },
					valueTypes = { (ValueType)3 },
					measurementUnits = { (MeasurementUnits)2 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(3)
					{
						Utils.GetExponentialStacking(ItemBase<FairysTrinket>.Instance.SkillCooldownReductionBase.Value / 100f, ItemBase<FairysTrinket>.Instance.SkillCooldownReductionPerStack.Value / 100f, count),
						ItemBase<FairysTrinket>.Instance.DamageBase.Value / 100f + ItemBase<FairysTrinket>.Instance.DamagePerStack.Value / 100f * (float)(count - 1),
						ItemBase<FairysTrinket>.Instance.MaximumHealthBase.Value + ItemBase<FairysTrinket>.Instance.MaximumHealthPerStack.Value * (float)(count - 1)
					}
				}, ItemBase<FairysTrinket>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<HealingSalve>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Total Heal: " },
					valueTypes = { (ValueType)0 },
					measurementUnits = { (MeasurementUnits)2 },
					calculateValues = (CharacterMaster master, int count) => new List<float>(1) { (ItemBase<HealingSalve>.Instance.RegenerationBase.Value + ItemBase<HealingSalve>.Instance.RegenerationPerStack.Value * (float)(count - 1)) * (1f + 0.2f * master.GetBody().level) * ItemBase<HealingSalve>.Instance.BuffDuration.Value }
				}, ItemBase<HealingSalve>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<Javelin>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Bonus Hit Chance: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					hasChance = true,
					chanceScaling = (ChanceScaling)2,
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						Utils.CalculateChanceWithLuck(ItemBase<Javelin>.Instance.ProcChance.Value / 100f, luck),
						ItemBase<Javelin>.Instance.DamageBase.Value / 100f + ItemBase<Javelin>.Instance.DamagePerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<Javelin>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<OrbOfBlight>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Max Armor Reduction: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<OrbOfBlight>.Instance.ArmorReduction.Value * (float)(ItemBase<OrbOfBlight>.Instance.MaxStacksBase.Value + ItemBase<OrbOfBlight>.Instance.MaxStacksPerStack.Value * (count - 1)) }
				}, ItemBase<OrbOfBlight>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<OrbOfFrost>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Movement Speed Slow: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Attack Speed Slow: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<OrbOfFrost>.Instance.MovementSpeedSlowBase.Value / 100f + ItemBase<OrbOfFrost>.Instance.MovementSpeedSlowPerStack.Value / 100f * (float)(count - 1),
						ItemBase<OrbOfFrost>.Instance.AttackSpeedSlowBase.Value / 100f + ItemBase<OrbOfFrost>.Instance.AttackSpeedSlowPerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<OrbOfFrost>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<OrbOfVenom>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Total Poison Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { (ItemBase<OrbOfVenom>.Instance.PoisonDamageBase.Value / 100f + ItemBase<OrbOfVenom>.Instance.PoisonDamagePerStack.Value / 100f * (float)(count - 1)) * ItemBase<OrbOfVenom>.Instance.PoisonDuration.Value }
				}, ItemBase<OrbOfVenom>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<QuellingBlade>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Non-Boss Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<QuellingBlade>.Instance.DamageBase.Value + ItemBase<QuellingBlade>.Instance.DamagePerStack.Value * (float)(count - 1) }
				}, ItemBase<QuellingBlade>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<SparkOfCourage>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Armor: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<SparkOfCourage>.Instance.DamageBase.Value / 100f + ItemBase<SparkOfCourage>.Instance.DamagePerStack.Value / 100f * (float)(count - 1),
						ItemBase<SparkOfCourage>.Instance.ArmorBase.Value + ItemBase<SparkOfCourage>.Instance.ArmorPerStack.Value * (float)(count - 1)
					}
				}, ItemBase<SparkOfCourage>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<DragonScale>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Burn Chance: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Total Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					hasChance = true,
					chanceScaling = (ChanceScaling)2,
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						Utils.CalculateChanceWithLuck(ItemBase<DragonScale>.Instance.ProcChance.Value / 100f, luck),
						ItemBase<DragonScale>.Instance.DamageBase.Value / 100f + ItemBase<DragonScale>.Instance.DamagePerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<DragonScale>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<LanceOfPursuit>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Rear Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<LanceOfPursuit>.Instance.DamageBase.Value / 100f + ItemBase<LanceOfPursuit>.Instance.DamagePerStack.Value / 100f * (float)(count - 1) }
				}, ItemBase<LanceOfPursuit>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<IronBranch>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Stats Increase: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<IronBranch>.Instance.StatIncreaseBase.Value / 100f + ItemBase<IronBranch>.Instance.StatIncreasePerStack.Value / 100f * (float)(count - 1) }
				}, ItemBase<IronBranch>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<BladesOfAttack>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<BladesOfAttack>.Instance.DamageBase.Value / 100f + ItemBase<BladesOfAttack>.Instance.DamagePerStack.Value / 100f * (float)(count - 1) }
				}, ItemBase<BladesOfAttack>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<Cloak>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Magic Resistance: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { 1f - (1f - ItemBase<Cloak>.Instance.MagicResistanceBase.Value / 100f) * Mathf.Pow(1f - ItemBase<Cloak>.Instance.MagicResistancePerStack.Value / 100f, (float)(count - 1)) }
				}, ItemBase<Cloak>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<Kaya>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Cooldown Reduction: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						Utils.GetExponentialStacking(ItemBase<Kaya>.Instance.SkillCooldownReductionBase.Value / 100f, ItemBase<Kaya>.Instance.SkillCooldownReductionPerStack.Value / 100f, count),
						ItemBase<Kaya>.Instance.DamageBase.Value / 100f + ItemBase<Kaya>.Instance.DamagePerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<Kaya>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<Sange>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Bonus Health: " },
					valueTypes = { (ValueType)3 },
					measurementUnits = { (MeasurementUnits)2 },
					descriptions = { "Healing: " },
					valueTypes = { (ValueType)0 },
					measurementUnits = { (MeasurementUnits)3 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<Sange>.Instance.MaximumHealthBase.Value + ItemBase<Sange>.Instance.MaximumHealthPerStack.Value * (float)(count - 1),
						ItemBase<Sange>.Instance.BaseHealthRegenerationBase.Value + ItemBase<Sange>.Instance.BaseHealthRegenerationPerStack.Value * (float)(count - 1)
					}
				}, ItemBase<Sange>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<Yasha>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<Yasha>.Instance.AttackSpeedBase.Value / 100f + ItemBase<Yasha>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1),
						ItemBase<Yasha>.Instance.MovementSpeedBase.Value / 100f + ItemBase<Yasha>.Instance.MovementSpeedPerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<Yasha>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<SkullBasher>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Bash Chance: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					hasChance = true,
					chanceScaling = (ChanceScaling)2,
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						Utils.CalculateChanceWithLuck(ItemBase<SkullBasher>.Instance.ProcChance.Value / 100f, luck),
						ItemBase<SkullBasher>.Instance.DamageBase.Value / 100f + ItemBase<SkullBasher>.Instance.DamagePerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<SkullBasher>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<Daedalus>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Crit Chance: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Crit Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						Utils.CalculateChanceWithLuck(ItemBase<Daedalus>.Instance.CriticalChance.Value / 100f, luck),
						ItemBase<Daedalus>.Instance.CriticalDamageBase.Value / 100f + ItemBase<Daedalus>.Instance.CriticalDamagePerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<Daedalus>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<QuicksilverAmulet>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Max Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Max Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValues = delegate(CharacterMaster master, int count)
					{
						int num = 0;
						CharacterBody body = master.GetBody();
						GenericSkill[] array = ((body == null) ? null : body.skillLocator?.allSkills);
						if (array != null)
						{
							GenericSkill[] array2 = array;
							foreach (GenericSkill val in array2)
							{
								if (Object.op_Implicit((Object)(object)val) && val.baseRechargeInterval > 0f)
								{
									num++;
								}
							}
						}
						return new List<float>(2)
						{
							(ItemBase<QuicksilverAmulet>.Instance.AttackSpeedBase.Value / 100f + ItemBase<QuicksilverAmulet>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1)) * (float)num,
							(ItemBase<QuicksilverAmulet>.Instance.MovementSpeedBase.Value / 100f + ItemBase<QuicksilverAmulet>.Instance.MovementSpeedPerStack.Value / 100f * (float)(count - 1)) * (float)num
						};
					}
				}, ItemBase<QuicksilverAmulet>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<ShadowAmulet>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Invisibility Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Invisibility Linger Duration: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)5 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<ShadowAmulet>.Instance.AttackSpeedBase.Value / 100f + ItemBase<ShadowAmulet>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1),
						ItemBase<ShadowAmulet>.Instance.LingerDurationBase.Value + ItemBase<ShadowAmulet>.Instance.LingerDurationPerStack.Value * (float)(count - 1)
					}
				}, ItemBase<ShadowAmulet>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<IronTalon>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { Util.ConvertAmplificationPercentageIntoReductionNormalized(ItemBase<IronTalon>.Instance.HealthDamageBase.Value / 100f + ItemBase<IronTalon>.Instance.HealthDamagePerStack.Value / 100f * (float)(count - 1)) }
				}, ItemBase<IronTalon>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<HeartOfTarrasque>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Bonus Health: " },
					valueTypes = { (ValueType)3 },
					measurementUnits = { (MeasurementUnits)2 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<HeartOfTarrasque>.Instance.MaximumHealthBase.Value + ItemBase<HeartOfTarrasque>.Instance.MaximumHealthPerStack.Value * (float)(count - 1) }
				}, ItemBase<HeartOfTarrasque>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<Radiance>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Ignite Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Burn Total Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<Radiance>.Instance.IgniteBase.Value / 100f + ItemBase<Radiance>.Instance.IgnitePerStack.Value / 100f * (float)(count - 1),
						ItemBase<Radiance>.Instance.BurnBase.Value / 100f + ItemBase<Radiance>.Instance.BurnPerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<Radiance>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<AeonDisk>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Invulnerability Duration: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)5 },
					descriptions = { "Movement Speed Duration: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)5 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<AeonDisk>.Instance.InvulnerabilityDuration.Value,
						ItemBase<AeonDisk>.Instance.MovementSpeedDuration.Value
					}
				}, ItemBase<AeonDisk>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<AssaultCuirass>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Armor: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<AssaultCuirass>.Instance.AttackSpeedBase.Value / 100f + ItemBase<AssaultCuirass>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1),
						ItemBase<AssaultCuirass>.Instance.ArmorBase.Value + ItemBase<AssaultCuirass>.Instance.ArmorPerStack.Value * (float)(count - 1)
					}
				}, ItemBase<AssaultCuirass>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<BootsOfTravel>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValues = delegate(CharacterMaster master, int count)
					{
						CharacterBody body = master.GetBody();
						return new List<float>(1) { 1f - 1f / (body.moveSpeed / (body.baseMoveSpeed * (1f + ItemBase<BootsOfTravel>.Instance.MovementSpeedBonus.Value / 100f))) * (ItemBase<BootsOfTravel>.Instance.DamageBonusBase.Value / 100f + ItemBase<BootsOfTravel>.Instance.DamageBonusPerStack.Value / 100f * (float)(count - 1)) };
					}
				}, ItemBase<BootsOfTravel>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<ExMachina>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Chance: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = delegate(float luck, int count, float proc)
					{
						float num = 1f - 1f / (1f + 1.5f * (ItemBase<ExMachina>.Instance.RestoreChanceBase.Value / 100f + ItemBase<ExMachina>.Instance.RestoreChancePerStack.Value / 100f * (float)(count - 1)));
						return new List<float>(1) { Utils.CalculateChanceWithLuck(num, luck) };
					}
				}, ItemBase<ExMachina>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<InfusedRaindrops>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Damage Reduction: " },
					valueTypes = { (ValueType)17 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<InfusedRaindrops>.Instance.DamageBlockBase.Value + ItemBase<InfusedRaindrops>.Instance.DamageBlockPerStack.Value * (float)(count - 1) }
				}, ItemBase<InfusedRaindrops>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<PirateHat>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Scrap Chance: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					hasChance = true,
					chanceScaling = (ChanceScaling)0,
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { Utils.CalculateChanceWithLuck(ItemBase<PirateHat>.Instance.DropChanceBase.Value / 100f + ItemBase<PirateHat>.Instance.DropChancePerStack.Value / 100f * (float)(count - 1), luck) }
				}, ItemBase<PirateHat>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<RefresherOrb>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Restore Cooldown: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)5 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<RefresherOrb>.Instance.RestoreCooldown.Value * MathF.Pow(ItemBase<RefresherOrb>.Instance.RestoreCooldownReductionPerStack.Value / 100f, count - 1) }
				}, ItemBase<RefresherOrb>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<NemesisCurse>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Curse Damage Multiplier: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { (1f + ItemBase<NemesisCurse>.Instance.DamageBase.Value / 100f) * Mathf.Pow(1f + ItemBase<NemesisCurse>.Instance.DamagePerStack.Value / 100f, (float)(count - 1)) }
				}, ItemBase<NemesisCurse>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<UnwaveringCondition>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Magic Resistance: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Maximum Health: " },
					valueTypes = { (ValueType)3 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = delegate(float luck, int count, float proc)
					{
						float num = 1f - ItemBase<UnwaveringCondition>.Instance.MagicResistanceBase.Value / 100f;
						for (int i = 1; i < count; i++)
						{
							num *= 1f - ItemBase<UnwaveringCondition>.Instance.MagicResistancePerStack.Value / 100f;
						}
						return new List<float>(2)
						{
							1f - (1f - ItemBase<UnwaveringCondition>.Instance.MagicResistanceBase.Value / 100f) * Mathf.Pow(1f - ItemBase<UnwaveringCondition>.Instance.MagicResistancePerStack.Value / 100f, (float)(count - 1)),
							ItemBase<UnwaveringCondition>.Instance.CombinedHealthLimit.Value * Mathf.Pow(1f - ItemBase<UnwaveringCondition>.Instance.LimitReductionPerStack.Value / 100f, (float)(count - 1))
						};
					}
				}, ItemBase<UnwaveringCondition>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<OrbOfCorrosion>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Max Armor Reduction: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)4 },
					descriptions = { "Movement Speed Slow: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Attack Speed Slow: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Total Poison Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(4)
					{
						ItemBase<OrbOfCorrosion>.Instance.ArmorReduction.Value * (float)(ItemBase<OrbOfCorrosion>.Instance.MaxStacksBase.Value + ItemBase<OrbOfCorrosion>.Instance.MaxStacksPerStack.Value * (count - 1)),
						ItemBase<OrbOfCorrosion>.Instance.MovementSpeedSlowBase.Value / 100f + ItemBase<OrbOfCorrosion>.Instance.MovementSpeedSlowPerStack.Value / 100f * (float)(count - 1),
						ItemBase<OrbOfCorrosion>.Instance.AttackSpeedSlowBase.Value / 100f + ItemBase<OrbOfCorrosion>.Instance.AttackSpeedSlowPerStack.Value / 100f * (float)(count - 1),
						(ItemBase<OrbOfCorrosion>.Instance.PoisonDamageBase.Value / 100f + ItemBase<OrbOfCorrosion>.Instance.PoisonDamagePerStack.Value / 100f * (float)(count - 1)) * ItemBase<OrbOfCorrosion>.Instance.PoisonDuration.Value
					}
				}, ItemBase<OrbOfCorrosion>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<TranquilBoots>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Base Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)4 },
					descriptions = { "Safe Healing: " },
					valueTypes = { (ValueType)0 },
					measurementUnits = { (MeasurementUnits)3 },
					descriptions = { "Safe Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)4 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(3)
					{
						ItemBase<TranquilBoots>.Instance.MovementSpeedBase.Value + ItemBase<TranquilBoots>.Instance.MovementSpeedPerStack.Value * (float)(count - 1),
						ItemBase<TranquilBoots>.Instance.OODHealthRegenerationBase.Value + ItemBase<TranquilBoots>.Instance.OODHealthRegenerationPerStack.Value * (float)(count - 1),
						ItemBase<TranquilBoots>.Instance.OODMovementSpeedBase.Value + ItemBase<TranquilBoots>.Instance.OODMovementSpeedPerStack.Value * (float)(count - 1)
					}
				}, ItemBase<TranquilBoots>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<PhaseBoots>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Sprint Bonus: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<PhaseBoots>.Instance.DamageBase.Value / 100f + ItemBase<PhaseBoots>.Instance.DamagePerStack.Value / 100f * (float)(count - 1),
						ItemBase<PhaseBoots>.Instance.SprintSpeedBase.Value / 100f + ItemBase<PhaseBoots>.Instance.SprintSpeedPerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<PhaseBoots>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<PowerTreads>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(2)
					{
						ItemBase<PowerTreads>.Instance.MovementSpeedBase.Value / 100f + ItemBase<PowerTreads>.Instance.MovementSpeedPerStack.Value / 100f * (float)(count - 1),
						ItemBase<PowerTreads>.Instance.AttackSpeedBase.Value / 100f + ItemBase<PowerTreads>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<PowerTreads>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<KayaAndSange>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Cooldown Reduction: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Bonus Health: " },
					valueTypes = { (ValueType)3 },
					measurementUnits = { (MeasurementUnits)2 },
					descriptions = { "Healing: " },
					valueTypes = { (ValueType)0 },
					measurementUnits = { (MeasurementUnits)3 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(4)
					{
						Utils.GetExponentialStacking(ItemBase<KayaAndSange>.Instance.SkillCooldownReductionBase.Value / 100f, ItemBase<KayaAndSange>.Instance.SkillCooldownReductionPerStack.Value / 100f, count),
						ItemBase<KayaAndSange>.Instance.DamageBase.Value / 100f + ItemBase<KayaAndSange>.Instance.DamagePerStack.Value / 100f * (float)(count - 1),
						ItemBase<KayaAndSange>.Instance.MaximumHealthBase.Value + ItemBase<KayaAndSange>.Instance.MaximumHealthPerStack.Value * (float)(count - 1),
						ItemBase<KayaAndSange>.Instance.BaseHealthRegenerationBase.Value + ItemBase<KayaAndSange>.Instance.BaseHealthRegenerationPerStack.Value * (float)(count - 1)
					}
				}, ItemBase<KayaAndSange>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<SangeAndYasha>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Bonus Health: " },
					valueTypes = { (ValueType)3 },
					measurementUnits = { (MeasurementUnits)2 },
					descriptions = { "Healing: " },
					valueTypes = { (ValueType)0 },
					measurementUnits = { (MeasurementUnits)3 },
					descriptions = { "Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(4)
					{
						ItemBase<SangeAndYasha>.Instance.MaximumHealthBase.Value + ItemBase<SangeAndYasha>.Instance.MaximumHealthPerStack.Value * (float)(count - 1),
						ItemBase<SangeAndYasha>.Instance.BaseHealthRegenerationBase.Value + ItemBase<SangeAndYasha>.Instance.BaseHealthRegenerationPerStack.Value * (float)(count - 1),
						ItemBase<SangeAndYasha>.Instance.AttackSpeedBase.Value / 100f + ItemBase<SangeAndYasha>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1),
						ItemBase<SangeAndYasha>.Instance.MovementSpeedBase.Value / 100f + ItemBase<SangeAndYasha>.Instance.MovementSpeedPerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<SangeAndYasha>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<YashaAndKaya>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Cooldown Reduction: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(4)
					{
						Utils.GetExponentialStacking(ItemBase<YashaAndKaya>.Instance.SkillCooldownReductionBase.Value / 100f, ItemBase<YashaAndKaya>.Instance.SkillCooldownReductionPerStack.Value / 100f, count),
						ItemBase<YashaAndKaya>.Instance.AttackSpeedBase.Value / 100f + ItemBase<YashaAndKaya>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1),
						ItemBase<YashaAndKaya>.Instance.MovementSpeedBase.Value / 100f + ItemBase<YashaAndKaya>.Instance.MovementSpeedPerStack.Value / 100f * (float)(count - 1),
						ItemBase<YashaAndKaya>.Instance.DamageBase.Value / 100f + ItemBase<YashaAndKaya>.Instance.DamagePerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<YashaAndKaya>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<Trident>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Cooldown Reduction: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Damage: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Bonus Health: " },
					valueTypes = { (ValueType)3 },
					measurementUnits = { (MeasurementUnits)2 },
					descriptions = { "Healing: " },
					valueTypes = { (ValueType)0 },
					measurementUnits = { (MeasurementUnits)3 },
					descriptions = { "Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					descriptions = { "Movement Speed: " },
					valueTypes = { (ValueType)2 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(6)
					{
						Utils.GetExponentialStacking(ItemBase<Trident>.Instance.SkillCooldownReductionBase.Value / 100f, ItemBase<Trident>.Instance.SkillCooldownReductionPerStack.Value / 100f, count),
						ItemBase<Trident>.Instance.DamageBase.Value / 100f + ItemBase<Trident>.Instance.DamagePerStack.Value / 100f * (float)(count - 1),
						ItemBase<Trident>.Instance.MaximumHealthBase.Value + ItemBase<Trident>.Instance.MaximumHealthPerStack.Value * (float)(count - 1),
						ItemBase<Trident>.Instance.BaseHealthRegenerationBase.Value + ItemBase<Trident>.Instance.BaseHealthRegenerationPerStack.Value * (float)(count - 1),
						ItemBase<Trident>.Instance.AttackSpeedBase.Value / 100f + ItemBase<Trident>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1),
						ItemBase<Trident>.Instance.MovementSpeedBase.Value / 100f + ItemBase<Trident>.Instance.MovementSpeedPerStack.Value / 100f * (float)(count - 1)
					}
				}, ItemBase<Trident>.GetItemDef().itemIndex);
			}
			if (Plugin.ItemsEnabled[ItemBase<ConsumedMoonShard>.Instance])
			{
				ItemDefinitions.RegisterItemStatsDef(new ItemStatsDef
				{
					descriptions = { "Attack Speed: " },
					valueTypes = { (ValueType)1 },
					measurementUnits = { (MeasurementUnits)1 },
					calculateValuesNew = (float luck, int count, float proc) => new List<float>(1) { ItemBase<ConsumedMoonShard>.Instance.AttackSpeedBase.Value / 100f + ItemBase<ConsumedMoonShard>.Instance.AttackSpeedPerStack.Value / 100f * (float)(count - 1) }
				}, ItemBase<ConsumedMoonShard>.GetItemDef().itemIndex);
			}
		}
	}
	internal static class Log
	{
		private static ManualLogSource _logSource;

		internal static void Init(ManualLogSource logSource)
		{
			_logSource = logSource;
		}

		internal static void Debug(object data)
		{
			_logSource.LogDebug(data);
		}

		internal static void Error(object data)
		{
			_logSource.LogError(data);
		}

		internal static void Fatal(object data)
		{
			_logSource.LogFatal(data);
		}

		internal static void Info(object data)
		{
			_logSource.LogInfo(data);
		}

		internal static void Message(object data)
		{
			_logSource.LogMessage(data);
		}

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
	public class RecipeManager
	{
		public class ItemRecipe
		{
			public Dictionary<ItemDef, int> inputs { get; set; }

			public KeyValuePair<ItemDef, int> output { get; set; }
		}

		public class EquipmentRecipe
		{
			public EquipmentDef input_1 { get; set; }

			public EquipmentDef input_2 { get; set; }

			public EquipmentDef output { get; set; }
		}

		public class MixedRecipe
		{
			public Dictionary<ItemDef, int> items { get; set; }

			public EquipmentDef equipment { get; set; }

			public EquipmentDef output { get; set; }
		}

		private class RecipeBehavior : MonoBehaviour
		{
			private CharacterBody body;

			private void Awake()
			{
				body = ((Component)this).GetComponent<CharacterBody>();
			}

			private void FixedUpdate()
			{
				//IL_014e: 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_025f: Unknown result type (might be due to invalid IL or missing references)
				//IL_026b: Unknown result type (might be due to invalid IL or missing references)
				//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
				//IL_0303: Unknown result type (might be due to invalid IL or missing references)
				//IL_0320: Unknown result type (might be due to invalid IL or missing references)
				//IL_0330: Unknown result type (might be due to invalid IL or missing references)
				//IL_0335: Unknown result type (might be due to invalid IL or missing references)
				if (!NetworkServer.active || !Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory))
				{
					return;
				}
				foreach (ItemRecipe item_recipe in item_recipes)
				{
					bool flag = false;
					int num = int.MaxValue;
					foreach (ItemDef key in item_recipe.inputs.Keys)
					{
						int itemCountPermanent = body.inventory.GetItemCountPermanent(key);
						if (itemCountPermanent < item_recipe.inputs[key])
						{
							flag = true;
							break;
						}
						num = Math.Min(num, itemCountPermanent / item_recipe.inputs[key]);
					}
					if (flag)
					{
						continue;
					}
					Log.Debug($"Creating {num * item_recipe.output.Value} {item_recipe.output.Key.nameToken}.");
					foreach (KeyValuePair<ItemDef, int> input in item_recipe.inputs)
					{
						body.inventory.RemoveItemPermanent(input.Key, num * input.Value);
						CharacterMasterNotificationQueue.PushItemTransformNotification(body.master, input.Key.itemIndex, item_recipe.output.Key.itemIndex, (TransformationType)0);
					}
					body.inventory.GiveItemPermanent(item_recipe.output.Key, num * item_recipe.output.Value);
				}
				foreach (MixedRecipe mixed_recipe in mixed_recipes)
				{
					bool flag2 = false;
					foreach (ItemDef key2 in mixed_recipe.items.Keys)
					{
						if (body.inventory.GetItemCountPermanent(key2) < mixed_recipe.items[key2])
						{
							flag2 = true;
							break;
						}
					}
					if (flag2 || body.inventory.currentEquipmentIndex != mixed_recipe.equipment.equipmentIndex)
					{
						continue;
					}
					Log.Debug("Creating " + mixed_recipe.output.nameToken + ".");
					foreach (KeyValuePair<ItemDef, int> item in mixed_recipe.items)
					{
						body.inventory.RemoveItemPermanent(item.Key, item.Value);
					}
					CharacterMasterNotificationQueue.PushEquipmentTransformNotification(body.master, mixed_recipe.equipment.equipmentIndex, mixed_recipe.output.equipmentIndex, (TransformationType)0);
					Inventory inventory = body.inventory;
					EquipmentIndex equipmentIndex = mixed_recipe.output.equipmentIndex;
					EquipmentLocation activeEquipmentLocation = body.inventory.activeEquipmentLocation;
					inventory.SetEquipmentIndex(equipmentIndex, ref activeEquipmentLocation);
				}
			}
		}

		[CompilerGenerated]
		private static class <>O
		{
			public static Action<CharacterBody> <0>__OnInventoryChanged;

			public static hook_AttemptGrant <1>__OnAttemptGrant;

			public static Action <2>__InitNewRest;
		}

		public static List<ItemRecipe> item_recipes = new List<ItemRecipe>();

		public static List<ItemDef> itemsToWatchFor = new List<ItemDef>();

		public static List<EquipmentRecipe> equipment_recipes = new List<EquipmentRecipe>();

		public static List<MixedRecipe> mixed_recipes = new List<MixedRecipe>();

		public static void Add(MixedRecipe recipe)
		{
			mixed_recipes.Add(recipe);
		}

		public static void Add(ItemDef[] items, EquipmentDef equipment, EquipmentDef output)
		{
			mixed_recipes.Add(new MixedRecipe
			{
				items = items.Distinct().ToDictionary((ItemDef x) => x, (ItemDef y) => 1),
				equipment = equipment,
				output = output
			});
		}

		public static void Add(EquipmentRecipe recipe)
		{
			equipment_recipes.Add(recipe);
		}

		public static void Add(EquipmentDef input_1, EquipmentDef input_2, EquipmentDef output)
		{
			equipment_recipes.Add(new EquipmentRecipe
			{
				input_1 = input_1,
				input_2 = input_2,
				output = output
			});
		}

		public static void Add(ItemRecipe recipe)
		{
			item_recipes.Add(recipe);
		}

		public static void Add(ItemDef[] inputs, ItemDef output)
		{
			item_recipes.Add(new ItemRecipe
			{
				inputs = inputs.Distinct().ToDictionary((ItemDef x) => x, (ItemDef y) => 1),
				output = KeyValuePair.Create<ItemDef, int>(output, 1)
			});
		}

		public static void AddCraftable(Object first, Object second, Object output, string name, int count = 1)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//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_0046: Expected O, but got Unknown
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Expected O, but got Unknown
			Log.Debug("Adding recipe " + name + ".");
			CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>();
			((Object)val).name = name;
			Recipe val2 = new Recipe();
			val2.amountToDrop = count;
			val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2]
			{
				new RecipeIngredient
				{
					pickup = first
				},
				new RecipeIngredient
				{
					pickup = second
				}
			};
			Recipe val3 = val2;
			val.recipes = (Recipe[])(object)new Recipe[1] { val3 };
			val.pickup = output;
			Content.craftables.Add(val);
		}

		public static void AddBlankCraftable(string name)
		{
			Log.Debug("Adding blank recipe " + name + ".");
			CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>();
			((Object)val).name = name;
			Content.craftables.Add(val);
		}

		public static void FinishCraftable(int index, Object first, Object second, Object output, int count = 1)
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//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_007b: Expected O, but got Unknown
			if (index >= Content.craftables.Count)
			{
				Log.Error($"Failed to finish recipe at index {index}.");
				return;
			}
			Log.Debug($"Finishing recipe at index {index} ({((Object)Content.craftables[index]).name}).");
			Recipe val = new Recipe();
			val.amountToDrop = count;
			val.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2]
			{
				new RecipeIngredient
				{
					pickup = first
				},
				new RecipeIngredient
				{
					pickup = second
				}
			};
			Recipe val2 = val;
			Content.craftables[index].recipes = (Recipe[])(object)new Recipe[1] { val2 };
			Content.craftables[index].pickup = output;
		}

		public static void InitNew()
		{
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Expected O, but got Unknown
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Expected O, but got Unknown
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Expected O, but got Unknown
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Expected O, but got Unknown
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Expected O, but got Unknown
			//IL_01f9: 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_020a: Expected O, but got Unknown
			//IL_020c: 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_021d: Expected O, but got Unknown
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Expected O, but got Unknown
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Expected O, but got Unknown
			//IL_0275: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Expected O, but got Unknown
			if (Plugin.ItemsEnabled[ItemBase<OrbOfVenom>.Instance] && Plugin.ItemsEnabled[ItemBase<OrbOfFrost>.Instance] && Plugin.ItemsEnabled[ItemBase<OrbOfBlight>.Instance] && Plugin.ItemsEnabled[ItemBase<OrbOfCorrosion>.Instance])
			{
				Add((ItemDef[])(object)new ItemDef[3]
				{
					ItemBase<OrbOfVenom>.GetItemDef(),
					ItemBase<OrbOfBlight>.GetItemDef(),
					ItemBase<OrbOfFrost>.GetItemDef()
				}, ItemBase<OrbOfCorrosion>.GetItemDef());
				itemsToWatchFor.AddRange(new <>z__ReadOnlyArray<ItemDef>((ItemDef[])(object)new ItemDef[3]
				{
					ItemBase<OrbOfFrost>.GetItemDef(),
					ItemBase<OrbOfBlight>.GetItemDef(),
					ItemBase<OrbOfVenom>.GetItemDef()
				}));
			}
			if (Plugin.EquipmentEnabled[EquipmentBase<ArcaneBoots>.Instance] && Plugin.EquipmentEnabled[EquipmentBase<Mekansm>.Instance] && Plugin.EquipmentEnabled[EquipmentBase<GuardianGreaves>.Instance])
			{
				Add(EquipmentBase<ArcaneBoots>.GetEquipmentDef(), EquipmentBase<Mekansm>.GetEquipmentDef(), EquipmentBase<GuardianGreaves>.GetEquipmentDef());
			}
			CharacterBody.onBodyInventoryChangedGlobal += OnInventoryChanged;
			object obj = <>O.<1>__OnAttemptGrant;
			if (obj == null)
			{
				hook_AttemptGrant val = OnAttemptGrant;
				<>O.<1>__OnAttemptGrant = val;
				obj = (object)val;
			}
			EquipmentDef.AttemptGrant += (hook_AttemptGrant)obj;
			if (Plugin.ItemsEnabled[ItemBase<Trident>.Instance])
			{
				CraftableDef val2 = ScriptableObject.CreateInstance<CraftableDef>();
				((Object)val2).name = "Trident";
				val2.pickup = (Object)(object)ItemBase<Trident>.GetItemDef();
				Recipe[] array = (Recipe[])(object)new Recipe[3];
				if (Plugin.ItemsEnabled[ItemBase<Kaya>.Instance] && Plugin.ItemsEnabled[ItemBase<SangeAndYasha>.Instance])
				{
					Recipe val3 = new Recipe();
					val3.amountToDrop = 1;
					val3.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2]
					{
						new RecipeIngredient
						{
							pickup = (Object)(object)ItemBase<Kaya>.GetItemDef()
						},
						new RecipeIngredient
						{
							pickup = (Object)(object)ItemBase<SangeAndYasha>.GetItemDef()
						}
					};
					Recipe val4 = val3;
					array[0] = val4;
				}
				if (Plugin.ItemsEnabled[ItemBase<Sange>.Instance] && Plugin.ItemsEnabled[ItemBase<YashaAndKaya>.Instance])
				{
					Recipe val3 = new Recipe();
					val3.amountToDrop = 1;
					val3.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2]
					{
						new RecipeIngredient
						{
							pickup = (Object)(object)ItemBase<Sange>.GetItemDef()
						},
						new RecipeIngredient
						{
							pickup = (Object)(object)ItemBase<YashaAndKaya>.GetItemDef()
						}
					};
					Recipe val5 = val3;
					array[1] = val5;
				}
				if (Plugin.ItemsEnabled[ItemBase<Yasha>.Instance] && Plugin.ItemsEnabled[ItemBase<KayaAndSange>.Instance])
				{
					Recipe val3 = new Recipe();
					val3.amountToDrop = 1;
					val3.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2]
					{
						new RecipeIngredient
						{
							pickup = (Object)(object)ItemBase<Yasha>.GetItemDef()
						},
						new RecipeIngredient
						{
							pickup = (Object)(object)ItemBase<KayaAndSange>.GetItemDef()
						}
					};
					Recipe val6 = val3;
					array[2] = val6;
				}
				val2.recipes = array;
				Content.craftables.Add(val2);
			}
			if (Plugin.ItemsEnabled[ItemBase<Yasha>.Instance] && Plugin.ItemsEnabled[ItemBase<Kaya>.Instance])
			{
				AddCraftable((Object)(object)ItemBase<Yasha>.GetItemDef(), (Object)(object)ItemBase<Kaya>.GetItemDef(), (Object)(object)ItemBase<YashaAndKaya>.GetItemDef(), "Yasha and Kaya");
			}
			if (Plugin.ItemsEnabled[ItemBase<Kaya>.Instance] && Plugin.ItemsEnabled[ItemBase<Sange>.Instance])
			{
				AddCraftable((Object)(object)ItemBase<Kaya>.GetItemDef(), (Object)(object)ItemBase<Sange>.GetItemDef(), (Object)(object)ItemBase<KayaAndSange>.GetItemDef(), "Kaya and Sange");
			}
			if (Plugin.ItemsEnabled[ItemBase<Sange>.Instance] && Plugin.ItemsEnabled[ItemBase<Yasha>.Instance])
			{
				AddCraftable((Object)(object)ItemBase<Sange>.GetItemDef(), (Object)(object)ItemBase<Yasha>.GetItemDef(), (Object)(object)ItemBase<SangeAndYasha>.GetItemDef(), "Sange and Yasha");
			}
			if (Plugin.ItemsEnabled[ItemBase<BootsOfSpeed>.Instance] && Plugin.ItemsEnabled[ItemBase<TranquilBoots>.Instance])
			{
				AddBlankCraftable("BootsOfSpeed and HealWhileSafe");
			}
			if (Plugin.ItemsEnabled[ItemBase<BladesOfAttack>.Instance] && Plugin.ItemsEnabled[ItemBase<PhaseBoots>.Instance])
			{
				AddBlankCraftable("BladesOfAttack and SprintBonus");
			}
			if (Plugin.ItemsEnabled[ItemBase<PowerTreads>.Instance])
			{
				AddBlankCraftable("Hoof and Syringe");
			}
			if (Plugin.ItemsEnabled[ItemBase<TranquilBoots>.Instance] && Plugin.EquipmentEnabled[EquipmentBase<BootsOfBearing>.Instance])
			{
				AddBlankCraftable("TranquilBoots and TeamWarCry");
			}
			if (Plugin.ItemsEnabled[ItemBase<PhaseBoots>.Instance] && Plugin.ItemsEnabled[ItemBase<BootsOfTravel>.Instance])
			{
				AddBlankCraftable("PhaseBoots and JumpDamageStrike");
			}
			if (Plugin.ItemsEnabled[ItemBase<BootsOfSpeed>.Instance] && Plugin.EquipmentEnabled[EquipmentBase<ArcaneBoots>.Instance])
			{
				AddBlankCraftable("BootsOfSpeed and EquipmentMagazine");
			}
			if (Plugin.EquipmentEnabled[EquipmentBase<Mekansm>.Instance])
			{
				AddBlankCraftable("TPHealingNova and SprintArmor");
			}
			if (Plugin.EquipmentEnabled[EquipmentBase<Bottle>.Instance])
			{
				AddBlankCraftable("EquipmentMagazine and HealingPotion");
			}
			if (Plugin.ItemsEnabled[ItemBase<EnchantedMango>.Instance])
			{
				AddBlankCraftable("ScrapWhite and EnchantedMango");
				AddBlankCraftable("FlatHealth and EnchantedMango");
			}
			if (Plugin.ItemsEnabled[ItemBase<HealingSalve>.Instance])
			{
				AddBlankCraftable("ScrapWhite and HealingSalve");
				AddBlankCraftable("HealingPotionConsumed and HealingSalve");
				AddBlankCraftable("FlatHealth and HealingSalve");
			}
			if (Plugin.ItemsEnabled[ItemBase<DragonScale>.Instance])
			{
				AddBlankCraftable("DragonScale and Infusion");
				AddBlankCraftable("DragonScale and IceRing");
			}
			if (Plugin.ItemsEnabled[ItemBase<HeartOfTarrasque>.Instance])
			{
				AddBlankCraftable("ScrapWhite and HeartOfTarrasque");
			}
			if (Plugin.ItemsEnabled[ItemBase<Daedalus>.Instance])
			{
				AddBlankCraftable("ScrapWhite and Daedalus");
			}
			if (Plugin.ItemsEnabled[ItemBase<UnwaveringCondition>.Instance] && Plugin.ItemsEnabled[ItemBase<Cloak>.Instance])
			{
				AddBlankCraftable("ScrapWhite and UnwaveringCondition");
			}
			if (Plugin.ItemsEnabled[ItemBase<BootsOfTravel>.Instance] && Plugin.ItemsEnabled[ItemBase<BootsOfSpeed>.Instance])
			{
				AddBlankCraftable("ScrapWhite and BootsOfTravel");
			}
			if (Plugin.ItemsEnabled[ItemBase<AeonDisk>.Instance])
			{
				AddBlankCraftable("SprintArmor and TeleportOnLowHealth");
			}
			if (Plugin.ItemsEnabled[ItemBase<Radiance>.Instance])
			{
				AddBlankCraftable("Thorns and StrengthenBurn");
			}
			if (Plugin.ItemsEnabled[ItemBase<DragonScale>.Instance] && Plugin.ItemsEnabled[ItemBase<Radiance>.Instance])
			{
				AddBlankCraftable("ScrapWhite and Radiance");
			}
			if (Plugin.ItemsEnabled[ItemBase<SkullBasher>.Instance])
			{
				AddBlankCraftable("StunChanceOnHit and IceRing");
			}
			if (Plugin.ItemsEnabled[ItemBase<OrbOfFrost>.Instance])
			{
				AddBlankCraftable("OrbOfFrost and FireRing");
			}
			if (Plugin.ItemsEnabled[ItemBase<IronBranch>.Instance])
			{
				AddBlankCraftable("IronBranch and Mushroom");
			}
			if (Plugin.ItemsEnabled[ItemBase<Cloak>.Instance])
			{
				AddBlankCraftable("Cloak and BarrierOnOverHeal");
			}
			if (Plugin.ItemsEnabled[ItemBase<QuellingBlade>.Instance] && Plugin.ItemsEnabled[ItemBase<IronTalon>.Instance])
			{
				AddBlankCraftable("Crowbar and QuellingBlade");
			}
			new Content().Initialize();
			((ResourceAvailability)(ref PickupCatalog.availability)).CallWhenAvailable((Action)InitNewRest);
		}

		public static void InitNewRest()
		{
			if (Plugin.EquipmentEnabled[EquipmentBase<GhostScepter>.Instance])
			{
				Add(EquipmentBase<GhostScepter>.GetEquipmentDef(), Equipment.BossHunterConsumed, Equipment.BossHunter);
			}
			if (Plugin.ItemsEnabled[ItemBase<BootsOfSpeed>.Instance] && Plugin.ItemsEnabled[ItemBase<TranquilBoots>.Instance])
			{
				FinishCraftable(4, (Object)(object)ItemBase<BootsOfSpeed>.GetItemDef(), (Object)(object)Items.HealWhileSafe, (Object)(object)ItemBase<TranquilBoots>.GetItemDef());
			}
			if (Plugin.ItemsEnabled[ItemBase<BladesOfAttack>.Instance] && Plugin.ItemsEnabled[ItemBase<PhaseBoots>.Instance])
			{
				FinishCraftable(5, (Object)(object)ItemBase<BladesOfAttack>.GetItemDef(), (Object)(object)Items.SprintBonus, (Object)(object)ItemBase<PhaseBoots>.GetItemDef());
			}
			if (Plugin.ItemsEnabled[ItemBase<PowerTreads>.Instance])
			{
				FinishCraftable(6, (Object)(object)Items.Hoof, (Object)(object)Items.Syringe, (Object)(object)ItemBase<PowerTreads>.GetItemDef());
			}
			if (Plugin.ItemsEnabled[ItemBase<TranquilBoots>.Instance] && Plugin.EquipmentEnabled[EquipmentBase<BootsOfBearing>.Instance])
			{
				FinishCraftable(7, (Object)(object)ItemBase<TranquilBoots>.GetItemDef(), (Object)(object)Equipment.TeamWarCry, (Object)(object)EquipmentBase<BootsOfBearing>.GetEquipmentDef());
			}
			if (Plugin.ItemsEnabled[ItemBase<PhaseBoots>.Instance] && Plugin.ItemsEnabled[ItemBase<BootsOfTravel>.Instance])
			{
				FinishCraftable(8, (Object)(object)ItemBase<PhaseBoots>.GetItemDef(), (Object)(object)Items.JumpDamageStrike, (Object)(object)ItemBase<BootsOfTravel>.GetItemDef());
			}
			if (Plugin.ItemsEnabled[ItemBase<BootsOfSpeed>.Instance] && Plugin.EquipmentEnabled[EquipmentBase<ArcaneBoots>.Instance])
			{
				FinishCraftable(9, (Object)(object)ItemBase<BootsOfSpeed>.GetItemDef(), (Object)(object)Items.EquipmentMagazine, (Object)(object)EquipmentBase<ArcaneBoots>.GetEquipmentDef());
			}
			if (Plugin.EquipmentEnabled[EquipmentBase<Mekansm>.Instance])
			{
				FinishCraftable(10, (Object)(object)Items.TPHealingNova, (Object)(object)Items.SprintArmor, (Object)(object)EquipmentBase<Mekansm>.GetEquipmentDef());
			}
			if (Plugin.EquipmentEnabled[EquipmentBase<Bottle>.Instance])
			{
				FinishCraftable(11, (Object)(object)Items.HealingPotion, (Object)(object)Items.EquipmentMagazine, (Object)(object)EquipmentBase<Bottle>.GetEquipmentDef());
			}
			if (Plugin.ItemsEnabled[ItemBase<EnchantedMango>.Instance])
			{
				FinishCraftable(12, (Object)(object)Items.ScrapWhite, (Object)(object)ItemBase<EnchantedMango>.GetItemDef(), (Object)(object)Items.BonusHealthBoost);
				FinishCraftable(13, (Object)(object)Items.FlatHealth, (Object)(object)ItemBase<EnchantedMango>.GetItemDef(), (Object)(object)Items.CookedSteak);
			}
			if (Plugin.ItemsEnabled[ItemBase<HealingSalve>.Instance])
			{
				FinishCraftable(14, (Object)(object)Items.ScrapWhite, (Object)(object)ItemBase<HealingSalve>.GetItemDef(), (Object)(object)Items.BonusHealthBoost);
				FinishCraftable(15, (Object)(object)Items.HealingPotionConsumed, (Object)(object)ItemBase<HealingSalve>.GetItemDef(), (Object)(object)Items.HealingPotion);
				FinishCraftable(16, (Object)(object)Items.FlatHealth, (Object)(object)ItemBase<HealingSalve>.GetItemDef(), (Object)(object)Items.CookedSteak);
			}
			if (Plugin.ItemsEnabled[ItemBase<DragonScale>.Instance])
			{
				FinishCraftable(17, (Object)(object)ItemBase<DragonScale>.GetItemDef(), (Object)(object)Items.Infusion, (Object)(object)Items.StrengthenBurn);
				FinishCraftable(26, (Object)(object)ItemBase<DragonScale>.GetItemDef(), (Object)(object)Items.IceRing, (Object)(object)Items.FireRing);
			}
			if (Plugin.ItemsEnabled[ItemBase<HeartOfTarrasque>.Instance])
			{
				FinishCraftable(18, (Object)(object)Items.ScrapWhite, (Object)(object)ItemBase<HeartOfTarrasque>.GetItemDef(), (Object)(object)Items.FlatHealth, 4);
			}
			if (Plugin.ItemsEnabled[ItemBase<Daedalus>.Instance])
			{
				FinishCraftable(19, (Object)(object)Items.ScrapWhite, (Object)(object)ItemBase<Daedalus>.GetItemDef(), (Object)(object)Items.CritGlasses, 2);
			}
			if (Plugin.ItemsEnabled[ItemBase<UnwaveringCondition>.Instance] && Plugin.ItemsEnabled[ItemBase<Cloak>.Instance])
			{
				FinishCraftable(20, (Object)(object)Items.ScrapWhite, (Object)(object)ItemBase<UnwaveringCondition>.GetItemDef(), (Object)(object)ItemBase<Cloak>.GetItemDef(), 4);
			}
			if (Plugin.ItemsEnabled[ItemBase<BootsOfTravel>.Instance] && Plugin.ItemsEnabled[ItemBase<BootsOfSpeed>.Instance])
			{
				FinishCraftable(21, (Object)(object)Items.ScrapWhite, (Object)(object)ItemBase<BootsOfTravel>.GetItemDef(), (Object)(object)ItemBase<BootsOfSpeed>.GetItemDef(), 4);
			}
			if (Plugin.ItemsEnabled[ItemBase<AeonDisk>.Instance])
			{
				FinishCraftable(22, (Object)(object)Items.SprintArmor, (Object)(object)Items.TeleportOnLowHealth, (Object)(object)ItemBase<AeonDisk>.GetItemDef());
			}
			if (Plugin.ItemsEnabled[ItemBase<Radiance>.Instance])
			{
				FinishCraftable(23, (Object)(object)Items.Thorns, (Object)(object)Items.StrengthenBurn, (Object)(object)ItemBase<Radiance>.GetItemDef());
			}
			if (Plugin.ItemsEnabled[ItemBase<DragonScale>.Instance] && Plugin.ItemsEnabled[ItemBase<Radiance>.Instance])
			{
				FinishCraftable(24, (Object)(object)Items.ScrapWhite, (Object)(object)ItemBase<Radiance>.GetItemD