Decompiled source of RobItems v1.0.7

RobItems.dll

Decompiled a week 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 EntityStates;
using IL.RoR2;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.EntityStates;
using On.RoR2;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.ContentManagement;
using RoR2.ExpansionManagement;
using RoR2.Items;
using RoR2.Navigation;
using RoR2.Projectile;
using RobItems.Components;
using RobItems.Content;
using RobItems.Modules;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("RobItems")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RobItems")]
[assembly: AssemblyTitle("RobItems")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace RobItems
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.rob.RobItems", "RobItems", "1.0.7")]
	[R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "DirectorAPI", "LoadoutAPI", "UnlockableAPI", "NetworkingAPI", "RecalculateStatsAPI" })]
	public class Plugin : BaseUnityPlugin
	{
		public const string MODUID = "com.rob.RobItems";

		public List<ItemBase> Items = new List<ItemBase>();

		public static HashSet<ItemDef> BlacklistedFromPrinter = new HashSet<ItemDef>();

		public static ExpansionDef RobItemsExpansionDef = ScriptableObject.CreateInstance<ExpansionDef>();

		public static Dictionary<ItemBase, bool> ItemStatusDictionary = new Dictionary<ItemBase, bool>();

		public static bool rooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");

		private void Awake()
		{
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Expected O, but got Unknown
			Config.myConfig = ((BaseUnityPlugin)this).Config;
			Assets.PopulateAssets();
			Config.Init();
			IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes()
				where !type.IsAbstract && type.IsSubclassOf(typeof(ItemBase))
				select type;
			foreach (Type item in enumerable)
			{
				ItemBase itemBase = (ItemBase)Activator.CreateInstance(item);
				if (ValidateItem(itemBase, Items))
				{
					itemBase.Init(((BaseUnityPlugin)this).Config);
				}
			}
			ShopTerminalBehavior.GenerateNewPickupServer_bool += new Manipulator(ItemBase.BlacklistFromPrinter);
		}

		public bool ValidateItem(ItemBase item, List<ItemBase> itemList)
		{
			bool value = Config.ItemEnableConfig("Item: " + item.ItemInternalName).Value;
			bool value2 = Config.BindAndOptions("Item: " + item.ItemInternalName, "Blacklist Item from AI Use?", defaultValue: false, "Should the AI not be able to obtain this item?").Value;
			bool value3 = Config.BindAndOptions("Item: " + item.ItemInternalName, "Blacklist Item from Printers?", defaultValue: false, "Should the printers be able to print this item?").Value;
			ItemStatusDictionary.Add(item, value);
			if (value)
			{
				itemList.Add(item);
				if (value2)
				{
					item.AIBlacklisted = true;
				}
				if (value3)
				{
					item.PrinterBlacklisted = true;
				}
			}
			return value;
		}

		public void GenerateExpansionDef()
		{
			LanguageAPI.Add("ROBITEMS_EXPANSION_DEF_NAME", "RobItems");
			LanguageAPI.Add("ROBITEMS_EXPANSION_DEF_DESCRIPTION", "A whole world of weird items, equipment, elites, and interactables await you.");
			RobItemsExpansionDef.descriptionToken = "ROBITEMS_EXPANSION_DEF_DESCRIPTION";
			RobItemsExpansionDef.nameToken = "ROBITEMS_EXPANSION_DEF_NAME";
			RobItemsExpansionDef.iconSprite = null;
			RobItemsExpansionDef.disabledIconSprite = null;
			ContentAddition.AddExpansionDef(RobItemsExpansionDef);
		}
	}
}
namespace RobItems.Modules
{
	internal static class Assets
	{
		internal static AssetBundle mainAssetBundle;

		internal static Shader hotpoo = Resources.Load<Shader>("Shaders/Deferred/HGStandard");

		internal static Material commandoMat;

		internal static void PopulateAssets()
		{
			if ((Object)(object)mainAssetBundle == (Object)null)
			{
				using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("RobItems.robitems");
				mainAssetBundle = AssetBundle.LoadFromStream(stream);
			}
			using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("RobItems.RobItemsBank.bnk");
			byte[] array = new byte[stream2.Length];
			stream2.Read(array, 0, array.Length);
			SoundBanks.Add(array);
		}

		internal static NetworkSoundEventDef CreateNetworkSoundEventDef(string eventName)
		{
			NetworkSoundEventDef val = ScriptableObject.CreateInstance<NetworkSoundEventDef>();
			val.akId = AkSoundEngine.GetIDFromString(eventName);
			val.eventName = eventName;
			ContentAddition.AddNetworkSoundEventDef(val);
			return val;
		}

		internal static void ConvertAllRenderersToHopooShader(GameObject objectToConvert)
		{
			Renderer[] componentsInChildren = objectToConvert.GetComponentsInChildren<Renderer>();
			foreach (Renderer val in componentsInChildren)
			{
				if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.material) && !Object.op_Implicit((Object)(object)((Component)val).GetComponent<LineRenderer>()))
				{
					Texture val2 = null;
					if (val.material.HasProperty("_BumpMap"))
					{
						val2 = val.material.GetTexture("_BumpMap");
					}
					val.material.shader = hotpoo;
					if ((Object)(object)val2 != (Object)null)
					{
						val.material.SetTexture("_NormalTex", val2);
						val.material.SetFloat("_NormalStrength", 1f);
					}
				}
			}
		}

		internal static RendererInfo[] SetupRendererInfos(GameObject obj)
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>();
			RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length];
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				array[i] = new RendererInfo
				{
					defaultMaterial = ((Renderer)componentsInChildren[i]).material,
					renderer = (Renderer)(object)componentsInChildren[i],
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				};
			}
			return array;
		}

		public static GameObject LoadSurvivorModel(string modelName)
		{
			GameObject val = mainAssetBundle.LoadAsset<GameObject>(modelName);
			if ((Object)(object)val == (Object)null)
			{
				return null;
			}
			return PrefabAPI.InstantiateClone(val, ((Object)val).name, false);
		}

		internal static Texture LoadCharacterIcon(string characterName)
		{
			return mainAssetBundle.LoadAsset<Texture>("tex" + characterName + "Icon");
		}

		internal static GameObject LoadCrosshair(string crosshairName)
		{
			return Resources.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair");
		}

		private static GameObject LoadEffect(string resourceName)
		{
			return LoadEffect(resourceName, "", parentToTransform: false);
		}

		private static GameObject LoadEffect(string resourceName, string soundName)
		{
			return LoadEffect(resourceName, soundName, parentToTransform: false);
		}

		private static GameObject LoadEffect(string resourceName, bool parentToTransform)
		{
			return LoadEffect(resourceName, "", parentToTransform);
		}

		private static GameObject LoadEffect(string resourceName, string soundName, bool parentToTransform)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = mainAssetBundle.LoadAsset<GameObject>(resourceName);
			val.AddComponent<DestroyOnTimer>().duration = 12f;
			val.AddComponent<NetworkIdentity>();
			val.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2;
			EffectComponent val2 = val.AddComponent<EffectComponent>();
			val2.applyScale = false;
			val2.effectIndex = (EffectIndex)(-1);
			val2.parentToReferencedTransform = parentToTransform;
			val2.positionAtReferencedTransform = true;
			val2.soundName = soundName;
			AddNewEffectDef(val, soundName);
			return val;
		}

		internal static void AddNewEffectDef(GameObject effectPrefab)
		{
			AddNewEffectDef(effectPrefab, "");
		}

		internal static void AddNewEffectDef(GameObject effectPrefab, string soundName)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			EffectDef val = new EffectDef();
			val.prefab = effectPrefab;
			val.prefabEffectComponent = effectPrefab.GetComponent<EffectComponent>();
			val.prefabName = ((Object)effectPrefab).name;
			val.prefabVfxAttributes = effectPrefab.GetComponent<VFXAttributes>();
			val.spawnSoundEventName = soundName;
			ContentAddition.AddEffect(effectPrefab);
		}

		public static Material CreateMaterial(string materialName, float emission, Color emissionColor, float normalStrength)
		{
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)commandoMat))
			{
				commandoMat = Resources.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponentInChildren<CharacterModel>().baseRendererInfos[0].defaultMaterial;
			}
			Material val = Object.Instantiate<Material>(commandoMat);
			Material val2 = mainAssetBundle.LoadAsset<Material>(materialName);
			if (!Object.op_Implicit((Object)(object)val2))
			{
				return commandoMat;
			}
			((Object)val).name = materialName;
			val.SetColor("_Color", val2.GetColor("_Color"));
			val.SetTexture("_MainTex", val2.GetTexture("_MainTex"));
			val.SetColor("_EmColor", emissionColor);
			val.SetFloat("_EmPower", emission);
			val.SetTexture("_EmTex", val2.GetTexture("_EmissionMap"));
			val.SetFloat("_NormalStrength", normalStrength);
			return val;
		}

		public static Material CreateMaterial(string materialName)
		{
			return CreateMaterial(materialName, 0f);
		}

		public static Material CreateMaterial(string materialName, float emission)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return CreateMaterial(materialName, emission, Color.black);
		}

		public static Material CreateMaterial(string materialName, float emission, Color emissionColor)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			return CreateMaterial(materialName, emission, emissionColor, 0f);
		}
	}
	internal static class Buffs
	{
		internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff, bool isHidden = false)
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			BuffDef val = ScriptableObject.CreateInstance<BuffDef>();
			((Object)val).name = buffName;
			val.buffColor = buffColor;
			val.canStack = canStack;
			val.isDebuff = isDebuff;
			val.eliteDef = null;
			val.iconSprite = buffIcon;
			val.isHidden = isHidden;
			ContentAddition.AddBuffDef(val);
			return val;
		}
	}
	internal static class Config
	{
		public static ConfigFile myConfig;

		public static void Init()
		{
			InitROO(Assets.mainAssetBundle.LoadAsset<Sprite>("texChipIcon"), "sup.");
		}

		public static void InitROO(Sprite modSprite, string modDescription)
		{
			if (Plugin.rooInstalled)
			{
				_InitROO(modSprite, modDescription);
			}
		}

		public static void _InitROO(Sprite modSprite, string modDescription)
		{
			ModSettingsManager.SetModIcon(modSprite);
			ModSettingsManager.SetModDescription(modDescription);
		}

		public static ConfigEntry<T> BindAndOptions<T>(string section, string name, T defaultValue, string description = "", bool restartRequired = false)
		{
			if (string.IsNullOrEmpty(description))
			{
				description = name;
			}
			if (restartRequired)
			{
				description += " (restart required)";
			}
			ConfigEntry<T> val = myConfig.Bind<T>(section, name, defaultValue, description);
			if (Plugin.rooInstalled)
			{
				TryRegisterOption<T>(val, restartRequired);
			}
			return val;
		}

		public static ConfigEntry<float> BindAndOptionsSlider(string section, string name, float defaultValue, string description = "", float min = 0f, float max = 20f, bool restartRequired = false)
		{
			if (string.IsNullOrEmpty(description))
			{
				description = name;
			}
			description = description + " (Default: " + defaultValue + ")";
			if (restartRequired)
			{
				description += " (restart required)";
			}
			ConfigEntry<float> val = myConfig.Bind<float>(section, name, defaultValue, description);
			if (Plugin.rooInstalled)
			{
				TryRegisterOptionSlider(val, min, max, restartRequired);
			}
			return val;
		}

		public static ConfigEntry<int> BindAndOptionsSlider(string section, string name, int defaultValue, string description = "", int min = 0, int max = 20, bool restartRequired = false)
		{
			if (string.IsNullOrEmpty(description))
			{
				description = name;
			}
			description = description + " (Default: " + defaultValue + ")";
			if (restartRequired)
			{
				description += " (restart required)";
			}
			ConfigEntry<int> val = myConfig.Bind<int>(section, name, defaultValue, description);
			if (Plugin.rooInstalled)
			{
				TryRegisterOptionSlider(val, min, max, restartRequired);
			}
			return val;
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private static void TryRegisterOption<T>(ConfigEntry<T> entry, bool restartRequired)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Expected O, but got Unknown
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Expected O, but got Unknown
			if (entry is ConfigEntry<float>)
			{
				ModSettingsManager.AddOption((BaseOption)new SliderOption(entry as ConfigEntry<float>, new SliderConfig
				{
					min = 0f,
					max = 20f,
					formatString = "{0:0.00}",
					restartRequired = restartRequired
				}));
			}
			if (entry is ConfigEntry<int>)
			{
				ModSettingsManager.AddOption((BaseOption)new IntSliderOption(entry as ConfigEntry<int>, restartRequired));
			}
			if (entry is ConfigEntry<bool>)
			{
				ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(entry as ConfigEntry<bool>, restartRequired));
			}
			if (entry is ConfigEntry<KeyboardShortcut>)
			{
				ModSettingsManager.AddOption((BaseOption)new KeyBindOption(entry as ConfigEntry<KeyboardShortcut>, restartRequired));
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private static void TryRegisterOptionSlider(ConfigEntry<int> entry, int min, int max, bool restartRequired)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			ModSettingsManager.AddOption((BaseOption)new IntSliderOption(entry, new IntSliderConfig
			{
				min = min,
				max = max,
				formatString = "{0:0.00}",
				restartRequired = restartRequired
			}));
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private static void TryRegisterOptionSlider(ConfigEntry<float> entry, float min, float max, bool restartRequired)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			ModSettingsManager.AddOption((BaseOption)new SliderOption(entry, new SliderConfig
			{
				min = min,
				max = max,
				formatString = "{0:0.00}",
				restartRequired = restartRequired
			}));
		}

		internal static ConfigEntry<bool> ItemEnableConfig(string itemName)
		{
			return BindAndOptions(itemName, "Enabled", defaultValue: true, "Set to false to disable this item and all its functionality", restartRequired: true);
		}
	}
	internal class ContentPacks : IContentPackProvider
	{
		internal ContentPack contentPack = new ContentPack();

		public string identifier => "com.rob.RobItems";

		public void Initialize()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders);
		}

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

		public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args)
		{
			contentPack.identifier = identifier;
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args)
		{
			ContentPack.Copy(contentPack, args.output);
			args.ReportProgress(1f);
			yield break;
		}

		public IEnumerator FinalizeAsync(FinalizeAsyncArgs args)
		{
			args.ReportProgress(1f);
			yield break;
		}
	}
	internal class Utils
	{
		public static RendererInfo[] ItemDisplaySetup(GameObject obj, bool debugmode = false)
		{
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			Assets.ConvertAllRenderersToHopooShader(obj);
			List<Renderer> list = new List<Renderer>();
			MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>();
			if (componentsInChildren.Length != 0)
			{
				list.AddRange((IEnumerable<Renderer>)(object)componentsInChildren);
			}
			SkinnedMeshRenderer[] componentsInChildren2 = obj.GetComponentsInChildren<SkinnedMeshRenderer>();
			if (componentsInChildren2.Length != 0)
			{
				list.AddRange((IEnumerable<Renderer>)(object)componentsInChildren2);
			}
			RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[list.Count];
			for (int i = 0; i < list.Count; i++)
			{
				if (debugmode)
				{
					MaterialControllerComponents.HGControllerFinder hGControllerFinder = ((Component)list[i]).gameObject.AddComponent<MaterialControllerComponents.HGControllerFinder>();
					hGControllerFinder.Renderer = list[i];
				}
				array[i] = new RendererInfo
				{
					defaultMaterial = ((list[i] is SkinnedMeshRenderer) ? list[i].sharedMaterial : list[i].material),
					renderer = list[i],
					defaultShadowCastingMode = (ShadowCastingMode)1,
					ignoreOverlays = false
				};
			}
			return array;
		}

		public static string OrderManifestLoreFormatter(string deviceName, string estimatedDelivery, string sentTo, string trackingNumber, string devicePickupDesc, string shippingMethod, string orderDetails)
		{
			string[] value = new string[19]
			{
				"<align=left>Estimated Delivery:<indent=70%>Sent To:</indent></align>",
				"<align=left>" + estimatedDelivery + "<indent=70%>" + sentTo + "</indent></align>",
				"",
				"<indent=1%><style=cIsDamage><size=125%><u>  Shipping Details:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0</u></size></style></indent>",
				"",
				"<indent=2%>-Order: <style=cIsUtility>" + deviceName + "</style></indent>",
				"<indent=4%><style=cStack>Tracking Number:  " + trackingNumber + "</style></indent>",
				"",
				"<indent=2%>-Order Description: " + devicePickupDesc + "</indent>",
				"",
				"<indent=2%>-Shipping Method: <style=cIsHealth>" + shippingMethod + "</style></indent>",
				"",
				"",
				"",
				"<indent=2%>-Order Details: " + orderDetails + "</indent>",
				"",
				"",
				"",
				"<style=cStack>Delivery being brought to you by the brand new </style><style=cIsUtility>Orbital Drop-Crate System (TM)</style>. <style=cStack><u>No refunds.</u></style>"
			};
			return string.Join("\n", value);
		}

		public static void RefreshTimedBuffs(CharacterBody body, BuffDef buffDef, float duration)
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)body) || body.GetBuffCount(buffDef) <= 0)
			{
				return;
			}
			foreach (TimedBuff timedBuff in body.timedBuffs)
			{
				if (buffDef.buffIndex == timedBuff.buffIndex)
				{
					timedBuff.timer = duration;
				}
			}
		}

		public static void RefreshTimedBuffs(CharacterBody body, BuffDef buffDef, float taperStart, float taperDuration)
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)body) || body.GetBuffCount(buffDef) <= 0)
			{
				return;
			}
			int num = 0;
			foreach (TimedBuff timedBuff in body.timedBuffs)
			{
				if (buffDef.buffIndex == timedBuff.buffIndex)
				{
					timedBuff.timer = taperStart + (float)num * taperDuration;
					num++;
				}
			}
		}
	}
}
namespace RobItems.Content
{
	public class AwesomePie : ItemBase<AwesomePie>
	{
		public static GameObject ItemBodyModelPrefab;

		public static GameObject pieProjectile;

		public static GameObject pieProjectileImpactEffect;

		public override string ItemName => "Freshly-Baked Pie";

		public override string ItemInternalName => "AwesomePie";

		public override string ItemLangTokenName => "PIE";

		public override string ItemPickupDesc => "Chance to throw fresh pies on hit.";

		public override string ItemFullDescription => "On hit, 10% chance to throw a pie for 400% (+400% per stack) TOTAL damage.</style>";

		public override string ItemLore => "";

		public override ItemTier Tier => (ItemTier)1;

		public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 };

		public override string CorruptsItem => "";

		public override GameObject ItemModel => Assets.mainAssetBundle.LoadAsset<GameObject>("mdlPie");

		public override Sprite ItemIcon => Assets.mainAssetBundle.LoadAsset<Sprite>("texPieIcon");

		public override void Init(ConfigFile config)
		{
			CreateConfig(config);
			CreateLang();
			CreateItem();
			CreateProjectile();
			Hooks();
		}

		private void CreateProjectile()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: 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_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0289: Unknown result type (might be due to invalid IL or missing references)
			//IL_041b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b3: Unknown result type (might be due to invalid IL or missing references)
			pieProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoGrenadeProjectile.prefab").WaitForCompletion(), "RobPieProjectile", true);
			pieProjectile.AddComponent<RocketRotation>();
			pieProjectile.AddComponent<DelayedGravity>();
			ProjectileController component = pieProjectile.GetComponent<ProjectileController>();
			ProjectileDamage component2 = pieProjectile.GetComponent<ProjectileDamage>();
			ProjectileSimple component3 = pieProjectile.GetComponent<ProjectileSimple>();
			ProjectileImpactExplosion component4 = pieProjectile.GetComponent<ProjectileImpactExplosion>();
			((ProjectileExplosion)component4).blastRadius = 5f;
			pieProjectileImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Treebot/OmniExplosionVFXTreebotSeedPodMortar.prefab").WaitForCompletion(), "RobPieImpact", true);
			if (!Object.op_Implicit((Object)(object)pieProjectileImpactEffect.GetComponent<NetworkIdentity>()))
			{
				pieProjectileImpactEffect.AddComponent<NetworkIdentity>();
			}
			pieProjectileImpactEffect.GetComponent<EffectComponent>().soundName = "sfx_rob_pie_impact";
			Material val = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Loader/matOmniHitspark1Loader.mat").WaitForCompletion());
			val.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/ColorRamps/texRampParent.png").WaitForCompletion());
			((Renderer)((Component)pieProjectileImpactEffect.transform.GetChild(0)).GetComponent<ParticleSystemRenderer>()).material = val;
			((Renderer)((Component)pieProjectileImpactEffect.transform.GetChild(1)).GetComponent<ParticleSystemRenderer>()).material = val;
			((Renderer)((Component)pieProjectileImpactEffect.transform.GetChild(5)).GetComponent<ParticleSystemRenderer>()).material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matOmniRing2.mat").WaitForCompletion();
			((Component)pieProjectileImpactEffect.transform.GetChild(7)).gameObject.SetActive(false);
			((Component)pieProjectileImpactEffect.transform.GetChild(9)).gameObject.SetActive(false);
			((Component)pieProjectileImpactEffect.transform.GetChild(12)).gameObject.SetActive(false);
			pieProjectileImpactEffect.GetComponentInChildren<Light>().color = new Color(1f, 41f / 51f, 0f, 1f);
			val = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matOpaqueDustLight.mat").WaitForCompletion());
			val.SetColor("_TintColor", new Color(0.7647059f, 0f, 1f, 1f));
			val.SetColor("_EmissionColor", new Color(0.5019608f, 0.09019608f, 28f / 51f, 1f));
			((Renderer)((Component)pieProjectileImpactEffect.transform.GetChild(2)).GetComponent<ParticleSystemRenderer>()).material = val;
			pieProjectileImpactEffect.transform.GetChild(2).localScale = Vector3.one * 1.5f;
			Object.Destroy((Object)(object)pieProjectileImpactEffect.GetComponent<OmniEffect>());
			((Component)pieProjectileImpactEffect.transform.GetChild(0)).gameObject.SetActive(true);
			((Component)pieProjectileImpactEffect.transform.GetChild(1)).gameObject.SetActive(true);
			((Component)pieProjectileImpactEffect.transform.GetChild(2)).gameObject.SetActive(true);
			((Component)pieProjectileImpactEffect.transform.GetChild(3)).gameObject.SetActive(true);
			((Component)pieProjectileImpactEffect.transform.GetChild(4)).gameObject.SetActive(true);
			((Component)pieProjectileImpactEffect.transform.GetChild(5)).gameObject.SetActive(true);
			((Component)pieProjectileImpactEffect.transform.GetChild(8)).gameObject.SetActive(false);
			((Component)pieProjectileImpactEffect.transform.GetChild(10)).gameObject.SetActive(true);
			((Component)pieProjectileImpactEffect.transform.GetChild(11)).gameObject.SetActive(true);
			GameObject val2 = PrefabAPI.InstantiateClone(Assets.mainAssetBundle.LoadAsset<GameObject>("PieGhost"), "RobPieGhost", false);
			val2.AddComponent<ProjectileGhostController>();
			val2.AddComponent<EnableOneRandomChild>();
			Assets.ConvertAllRenderersToHopooShader(val2);
			component.ghostPrefab = val2;
			ContentAddition.AddEffect(pieProjectileImpactEffect);
			component4.lifetimeExpiredSound = Assets.CreateNetworkSoundEventDef("sfx_rob_pie_throw");
			component4.offsetForLifetimeExpiredSound = 0.1f;
			component4.destroyOnEnemy = false;
			component4.destroyOnWorld = false;
			component4.timerAfterImpact = true;
			((ProjectileExplosion)component4).falloffModel = (FalloffModel)1;
			component4.lifetime = 12f;
			component4.lifetimeAfterImpact = 0f;
			component4.lifetimeRandomOffset = 0f;
			((ProjectileExplosion)component4).blastDamageCoefficient = 1f;
			((ProjectileExplosion)component4).blastProcCoefficient = 0f;
			((ProjectileExplosion)component4).fireChildren = false;
			((ProjectileExplosion)component4).childrenCount = 0;
			((ProjectileExplosion)component4).childrenProjectilePrefab = null;
			((ProjectileExplosion)component4).childrenDamageCoefficient = 0f;
			component4.impactEffect = pieProjectileImpactEffect;
			component.startSound = "";
			component.procCoefficient = 0f;
			component2.crit = false;
			component2.damage = 0f;
			component2.damageColorIndex = (DamageColorIndex)0;
			component2.damageType = (DamageType)0;
			component2.force = 0f;
			ContentAddition.AddProjectile(pieProjectile);
		}

		private void CreateConfig(ConfigFile config)
		{
		}

		public override ItemDisplayRuleDict CreateItemDisplayRules()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: 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_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_0362: Unknown result type (might be due to invalid IL or missing references)
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Unknown result type (might be due to invalid IL or missing references)
			//IL_042b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_0436: Unknown result type (might be due to invalid IL or missing references)
			//IL_0451: Unknown result type (might be due to invalid IL or missing references)
			//IL_045a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_048d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04be: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_051b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0520: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Unknown result type (might be due to invalid IL or missing references)
			//IL_053b: 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_0556: Unknown result type (might be due to invalid IL or missing references)
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_055c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0577: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: 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_05b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e9: 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_05ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_060a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0613: Unknown result type (might be due to invalid IL or missing references)
			//IL_0641: Unknown result type (might be due to invalid IL or missing references)
			//IL_0646: Unknown result type (might be due to invalid IL or missing references)
			//IL_065c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0661: Unknown result type (might be due to invalid IL or missing references)
			//IL_0677: Unknown result type (might be due to invalid IL or missing references)
			//IL_067c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0681: Unknown result type (might be due to invalid IL or missing references)
			//IL_0682: Unknown result type (might be due to invalid IL or missing references)
			//IL_069d: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_070a: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0714: Unknown result type (might be due to invalid IL or missing references)
			//IL_0715: Unknown result type (might be due to invalid IL or missing references)
			//IL_0730: Unknown result type (might be due to invalid IL or missing references)
			//IL_0739: Unknown result type (might be due to invalid IL or missing references)
			//IL_0767: Unknown result type (might be due to invalid IL or missing references)
			//IL_076c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0782: Unknown result type (might be due to invalid IL or missing references)
			//IL_0787: Unknown result type (might be due to invalid IL or missing references)
			//IL_079d: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a2: 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_07a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0815: Unknown result type (might be due to invalid IL or missing references)
			//IL_081a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0830: Unknown result type (might be due to invalid IL or missing references)
			//IL_0835: Unknown result type (might be due to invalid IL or missing references)
			//IL_083a: Unknown result type (might be due to invalid IL or missing references)
			//IL_083b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0856: Unknown result type (might be due to invalid IL or missing references)
			//IL_085f: Unknown result type (might be due to invalid IL or missing references)
			//IL_088d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0892: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e9: 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_0920: Unknown result type (might be due to invalid IL or missing references)
			//IL_0925: Unknown result type (might be due to invalid IL or missing references)
			//IL_093b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0940: Unknown result type (might be due to invalid IL or missing references)
			//IL_0956: 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_0960: Unknown result type (might be due to invalid IL or missing references)
			//IL_0961: Unknown result type (might be due to invalid IL or missing references)
			//IL_097c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0985: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a18: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a46: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a81: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a86: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a87: Unknown result type (might be due to invalid IL or missing references)
			ItemBodyModelPrefab = Assets.mainAssetBundle.LoadAsset<GameObject>("DisplayPie");
			ItemDisplay val = ItemBodyModelPrefab.AddComponent<ItemDisplay>();
			val.rendererInfos = Utils.ItemDisplaySetup(ItemBodyModelPrefab);
			ItemDisplayRuleDict val2 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>());
			val2.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Head",
					localPos = new Vector3(0f, 0.37828f, -1E-05f),
					localAngles = new Vector3(0f, 0f, 0f),
					localScale = new Vector3(0.07975f, 0.07975f, 0.07975f)
				}
			});
			val2.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "ThighR",
					localPos = new Vector3(-0.10419f, 0.14945f, 0.07268f),
					localAngles = new Vector3(4.05035f, 30.11378f, 100.932f),
					localScale = new Vector3(0.05912f, 0.05912f, 0.05912f)
				}
			});
			val2.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Hip",
					localPos = new Vector3(-0.59383f, 0.38539f, 1.48411f),
					localAngles = new Vector3(354.2642f, 351.2072f, 147.1327f),
					localScale = new Vector3(0.63697f, 0.63697f, 0.63697f)
				}
			});
			val2.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "CannonHeadR",
					localPos = new Vector3(0f, 0.01861f, 0.0931f),
					localAngles = new Vector3(74.52697f, 180f, 180f),
					localScale = new Vector3(0.09299f, 0.09299f, 0.09299f)
				}
			});
			val2.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Chest",
					localPos = new Vector3(-0.08007f, 0.29128f, -0.03731f),
					localAngles = new Vector3(17.90203f, 335.5591f, 25.53785f),
					localScale = new Vector3(0.04496f, 0.04496f, 0.04496f)
				}
			});
			val2.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "ClavicleR",
					localPos = new Vector3(0.07168f, 0.10448f, -0.10009f),
					localAngles = new Vector3(279.2579f, 1E-05f, 332.1362f),
					localScale = new Vector3(0.07689f, 0.07689f, 0.07689f)
				}
			});
			val2.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "FlowerBase",
					localPos = new Vector3(-0.52454f, 0.5604f, 0f),
					localAngles = new Vector3(0f, 0f, 348.033f),
					localScale = new Vector3(0.26775f, 0.26775f, 0.26775f)
				}
			});
			val2.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "MechHandR",
					localPos = new Vector3(0f, 0.08609f, 0.02985f),
					localAngles = new Vector3(0.16855f, 0f, 0f),
					localScale = new Vector3(0.20373f, 0.29487f, 0.20373f)
				}
			});
			val2.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "UpperArmR",
					localPos = new Vector3(0.80725f, 2.26472f, 0.31656f),
					localAngles = new Vector3(10.6713f, 329.1888f, 287.2493f),
					localScale = new Vector3(1.01134f, 1.01134f, 1.01134f)
				}
			});
			val2.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "ThighL",
					localPos = new Vector3(0.08273f, 0.33643f, 0.02572f),
					localAngles = new Vector3(332.3598f, 337.3707f, 282.9324f),
					localScale = new Vector3(0.11047f, 0.11047f, 0.11047f)
				}
			});
			val2.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0.08643f, -0.00976f, -0.17556f),
					localAngles = new Vector3(312.4219f, 177.7703f, 175.3371f),
					localScale = new Vector3(0.04879f, 0.04879f, 0.04879f)
				}
			});
			val2.Add("RobDriverBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0.18012f, 0.05259f, -0.03364f),
					localAngles = new Vector3(359.1773f, 191.7485f, 106.2844f),
					localScale = new Vector3(0.04879f, 0.04879f, 0.04879f)
				}
			});
			val2.Add("RobRavagerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Sword",
					localPos = new Vector3(1E-05f, -0.15967f, -0.04171f),
					localAngles = new Vector3(282.4446f, 336.3754f, 21.10846f),
					localScale = new Vector3(0.04879f, 0.04879f, 0.04879f)
				}
			});
			val2.Add("RobHunkBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Pelvis",
					localPos = new Vector3(-21.80446f, 2.76398f, -5.17162f),
					localAngles = new Vector3(7.73566f, 180f, 238.3206f),
					localScale = new Vector3(4.90376f, 4.90376f, 4.90376f)
				}
			});
			val2.Add("Executioner2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Gun",
					localPos = new Vector3(0.06176f, 0.27819f, 0f),
					localAngles = new Vector3(0f, 0f, 49.03857f),
					localScale = new Vector3(0.06952f, 0.06952f, 0.06952f)
				}
			});
			val2.Add("NemCommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Chest",
					localPos = new Vector3(0f, 1.81438f, -1.01009f),
					localAngles = new Vector3(332.5974f, 0f, 0f),
					localScale = new Vector3(0.41388f, 0.41388f, 0.41388f)
				}
			});
			val2.Add("ChirrBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Chest",
					localPos = new Vector3(0.10636f, 0.6198f, 0.36443f),
					localAngles = new Vector3(3.05622f, 142.962f, 70.08968f),
					localScale = new Vector3(0.25959f, 0.25959f, 0.25959f)
				}
			});
			val2.Add("NemMercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Pelvis",
					localPos = new Vector3(-0.18609f, 0.06135f, -0.06585f),
					localAngles = new Vector3(15.82456f, 180f, 209.9806f),
					localScale = new Vector3(0.05858f, 0.05858f, 0.05858f)
				}
			});
			return val2;
		}

		public override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageInfo);
			if (!Object.op_Implicit((Object)(object)damageInfo.attacker))
			{
				return;
			}
			CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
			if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory) && Object.op_Implicit((Object)(object)component.master))
			{
				int itemCount = component.inventory.GetItemCount(ItemBase<AwesomePie>.instance.ItemDef);
				if (itemCount > 0 && damageInfo.damage > 0f && Util.CheckRoll(10f * damageInfo.procCoefficient, component.master))
				{
					ProjectileManager obj = ProjectileManager.instance;
					FireProjectileInfo val = new FireProjectileInfo
					{
						crit = Util.CheckRoll(component.crit, 0f, (CharacterMaster)null),
						damage = damageInfo.damage * 4f * (float)itemCount,
						damageColorIndex = (DamageColorIndex)0,
						force = 20f,
						owner = ((Component)component).gameObject,
						position = component.aimOrigin,
						procChainMask = default(ProcChainMask),
						projectilePrefab = pieProjectile,
						rotation = Util.QuaternionSafeLookRotation(component.inputBank.aimDirection)
					};
					((FireProjectileInfo)(ref val)).speedOverride = 60f;
					val._speedOverride = 60f;
					val.useFuseOverride = false;
					val.useSpeedOverride = true;
					obj.FireProjectileServer(val, (NetworkConnection)null, (ushort)0, 0.0);
				}
			}
		}
	}
	public class FirstAidSpray : ItemBase<FirstAidSpray>
	{
		public static GameObject ItemBodyModelPrefab;

		public static BuffDef armorBuff;

		public static BuffDef cooldownBuff;

		public static Material sprayOverlay;

		public override string ItemName => "First Aid Spray";

		public override string ItemInternalName => "FirstAidSpray";

		public override string ItemLangTokenName => "FIRST_AID_SPRAY";

		public override string ItemPickupDesc => "Gain a dramatic armor boost for a brief moment after taking damage.";

		public override string ItemFullDescription => "For 0.5s (+0.1s per stack) after taking damage, gain 500 armor. Cooldown of 1 second.";

		public override string ItemLore => "";

		public override ItemTier Tier => (ItemTier)1;

		public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 };

		public override string CorruptsItem => "";

		public override GameObject ItemModel => Assets.mainAssetBundle.LoadAsset<GameObject>("mdlFirstAidSpray");

		public override Sprite ItemIcon => Assets.mainAssetBundle.LoadAsset<Sprite>("texFirstAidSprayIcon");

		public override void Init(ConfigFile config)
		{
			CreateConfig(config);
			CreateLang();
			CreateBuffs();
			CreateVisuals();
			CreateItem();
			Hooks();
		}

		private void CreateBuffs()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			armorBuff = Buffs.AddNewBuff("buffRobFirstAidArmor", null, Color.green, canStack: false, isDebuff: false, isHidden: true);
			cooldownBuff = Buffs.AddNewBuff("buffRobFirstAidCooldown", null, Color.grey, canStack: false, isDebuff: true, isHidden: true);
		}

		private void CreateVisuals()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			NetworkingAPI.RegisterMessageType<SyncSprayEffect>();
			sprayOverlay = Object.Instantiate<Material>(Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/ArmorReductionOnHit/matPulverizedOverlay.mat").WaitForCompletion());
			sprayOverlay.SetColor("_TintColor", Color.green);
			sprayOverlay.SetTexture("_RemapTex", Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Common/ColorRamps/texRampParentTeleport.png").WaitForCompletion());
			sprayOverlay.SetFloat("_Boost", 20f);
			sprayOverlay.SetFloat("_AlphaBoost", 1.8f);
			sprayOverlay.SetFloat("_AlphaBias", 0.1f);
		}

		private void CreateConfig(ConfigFile config)
		{
		}

		public override ItemDisplayRuleDict CreateItemDisplayRules()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Expected O, but got Unknown
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0272: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: 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_032b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_0362: Unknown result type (might be due to invalid IL or missing references)
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0382: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Unknown result type (might be due to invalid IL or missing references)
			//IL_042b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_0436: Unknown result type (might be due to invalid IL or missing references)
			//IL_0451: Unknown result type (might be due to invalid IL or missing references)
			//IL_045a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_048d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04be: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_051b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0520: Unknown result type (might be due to invalid IL or missing references)
			//IL_0536: Unknown result type (might be due to invalid IL or missing references)
			//IL_053b: 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_0556: Unknown result type (might be due to invalid IL or missing references)
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_055c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0577: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: 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_05b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e9: 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_05ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_060a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0613: Unknown result type (might be due to invalid IL or missing references)
			//IL_0641: Unknown result type (might be due to invalid IL or missing references)
			//IL_0646: Unknown result type (might be due to invalid IL or missing references)
			//IL_065c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0661: Unknown result type (might be due to invalid IL or missing references)
			//IL_0677: Unknown result type (might be due to invalid IL or missing references)
			//IL_067c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0681: Unknown result type (might be due to invalid IL or missing references)
			//IL_0682: Unknown result type (might be due to invalid IL or missing references)
			//IL_069d: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_070a: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0714: Unknown result type (might be due to invalid IL or missing references)
			//IL_0715: Unknown result type (might be due to invalid IL or missing references)
			//IL_0730: Unknown result type (might be due to invalid IL or missing references)
			//IL_0739: Unknown result type (might be due to invalid IL or missing references)
			//IL_0767: Unknown result type (might be due to invalid IL or missing references)
			//IL_076c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0782: Unknown result type (might be due to invalid IL or missing references)
			//IL_0787: Unknown result type (might be due to invalid IL or missing references)
			//IL_079d: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a2: 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_07a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0815: Unknown result type (might be due to invalid IL or missing references)
			//IL_081a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0830: Unknown result type (might be due to invalid IL or missing references)
			//IL_0835: Unknown result type (might be due to invalid IL or missing references)
			//IL_083a: Unknown result type (might be due to invalid IL or missing references)
			//IL_083b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0856: Unknown result type (might be due to invalid IL or missing references)
			//IL_085f: Unknown result type (might be due to invalid IL or missing references)
			//IL_088d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0892: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e9: 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_0920: Unknown result type (might be due to invalid IL or missing references)
			//IL_0925: Unknown result type (might be due to invalid IL or missing references)
			//IL_093b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0940: Unknown result type (might be due to invalid IL or missing references)
			//IL_0956: 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_0960: Unknown result type (might be due to invalid IL or missing references)
			//IL_0961: Unknown result type (might be due to invalid IL or missing references)
			//IL_097c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0985: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_09d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a18: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a46: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a4b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a61: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a66: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a81: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a86: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a87: Unknown result type (might be due to invalid IL or missing references)
			ItemBodyModelPrefab = Assets.mainAssetBundle.LoadAsset<GameObject>("DisplayFirstAidSpray");
			ItemDisplay val = ItemBodyModelPrefab.AddComponent<ItemDisplay>();
			val.rendererInfos = Utils.ItemDisplaySetup(ItemBodyModelPrefab);
			ItemDisplayRuleDict val2 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>());
			val2.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Chest",
					localPos = new Vector3(0.19527f, 2E-05f, -0.14271f),
					localAngles = new Vector3(0f, 147.5423f, 0f),
					localScale = new Vector3(0.01231f, 0.01231f, 0.01231f)
				}
			});
			val2.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0.02792f, -0.08218f, 0.13039f),
					localAngles = new Vector3(4.05035f, 30.11378f, 272.2249f),
					localScale = new Vector3(0.00778f, 0.00778f, 0.00778f)
				}
			});
			val2.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Chest",
					localPos = new Vector3(-1.2533f, 2.74616f, -0.78848f),
					localAngles = new Vector3(324.6004f, 176.9783f, 91.59129f),
					localScale = new Vector3(0.14156f, 0.14156f, 0.14156f)
				}
			});
			val2.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "UpperArmL",
					localPos = new Vector3(0.09982f, 0.1742f, 0.04941f),
					localAngles = new Vector3(328.7005f, 180f, 180f),
					localScale = new Vector3(0.01751f, 0.01751f, 0.01751f)
				}
			});
			val2.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Chest",
					localPos = new Vector3(0.12997f, 0.33211f, -0.07848f),
					localAngles = new Vector3(276.9351f, 0f, 90f),
					localScale = new Vector3(0.01669f, 0.01669f, 0.01669f)
				}
			});
			val2.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Neck",
					localPos = new Vector3(-0.15904f, 0.10708f, 0.09367f),
					localAngles = new Vector3(0.79659f, 359.8864f, 269.4213f),
					localScale = new Vector3(0.01882f, 0.01882f, 0.01882f)
				}
			});
			val2.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "PlatformBase",
					localPos = new Vector3(-0.59478f, 0.78642f, 0.41463f),
					localAngles = new Vector3(14.12767f, 321.7971f, 270.1313f),
					localScale = new Vector3(0.0211f, 0.0211f, 0.0211f)
				}
			});
			val2.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Chest",
					localPos = new Vector3(-0.12342f, -0.03201f, 0.21218f),
					localAngles = new Vector3(0f, 0f, 269.32f),
					localScale = new Vector3(0.01368f, 0.01368f, 0.01368f)
				}
			});
			val2.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Hip",
					localPos = new Vector3(-0.24894f, 2.9554f, 2.5721f),
					localAngles = new Vector3(0.80864f, 24.04765f, 208.9908f),
					localScale = new Vector3(0.14906f, 0.14906f, 0.14906f)
				}
			});
			val2.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "HandL",
					localPos = new Vector3(-0.06834f, -0.01013f, -0.06323f),
					localAngles = new Vector3(1.21846f, 216.2999f, 357.7115f),
					localScale = new Vector3(0.01261f, 0.01261f, 0.01261f)
				}
			});
			val2.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Chest",
					localPos = new Vector3(-0.0662f, 0.12646f, -0.21774f),
					localAngles = new Vector3(355.2985f, 181.2216f, 1.70418f),
					localScale = new Vector3(0.00837f, 0.00837f, 0.00837f)
				}
			});
			val2.Add("RobDriverBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Pelvis",
					localPos = new Vector3(0.16737f, 0.13324f, -0.08598f),
					localAngles = new Vector3(357.5083f, 180f, 180f),
					localScale = new Vector3(0.01042f, 0.01042f, 0.01042f)
				}
			});
			val2.Add("RobRavagerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Head",
					localPos = new Vector3(0.18608f, 0.00563f, -0.03483f),
					localAngles = new Vector3(313.1853f, 72.52916f, 113.3477f),
					localScale = new Vector3(0.01575f, 0.01575f, 0.01575f)
				}
			});
			val2.Add("RobHunkBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Stomach",
					localPos = new Vector3(-15.83614f, -8.92313f, -13.44089f),
					localAngles = new Vector3(0f, 230.2464f, 0f),
					localScale = new Vector3(1.15564f, 1.15564f, 1.15564f)
				}
			});
			val2.Add("Executioner2Body", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Pelvis",
					localPos = new Vector3(-0.12455f, -0.1053f, 0.14353f),
					localAngles = new Vector3(358.2397f, 353.3625f, 269.9165f),
					localScale = new Vector3(0.01244f, 0.01244f, 0.01244f)
				}
			});
			val2.Add("NemCommandoBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "CalfL",
					localPos = new Vector3(0.35928f, -0.73103f, 1E-05f),
					localAngles = new Vector3(16.89155f, 87.0375f, 217.0535f),
					localScale = new Vector3(0.0624f, 0.0624f, 0.0624f)
				}
			});
			val2.Add("ChirrBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "ShoulderL",
					localPos = new Vector3(-0.08971f, 0.97022f, -0.14981f),
					localAngles = new Vector3(351.2166f, 177.7587f, 175.3668f),
					localScale = new Vector3(0.02514f, 0.02514f, 0.02514f)
				}
			});
			val2.Add("NemMercBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1]
			{
				new ItemDisplayRule
				{
					ruleType = (ItemDisplayRuleType)0,
					followerPrefab = ItemBodyModelPrefab,
					childName = "Pelvis",
					localPos = new Vector3(-0.23916f, 0.18165f, 0.05769f),
					localAngles = new Vector3(17.40458f, 311.1948f, 177.2486f),
					localScale = new Vector3(0.00991f, 0.00991f, 0.00991f)
				}
			});
			return val2;
		}

		public override void Hooks()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && self.HasBuff(armorBuff))
			{
				self.armor += 500f;
			}
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, damageInfo);
			if (!Object.op_Implicit((Object)(object)self))
			{
				return;
			}
			CharacterBody body = self.body;
			if (!Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory))
			{
				return;
			}
			int itemCount = body.inventory.GetItemCount(ItemBase<FirstAidSpray>.instance.ItemDef);
			if (itemCount > 0 && !self.body.HasBuff(cooldownBuff))
			{
				self.body.ClearTimedBuffs(armorBuff);
				self.body.AddTimedBuff(armorBuff, 0.45f + (float)itemCount * 0.1f);
				self.body.AddTimedBuff(cooldownBuff, 1f);
				NetworkIdentity component = ((Component)self).GetComponent<NetworkIdentity>();
				if (Object.op_Implicit((Object)(object)component))
				{
					NetMessageExtensions.Send((INetMessage)(object)new SyncSprayEffect(component.netId, ((Component)self).gameObject), (NetworkDestination)1);
				}
			}
		}
	}
	internal class SyncSprayEffect : INetMessage, ISerializableObject
	{
		private NetworkInstanceId netId;

		private GameObject target;

		public SyncSprayEffect()
		{
		}

		public SyncSprayEffect(NetworkInstanceId netId, GameObject target)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			this.netId = netId;
			this.target = target;
		}

		public void Deserialize(NetworkReader reader)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			netId = reader.ReadNetworkId();
			target = reader.ReadGameObject();
		}

		public void OnReceived()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Util.FindNetworkObject(netId);
			if (Object.op_Implicit((Object)(object)val))
			{
				Util.PlaySound("sfx_rob_spray", val.gameObject);
				ModelLocator component = val.GetComponent<ModelLocator>();
				if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.modelTransform))
				{
					TemporaryOverlay val2 = ((Component)component.modelTransform).gameObject.AddComponent<TemporaryOverlay>();
					val2.duration = 1f;
					val2.destroyComponentOnEnd = true;
					val2.originalMaterial = FirstAidSpray.sprayOverlay;
					val2.inspectorCharacterModel = ((Component)component.modelTransform).GetComponent<CharacterModel>();
					val2.alphaCurve = AnimationCurve.EaseInOut(0f, 3f, 1f, 0f);
					val2.animateShaderAlpha = true;
				}
			}
		}

		public void Serialize(NetworkWriter writer)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			writer.Write(netId);
			writer.Write(target);
		}
	}
	public class FriendScarf : ItemBase<FriendScarf>
	{
		public static GameObject ItemBodyModelPrefab;

		public static GameObject friendBodyPrefab;

		public static GameObject friendMasterPrefab;

		public static CharacterSpawnCard friendSpawnCard;

		public override string ItemName => "Explorer's Scarf";

		public override string ItemInternalName => "ExplorersScarf";

		public override string ItemLangTokenName => "FRIEND_SCARF";

		public override string ItemPickupDesc => "Call in a friend to adventure with you!";

		public override string ItemFullDescription => "Summon an ally Beetle with extreme durability to soak up aggro for you</style>";

		public override string ItemLore => "";

		public override ItemTier Tier => (ItemTier)1;

		public override ItemTag[] ItemTags => (ItemTag[])(object)new ItemTag[2]
		{
			(ItemTag)3,
			(ItemTag)11
		};

		public override string CorruptsItem => "";

		public override GameObject ItemModel => Assets.mainAssetBundle.LoadAsset<GameObject>("mdlFriendScarfPickup");

		public override Sprite ItemIcon => Assets.mainAssetBundle.LoadAsset<Sprite>("texFriendScarfIcon");

		public override void Init(ConfigFile config)
		{
			CreateConfig(config);
			CreateLang();
			CreateBody();
			CreateMaster();
			CreateSpawnCard();
			CreateItem();
			Hooks();
		}

		private void CreateConfig(ConfigFile config)
		{
		}

		private void CreateBody()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			friendBodyPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Beetle/BeetleBody.prefab").WaitForCompletion(), "RobFriendBody", true);
			CharacterBody component = friendBodyPrefab.GetComponent<CharacterBody>();
			component.baseNameToken = "Chip";
			component.portraitIcon = Assets.mainAssetBundle.LoadAsset<Texture>("texChipIcon");
			component.baseMaxHealth *= 10f;
			component.levelMaxHealth *= 10f;
			component.baseArmor = 500f;
			component.baseRegen = 10f;
			friendBodyPrefab.AddComponent<FriendHandler>();
			ContentAddition.AddBody(friendBodyPrefab);
		}

		private void CreateMaster()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			friendMasterPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Beetle/BeetleMaster.prefab").WaitForCompletion(), "RobFriendMaster", true);
			CharacterMaster component = friendMasterPrefab.GetComponent<CharacterMaster>();
			component.bodyPrefab = friendBodyPrefab;
			ContentAddition.AddMaster(friendMasterPrefab);
		}

		private void CreateSpawnCard()
		{
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			friendSpawnCard = ScriptableObject.CreateInstance<CharacterSpawnCard>();
			((Object)friendSpawnCard).name = "cscBeetleFriend";
			((SpawnCard)friendSpawnCard).prefab = friendMasterPrefab;
			((SpawnCard)friendSpawnCard).sendOverNetwork = true;
			((SpawnCard)friendSpawnCard).hullSize = (HullClassification)0;
			((SpawnCard)friendSpawnCard).nodeGraphType = (GraphType)0;
			((SpawnCard)friendSpawnCard).requiredFlags = (NodeFlags)0;
			((SpawnCard)friendSpawnCard).forbiddenFlags = (NodeFlags)2;
			((SpawnCard)friendSpawnCard).directorCreditCost = 0;
			((SpawnCard)friendSpawnCard).occupyPosition = false;
			friendSpawnCard.loadout = Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Beetle/cscBeetle.asset").WaitForCompletion().loadout;
			friendSpawnCard.noElites = true;
			friendSpawnCard.forbiddenAsBoss = true;
		}

		public override ItemDisplayRuleDict CreateItemDisplayRules()
		{
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Expected O, but got Unknown
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: 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_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0203: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: 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_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: 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_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_030e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0313: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Unknown result type (might be due to invalid IL or missing references)
			//IL_032e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_0334: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_038b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0419: Unknown result type (might be due to invalid IL or missing references)
			//IL_041e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0434: 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_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_0459: Unknown result type (might be due to invalid IL or missing references)
			//IL_045a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0475: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b1: 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_04cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0508: Unknown result type (might be due to invalid IL or missing references)
			//IL_0511: Unknown result type (might be due to invalid IL or missing references)
			//IL_053f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0544: Unknown result type (might be due to invalid IL or missing references)
			//IL_055a: Unknown result type (might be due to invalid IL or missing references)
			//IL_055f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0575: Unknown result type (might be due to invalid IL or missing references)
			//IL_057a: Unknown result type (might be due to invalid IL or missing references)
			//IL_057f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0580: Unknown result type (might be due to invalid IL or missing references)
			//IL_059b: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0608: Unknown result type (might be due to invalid IL or missing references)
			//IL_060d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0612: Unknown result type (might be due to invalid IL or missing references)
			//IL_0613: Unknown result type (might be due to invalid IL or missing references)
			//IL_062e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0637: Unknown result type (might be due to invalid IL or missing references)
			//IL_0665: Unknown result type (might be due to invalid IL or missing references)
			//IL_066a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0680: Unknown result type (might be due to invalid IL or missing references)
			//IL_0685: Unknown result type (might be due to invalid IL or missing references)
			//IL_069b: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_070f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0714: Unknown result type (might be due to invalid IL or missing references)
			//IL_072a: Unknown result type (might be due to invalid IL or missing references)
			//IL_072f: Unknown result type (might be due to invalid IL or missing references)