Decompiled source of RecurveBow v0.0.9

RecurveBow.dll

Decompiled 2 weeks ago
using System;
using System.CodeDom.Compiler;
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 Agents;
using AssetShards;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Unity.IL2CPP;
using BepInEx.Unity.IL2CPP.Utils.Collections;
using Enemies;
using FluffyUnderware.DevTools.Extensions;
using GTFO.API;
using GameData;
using Gear;
using HarmonyLib;
using Il2CppInterop.Runtime.Injection;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using Localization;
using Microsoft.CodeAnalysis;
using Player;
using SNetwork;
using UnityEngine;
using UnityEngine.SceneManagement;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("RecurveBow")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RecurveBow")]
[assembly: AssemblyTitle("RecurveBow")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

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

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

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
}
namespace RecurveBow
{
	public class ArrowHandler : MonoBehaviour
	{
		public static PlayerAgent owner;

		public static int slot;

		public Vector3 position;

		public Vector3 startpos;

		public Vector3 direction;

		public Vector3 target;

		public float speed = 0.7f;

		public MeleeWeaponFirstPerson weapon;

		public MeleeWeaponThirdPerson weapontp;

		public CellSoundPlayer audio;

		public GameObject arrowtip = new GameObject();

		public GameObject arrow = new GameObject();

		private float shoottime;

		private bool isprop;

		private bool isbuilt;

		private float soundendtime;

		public int status;

		public Vector3 velocity = Vector3.zero;

		public bool enemyhit;

		public Agent hitagent;

		public bool proparrowbuilt;

		public int arrowindex;

		public int myslot;

		public float blinktime;

		public Light tmpvalo;

		public NavMarker navmarker;

		public static GameObject Build(bool isprop)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = GameObject.CreatePrimitive((PrimitiveType)2);
			val.GetComponent<Collider>().enabled = false;
			Object.Destroy((Object)(object)val.GetComponent<Collider>());
			((Object)val).name = "Bow_Arrow";
			MeshRenderer component = val.GetComponent<MeshRenderer>();
			((Renderer)component).sharedMaterial = new Material(Shader.Find("GTFO/Standard"));
			((Renderer)component).sharedMaterial.shader = Shader.Find("Cell/Player/CustomGearShader");
			((Renderer)component).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.redTexture);
			val.transform.localPosition = new Vector3(0f, 0f, 0f);
			val.transform.localScale = new Vector3(0.01f, 1.3f, 0.005f);
			val.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			GameObject obj = Object.Instantiate<GameObject>(((Component)AssetAPI.GetLoadedAsset<GameObject>("Assets/AssetPrefabs/Items/Gear/Parts/Melee/Heads/Head_Spear_1.prefab").GetComponentInChildren<MeshRenderer>()).gameObject);
			Object.Destroy((Object)(object)obj.GetComponent<Collider>());
			obj.transform.parent = val.transform;
			((Object)obj).name = "Arrow_Tip";
			obj.transform.localEulerAngles = new Vector3(270f, 0f, 0f);
			obj.transform.localScale = new Vector3(19.1f, 20f, 1f);
			obj.transform.localPosition = new Vector3(0f, 0.9f, 0f);
			return val;
		}

		public void Shoot()
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Expected O, but got Unknown
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Expected O, but got Unknown
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Expected O, but got Unknown
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0355: Unknown result type (might be due to invalid IL or missing references)
			//IL_036c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Unknown result type (might be due to invalid IL or missing references)
			//IL_037d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0395: Unknown result type (might be due to invalid IL or missing references)
			//IL_039b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_044b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0456: Unknown result type (might be due to invalid IL or missing references)
			LevelAPI.OnLevelCleanup += OnLevelCleanup;
			if (speed < 0.7f)
			{
				speed = 0.7f;
			}
			((Component)this).transform.localScale = new Vector3(0.3f, 0.3f, 0.6f);
			((Component)this).transform.position = position;
			((Component)this).transform.LookAt(target, ((Component)this).transform.up);
			Transform transform = ((Component)this).transform;
			transform.position += ((Component)this).transform.forward * 0.5f;
			arrow = GameObject.CreatePrimitive((PrimitiveType)2);
			arrow.transform.parent = ((Component)this).transform;
			arrow.GetComponent<Collider>().enabled = false;
			Object.Destroy((Object)(object)arrow.GetComponent<Collider>());
			arrow.transform.localPosition = new Vector3(0f, 0f, 0f);
			arrow.transform.localScale = new Vector3(0.05f, 1f, 0.05f);
			arrow.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
			((Object)arrow).name = "Flying_Arrow";
			audio = new CellSoundPlayer();
			if ((Object)(object)weapon != (Object)null)
			{
				((ItemEquippable)weapon).Sound.Post(803249283u, true);
			}
			if ((Object)(object)weapontp != (Object)null)
			{
				((ItemEquippable)weapontp).Sound.Post(803249283u, true);
			}
			audio.UpdatePosition(((Component)this).transform.position);
			audio.Post(2470408129u, true);
			MeshRenderer component = arrow.GetComponent<MeshRenderer>();
			((Renderer)component).sharedMaterial = new Material(Shader.Find("GTFO/Standard"));
			((Renderer)component).sharedMaterial.shader = Shader.Find("Cell/Player/CustomGearShader");
			if ((Object)(object)weapon != (Object)null)
			{
				((Renderer)component).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.redTexture);
			}
			if ((Object)(object)weapontp != (Object)null)
			{
				((Renderer)component).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.grayTexture);
			}
			GameObject loadedAsset = AssetAPI.GetLoadedAsset<GameObject>("Assets/AssetPrefabs/Items/Gear/Parts/Melee/Heads/Head_Spear_1.prefab");
			arrowtip = Object.Instantiate<GameObject>(((Component)loadedAsset.GetComponentInChildren<MeshRenderer>()).gameObject);
			Object.Destroy((Object)(object)arrowtip.GetComponent<Collider>());
			((Renderer)arrowtip.GetComponentInChildren<MeshRenderer>()).sharedMaterial = new Material(Shader.Find("GTFO/Standard"));
			((Renderer)arrowtip.GetComponentInChildren<MeshRenderer>()).sharedMaterial.shader = Shader.Find("Cell/Player/CustomGearShader");
			arrowtip.transform.parent = arrow.transform;
			arrowtip.transform.localPosition = new Vector3(0f, 0.9f, 0f);
			arrowtip.transform.localEulerAngles = new Vector3(270f, 0f, 0f);
			((Object)arrowtip).name = "Arrow_Tip";
			arrowtip.transform.localScale = new Vector3(19.1f, 20f, 1f);
			shoottime = Time.time;
			startpos = position;
			((Component)this).transform.position = position;
			status = 1;
			velocity = ((Component)this).transform.forward + direction * (speed * 48f);
			tmpvalo = arrow.AddComponent<Light>();
			tmpvalo.range = 1f;
			tmpvalo.intensity = 0.6f;
			isbuilt = true;
			if ((Object)(object)weapon != (Object)null)
			{
				Plugin.arrowindex++;
			}
			if ((Object)(object)weapon != (Object)null)
			{
				arrowindex = Plugin.arrowindex;
			}
			if ((Object)(object)weapon != (Object)null)
			{
				NetworkAPI.InvokeEvent<Plugin.ArrowNetInfo>("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, ((Component)this).transform.forward, speed, 0, 0u), (SNet_ChannelType)2);
			}
		}

		public void OnLevelCleanup()
		{
			if ((Object)(object)navmarker != (Object)null)
			{
				navmarker.SetVisible(false);
				Object.Destroy((Object)(object)navmarker);
			}
			Object.Destroy((Object)(object)arrowtip);
			Object.Destroy((Object)(object)arrow);
			Object.Destroy((Object)(object)this);
		}

		public void FixedUpdate()
		{
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0433: Unknown result type (might be due to invalid IL or missing references)
			//IL_0438: Unknown result type (might be due to invalid IL or missing references)
			//IL_0877: Unknown result type (might be due to invalid IL or missing references)
			//IL_087d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0887: Unknown result type (might be due to invalid IL or missing references)
			//IL_088c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0898: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_08bd: 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_08d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08de: Unknown result type (might be due to invalid IL or missing references)
			//IL_08e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_08f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_048f: Unknown result type (might be due to invalid IL or missing references)
			//IL_049a: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b4: 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_04d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0504: Unknown result type (might be due to invalid IL or missing references)
			//IL_050e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0513: Unknown result type (might be due to invalid IL or missing references)
			//IL_0523: Unknown result type (might be due to invalid IL or missing references)
			//IL_0552: Unknown result type (might be due to invalid IL or missing references)
			//IL_0559: Unknown result type (might be due to invalid IL or missing references)
			//IL_055e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0569: Unknown result type (might be due to invalid IL or missing references)
			//IL_056e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0573: 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_0365: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0619: Unknown result type (might be due to invalid IL or missing references)
			//IL_063d: 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_0705: 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_071c: Unknown result type (might be due to invalid IL or missing references)
			//IL_071f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0729: 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_0740: Expected O, but got Unknown
			//IL_06b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06be: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0765: Unknown result type (might be due to invalid IL or missing references)
			//IL_076a: Unknown result type (might be due to invalid IL or missing references)
			//IL_07dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0801: Unknown result type (might be due to invalid IL or missing references)
			//IL_080c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0813: Unknown result type (might be due to invalid IL or missing references)
			//IL_0823: Unknown result type (might be due to invalid IL or missing references)
			//IL_0828: Unknown result type (might be due to invalid IL or missing references)
			//IL_0851: Unknown result type (might be due to invalid IL or missing references)
			//IL_0857: Unknown result type (might be due to invalid IL or missing references)
			if (isprop || !isbuilt)
			{
				return;
			}
			if (enemyhit && !hitagent.Alive && !proparrowbuilt)
			{
				Object.Destroy((Object)(object)arrow);
				arrow = Object.Instantiate<GameObject>(Build(isprop: true));
				if ((Object)(object)((Component)weapon).GetComponent<BowHandlerFP>() != (Object)null && (Object)(object)navmarker == (Object)null)
				{
					navmarker = GuiManager.NavMarkerLayer.PlaceCustomMarker((NavMarkerOption)4, arrow, "goatse", 0f, false);
				}
				tmpvalo = arrow.AddComponent<Light>();
				tmpvalo.range = 1f;
				((Object)arrow).name = "Arrow_Prop";
				arrow.transform.parent = ((Component)this).transform;
				((Component)this).transform.position = hitagent.Position + ((Component)hitagent).transform.up * 0.4f;
				arrow.transform.localPosition = new Vector3(0f, 0f, 0f);
				arrow.transform.localScale = new Vector3(0.05f, 2f, 0.05f);
				proparrowbuilt = true;
				status = 3;
				navmarker.m_trackingObj = arrow;
				navmarker.m_trackingTrans = arrow.transform;
				navmarker.SetColor(Color.white);
				if ((Object)(object)weapon != (Object)null)
				{
					NetworkAPI.InvokeEvent<Plugin.ArrowNetInfo>("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, velocity, speed, 3, 0u), (SNet_ChannelType)2);
				}
			}
			if (enemyhit && (Object)(object)arrow != (Object)null && !proparrowbuilt)
			{
				((Component)this).transform.position = arrow.transform.position;
			}
			if (status == 3)
			{
				if (audio != null)
				{
					audio.Recycle();
					audio = null;
				}
				if (Time.time - blinktime < 1f)
				{
					tmpvalo.intensity = 0.6f;
				}
				if (Time.time - blinktime >= 1f && Time.time - blinktime < 2f)
				{
					tmpvalo.intensity = 0f;
				}
				if (Time.time - blinktime >= 2f)
				{
					blinktime = Time.time;
				}
				if ((Object)(object)weapon != (Object)null && Vector3.Distance(((Agent)((Item)weapon).Owner).Position, ((Component)this).transform.position) < 2.5f)
				{
					BowHandlerFP component = ((Component)weapon).GetComponent<BowHandlerFP>();
					if ((Object)(object)component != (Object)null)
					{
						component.inbackabs++;
						component.inbackrel = (float)component.inbackabs / (float)component.inbackmax;
						GuiManager.PlayerLayer.Inventory.SetSlotAmmo((InventorySlot)10, 1, component.inbackabs, component.inbackrel);
						NetworkAPI.InvokeEvent<Plugin.ArrowNetInfo>("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, velocity, speed, 5, 0u), (SNet_ChannelType)2);
						pPlayerData_Session session = SNet.LocalPlayer.Session;
						NetworkAPI.InvokeEvent<Plugin.BowNetInfo>("BowNetInfo", new Plugin.BowNetInfo(0, ((pPlayerData_Session)(ref session)).playerSlotIndex, component.inbackabs), (SNet_ChannelType)2);
						if ((Object)(object)navmarker != (Object)null)
						{
							navmarker.SetVisible(false);
							Object.Destroy((Object)(object)navmarker);
						}
						Object.Destroy((Object)(object)arrowtip);
						Object.Destroy((Object)(object)arrow);
						Object.Destroy((Object)(object)this);
					}
				}
			}
			if (Time.time - shoottime > 10f && status < 3)
			{
				if (audio != null)
				{
					audio.Stop();
					audio.Recycle();
				}
				speed = 0f;
				velocity = Vector3.zero;
				status = 3;
			}
			else
			{
				if (status > 2)
				{
					return;
				}
				if (status == 2)
				{
					audio.Stop();
					audio.Recycle();
					status = 3;
					return;
				}
				if ((Object)(object)weapon != (Object)null)
				{
					Ray val = default(Ray);
					((Ray)(ref val))..ctor(((Component)this).transform.position + ((Component)this).transform.forward * 1f, ((Component)this).transform.forward);
					RaycastHit val2 = default(RaycastHit);
					if (Physics.Raycast(val, ref val2, 2.5f, LayerManager.MASK_PING_TARGET, (QueryTriggerInteraction)1) || Physics.Raycast(val, ref val2, 2.5f, LayerManager.MASK_GLUEGUN_TARGETS, (QueryTriggerInteraction)1) || Physics.CapsuleCast(((Component)this).transform.position, ((Component)this).transform.position + ((Component)this).transform.forward * 1.2f, 0.04f, ((Component)this).transform.forward, ref val2, 2f, LayerManager.MASK_GLUEGUN_TARGETS, (QueryTriggerInteraction)1))
					{
						Collider collider = ((RaycastHit)(ref val2)).collider;
						Vector3 val3 = ((Component)collider).transform.position - ((RaycastHit)(ref val2)).point - ((Component)this).transform.position;
						_ = ((Vector3)(ref val3)).normalized;
						hitagent = ((Component)collider).GetComponentInParent<Agent>();
						if ((Object)(object)hitagent != (Object)null)
						{
							NetworkAPI.InvokeEvent<Plugin.ArrowNetInfo>("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, velocity, speed, 4, (uint)(hitagent.m_replicator.Key + 1)), (SNet_ChannelType)2);
							enemyhit = true;
							arrow.transform.SetParent(((Component)collider).transform);
							arrow.transform.localPosition = new Vector3(0f, 0f, 0f);
							arrow.transform.localEulerAngles = new Vector3(0f, 0f, 180f);
							arrow.transform.localScale = new Vector3(0.01f, 0.3f, 0.01f);
						}
						IDamageable val4 = null;
						ColliderMaterial component2 = ((Component)collider).GetComponent<ColliderMaterial>();
						if ((Object)(object)component2 != (Object)null)
						{
							val4 = component2.Damageable;
						}
						if (val4 == null)
						{
							val4 = ((Component)collider).GetComponent<IDamageable>();
						}
						if (val4 != null)
						{
							IDamageable obj = val4;
							float num = speed * (float)Plugin._BowMaxDamage;
							PlayerAgent obj2 = ((Item)weapon).Owner;
							Vector3 point = ((RaycastHit)(ref val2)).point;
							val3 = ((RaycastHit)(ref val2)).point - ((Component)this).transform.position;
							obj.MeleeDamage(num, (Agent)(object)obj2, point, ((Vector3)(ref val3)).normalized, 1f, 1f, 1f, 1f, 1f, false, (DamageNoiseLevel)1, 0u);
						}
						else
						{
							weapon.DoAttackDamage(new MeleeWeaponDamageData
							{
								damageGO = ((Component)((RaycastHit)(ref val2)).collider).gameObject,
								hitPos = ((RaycastHit)(ref val2)).point,
								sourcePos = ((Component)this).transform.position
							}, false);
						}
						audio.Post(3762526143u, true);
						soundendtime = Time.time;
						status = 2;
						velocity = Vector3.zero;
						speed = 0f;
						if ((Object)(object)((Component)weapon).GetComponent<BowHandlerFP>() != (Object)null)
						{
							navmarker = GuiManager.NavMarkerLayer.PlaceCustomMarker((NavMarkerOption)4, arrow, "goatse", 0f, false);
							navmarker.m_trackingObj = arrow;
							navmarker.m_trackingTrans = arrow.transform;
							navmarker.SetColor(Color.white);
						}
						if (!enemyhit)
						{
							Transform transform = ((Component)this).transform;
							transform.position += ((Component)this).transform.forward * (Vector3.Distance(((Component)this).transform.position, ((RaycastHit)(ref val2)).point) - 0.5f);
						}
						if (!enemyhit)
						{
							NetworkAPI.InvokeEvent<Plugin.ArrowNetInfo>("ArrowNetInfo", new Plugin.ArrowNetInfo(arrowindex, myslot, ((Component)this).transform.position, velocity, speed, 2, 0u), (SNet_ChannelType)2);
						}
						return;
					}
				}
				Transform transform2 = ((Component)this).transform;
				transform2.position += velocity * Time.fixedDeltaTime;
				velocity += ((Component)this).transform.up * (-9.81f * Time.fixedDeltaTime);
				((Component)this).transform.LookAt(((Component)this).transform.position + velocity * Time.fixedDeltaTime);
				audio.UpdatePosition(((Component)this).transform.position);
			}
		}

		public ArrowHandler()
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Expected O, but got Unknown
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Expected O, but got Unknown
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			pPlayerData_Session session = SNet.LocalPlayer.Session;
			myslot = ((pPlayerData_Session)(ref session)).playerSlotIndex;
			((MonoBehaviour)this)..ctor();
		}
	}
	internal class BowCreator : MonoBehaviour
	{
		public static GameObject Build()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Expected O, but got Unknown
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Expected O, but got Unknown
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: 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_028f: 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_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: 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_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Unknown result type (might be due to invalid IL or missing references)
			//IL_034b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0363: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0622: Unknown result type (might be due to invalid IL or missing references)
			//IL_062c: Expected O, but got Unknown
			//IL_066a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0689: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject();
			((Object)val).hideFlags = (HideFlags)61;
			val.layer = LayerManager.LAYER_FIRST_PERSON_ITEM;
			val.transform.position = new Vector3(0f, 1000f, 0f);
			string path = Path.Combine(Paths.ConfigPath, "../Assets/RecurveBow/recurvebow1.png");
			if (!File.Exists(path))
			{
				Debug.Log(Object.op_Implicit("RecurveBow - cant find bow image"));
				return null;
			}
			byte[] array = File.ReadAllBytes(path);
			Texture2D val2 = new Texture2D(237, 693, (TextureFormat)5, false);
			ImageConversion.LoadImage(val2, Il2CppStructArray<byte>.op_Implicit(array));
			Dictionary<int, int> dictionary = new Dictionary<int, int>();
			Dictionary<int, int> dictionary2 = new Dictionary<int, int>();
			List<Vector3> list = new List<Vector3>();
			new List<Vector3>();
			List<Vector2> list2 = new List<Vector2>();
			bool flag = false;
			List<int> list3 = new List<int>();
			for (int i = 0; i < 693; i += 5)
			{
				for (int j = 0; j < 237; j++)
				{
					if (flag && j == 0)
					{
						flag = false;
					}
					if (!flag && val2.GetPixel(j, i).a != 0f)
					{
						dictionary[i] = j;
						flag = true;
					}
					if (flag && val2.GetPixel(j, i).a == 0f)
					{
						dictionary2[i] = j - 1;
						flag = false;
					}
				}
			}
			Debug.Log(Object.op_Implicit($"RecurveBow - rowstart {dictionary.Count} rowend {dictionary2.Count}"));
			float num = 0.02f;
			_ = 1 / dictionary2.Count();
			foreach (KeyValuePair<int, int> item in dictionary2)
			{
				if (!dictionary.ContainsKey(item.Key))
				{
					Debug.Log(Object.op_Implicit($"RecurveBow - rivi {item.Key} ei loydy"));
					continue;
				}
				float num2 = (float)item.Key / 693f - 0.5f;
				float num3 = (float)dictionary[item.Key] / 237f - 0.48f;
				float num4 = (float)dictionary2[item.Key] / 237f - 0.48f;
				list.Add(new Vector3(num, num2, num3));
				list2.Add(new Vector2(num3, num2));
				list.Add(new Vector3(num, num2, num3));
				list2.Add(new Vector2(num3, num2));
				list.Add(new Vector3(num, num2, num4));
				list2.Add(new Vector2(num4, num2));
				list.Add(new Vector3(num, num2, num4));
				list2.Add(new Vector2(num4, num2));
				list.Add(new Vector3(num - 0.04f, num2, num3));
				list2.Add(new Vector2(num3, num2));
				list.Add(new Vector3(num - 0.04f, num2, num3));
				list2.Add(new Vector2(num3, num2));
				list.Add(new Vector3(num - 0.04f, num2, num4));
				list2.Add(new Vector2(num4, num2));
				list.Add(new Vector3(num - 0.04f, num2, num4));
				list2.Add(new Vector2(num4, num2));
			}
			for (int k = 0; k < list.Count - 8; k += 8)
			{
				list3.Add(k);
				list3.Add(k + 8);
				list3.Add(k + 2);
				list3.Add(k + 8);
				list3.Add(k + 10);
				list3.Add(k + 2);
				list3.Add(k + 3);
				list3.Add(k + 11);
				list3.Add(k + 6);
				list3.Add(k + 11);
				list3.Add(k + 14);
				list3.Add(k + 6);
				list3.Add(k + 7);
				list3.Add(k + 15);
				list3.Add(k + 4);
				list3.Add(k + 15);
				list3.Add(k + 12);
				list3.Add(k + 4);
				list3.Add(k + 5);
				list3.Add(k + 13);
				list3.Add(k + 1);
				list3.Add(k + 13);
				list3.Add(k + 9);
				list3.Add(k + 1);
			}
			Debug.Log(Object.op_Implicit($"RecurveBow - vertices {list.Count} triangles {list3.Count}"));
			MeshFilter val3 = val.AddComponent<MeshFilter>();
			MeshRenderer obj = val.AddComponent<MeshRenderer>();
			val3.mesh.vertices = Il2CppStructArray<Vector3>.op_Implicit(list.ToArray());
			val3.mesh.triangles = Il2CppStructArray<int>.op_Implicit(list3.ToArray());
			val3.mesh.uv = Il2CppStructArray<Vector2>.op_Implicit(list2.ToArray());
			val3.mesh.RecalculateNormals();
			val3.mesh.RecalculateBounds();
			val3.mesh.RecalculateTangents();
			Debug.Log(Object.op_Implicit($"RecurveBow - mesh vertices {((Il2CppArrayBase<Vector3>)(object)val3.mesh.vertices).Length} triangles {((Il2CppArrayBase<int>)(object)val3.mesh.triangles).Length} uv {((Il2CppArrayBase<Vector2>)(object)val3.mesh.uv).Length}"));
			((Renderer)obj).sharedMaterial = new Material(Shader.Find("GTFO/Standard"));
			((Renderer)obj).sharedMaterial.shader = Shader.Find("Cell/Player/CustomGearShader");
			((Renderer)obj).sharedMaterial.SetTexture("_MainTex", (Texture)(object)Texture2D.blackTexture);
			val.transform.localScale = new Vector3(1f, 1f, 1f);
			val.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			return val;
		}
	}
	internal class BowHandlerFP : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <AnimAim>d__26 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public BowHandlerFP <>4__this;

			private float <progress>5__2;

			private Vector3 <origpos>5__3;

			private Vector3 <origeul>5__4;

			private Vector3 <maorigpos>5__5;

			private Vector3 <maorigeul>5__6;

			private float <starttime>5__7;

			private bool <animdone>5__8;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_006c: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b6: 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_00cc: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f8: 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_013d: Invalid comparison between Unknown and I4
				//IL_0140: Unknown result type (might be due to invalid IL or missing references)
				//IL_0147: Invalid comparison between Unknown and I4
				//IL_0194: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
				//IL_01ae: Invalid comparison between Unknown and I4
				//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
				//IL_01bd: Invalid comparison between Unknown and I4
				//IL_016e: 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_028b: 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_02ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
				//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
				//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_0300: Unknown result type (might be due to invalid IL or missing references)
				//IL_0316: Unknown result type (might be due to invalid IL or missing references)
				//IL_032a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0335: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				BowHandlerFP bowHandlerFP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					pPlayerData_Session session = SNet.LocalPlayer.Session;
					NetworkAPI.InvokeEvent<Plugin.BowNetInfo>("BowNetInfo", new Plugin.BowNetInfo(2, ((pPlayerData_Session)(ref session)).playerSlotIndex, bowHandlerFP.inbackabs), (SNet_ChannelType)2);
					bowHandlerFP.arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.6f);
					bowHandlerFP.animname = "Aim";
					bowHandlerFP.nextanim = "";
					bowHandlerFP.animrunning = true;
					bowHandlerFP.animneedsbreak = false;
					<progress>5__2 = 0f;
					<origpos>5__3 = ((Item)bowHandlerFP.weapon).LeftHandGripTrans.localPosition;
					<origeul>5__4 = ((Item)bowHandlerFP.weapon).LeftHandGripTrans.localEulerAngles;
					<maorigpos>5__5 = ((Component)bowHandlerFP.meleealign).transform.localPosition;
					<maorigeul>5__6 = ((Component)bowHandlerFP.meleealign).transform.localEulerAngles;
					bowHandlerFP.plr.FPSCamera.OverrideFieldOfView((float)((ItemEquippable)bowHandlerFP.weapon).ItemFPSData.ItemCameraFOVZoom);
					<starttime>5__7 = Time.time;
					<animdone>5__8 = false;
					goto IL_0130;
				}
				case 1:
					<>1__state = -1;
					goto IL_0130;
				case 2:
					{
						<>1__state = -1;
						return false;
					}
					IL_0130:
					if ((((int)bowHandlerFP.weapon.CurrentStateName == 13) | ((int)bowHandlerFP.prevstate != 13)) && InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0) && Time.time - bowHandlerFP.shoveTime > 1.5f)
					{
						bowHandlerFP.prevstate = (eMeleeWeaponState)1;
						bowHandlerFP.animname = "Shove";
						CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(bowHandlerFP.AnimShove()), (Action)null);
						return false;
					}
					bowHandlerFP.prevstate = (eMeleeWeaponState)1;
					if (bowHandlerFP.clipabs == 1 && (((int)bowHandlerFP.weapon.CurrentStateName == 7) | ((int)bowHandlerFP.weapon.CurrentStateName == 9)))
					{
						bowHandlerFP.nextanim = "ChargeArrow";
						bowHandlerFP.animneedsbreak = true;
						bowHandlerFP.animrunning = false;
						return false;
					}
					if (bowHandlerFP.animneedsbreak | !InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0))
					{
						bowHandlerFP.animrunning = false;
						bowHandlerFP.animname = "";
						bowHandlerFP.nextanim = "Idle";
						return false;
					}
					if (<progress>5__2 < 1f)
					{
						<progress>5__2 = (Time.time - <starttime>5__7) * 4f;
					}
					if (!<animdone>5__8 && <progress>5__2 >= 1f)
					{
						<animdone>5__8 = true;
						<progress>5__2 = 0.99999f;
					}
					if (<progress>5__2 < 1f)
					{
						((Component)bowHandlerFP.meleealign).transform.localPosition = Vector3.Lerp(<maorigpos>5__5, new Vector3(0.26f, 0.14f, -0.285f), <progress>5__2);
						((Component)bowHandlerFP.meleealign).transform.localEulerAngles = Vector3.Lerp(<maorigeul>5__6, new Vector3(333f, 334f, 258f), <progress>5__2);
						((Item)bowHandlerFP.weapon).LeftHandGripTrans.localPosition = Vector3.Lerp(<origpos>5__3, new Vector3(0.22f, 0.145f, -0.37f), <progress>5__2);
						((Item)bowHandlerFP.weapon).LeftHandGripTrans.localEulerAngles = Vector3.Lerp(<origeul>5__4, new Vector3(24f, 92f, 333f), <progress>5__2);
					}
					<>2__current = null;
					<>1__state = 1;
					return true;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerFP <>4__this;

			private float <aimstarttime>5__2;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_0039: Unknown result type (might be due to invalid IL or missing references)
				//IL_008e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0095: Invalid comparison between Unknown and I4
				//IL_009d: Unknown result type (might be due to invalid IL or missing references)
				//IL_00a4: Invalid comparison between Unknown and I4
				//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ee: Invalid comparison between Unknown and I4
				//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
				//IL_00fd: Invalid comparison between Unknown and I4
				//IL_0106: Unknown result type (might be due to invalid IL or missing references)
				//IL_010c: Invalid comparison between Unknown and I4
				//IL_0115: Unknown result type (might be due to invalid IL or missing references)
				//IL_011b: Invalid comparison between Unknown and I4
				//IL_0124: Unknown result type (might be due to invalid IL or missing references)
				//IL_012a: Invalid comparison between Unknown and I4
				//IL_0133: Unknown result type (might be due to invalid IL or missing references)
				//IL_0139: Invalid comparison between Unknown and I4
				//IL_0142: Unknown result type (might be due to invalid IL or missing references)
				//IL_0148: Invalid comparison between Unknown and I4
				//IL_0151: Unknown result type (might be due to invalid IL or missing references)
				//IL_0158: Invalid comparison between Unknown and I4
				//IL_0161: Unknown result type (might be due to invalid IL or missing references)
				//IL_0167: Invalid comparison between Unknown and I4
				//IL_0170: Unknown result type (might be due to invalid IL or missing references)
				//IL_0176: Invalid comparison between Unknown and I4
				//IL_017f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0185: Invalid comparison between Unknown and I4
				//IL_018e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0194: Invalid comparison between Unknown and I4
				//IL_00b5: 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_0203: Unknown result type (might be due to invalid IL or missing references)
				//IL_0227: Unknown result type (might be due to invalid IL or missing references)
				//IL_024b: Unknown result type (might be due to invalid IL or missing references)
				//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				BowHandlerFP bowHandlerFP = <>4__this;
				float num2;
				float num3;
				switch (num)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					pPlayerData_Session session = SNet.LocalPlayer.Session;
					NetworkAPI.InvokeEvent<Plugin.BowNetInfo>("BowNetInfo", new Plugin.BowNetInfo(4, ((pPlayerData_Session)(ref session)).playerSlotIndex, bowHandlerFP.inbackabs), (SNet_ChannelType)2);
					bowHandlerFP.animname = "ChargeArrow";
					bowHandlerFP.nextanim = "";
					bowHandlerFP.animrunning = true;
					bowHandlerFP.animneedsbreak = false;
					<aimstarttime>5__2 = Time.time;
					bowHandlerFP.arrowshouldfire = true;
					goto IL_0088;
				}
				case 1:
					<>1__state = -1;
					goto IL_0088;
				case 2:
					{
						<>1__state = -1;
						return false;
					}
					IL_0088:
					if (((int)bowHandlerFP.weapon.CurrentStateName == 14) | ((int)bowHandlerFP.weapon.CurrentStateName == 15) | InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0))
					{
						bowHandlerFP.prevstate = (eMeleeWeaponState)13;
						bowHandlerFP.weapon.ChangeState((eMeleeWeaponState)1);
						bowHandlerFP.nextanim = "Aim";
						bowHandlerFP.animneedsbreak = true;
						bowHandlerFP.animrunning = false;
						return false;
					}
					if (((int)bowHandlerFP.weapon.CurrentStateName == 11) | ((int)bowHandlerFP.weapon.CurrentStateName == 12) | ((int)bowHandlerFP.weapon.CurrentStateName == 5) | ((int)bowHandlerFP.weapon.CurrentStateName == 6) | ((int)bowHandlerFP.weapon.CurrentStateName == 3) | ((int)bowHandlerFP.weapon.CurrentStateName == 4) | ((int)bowHandlerFP.weapon.CurrentStateName == 8) | ((int)bowHandlerFP.weapon.CurrentStateName == 10) | ((int)bowHandlerFP.weapon.CurrentStateName == 5) | ((int)bowHandlerFP.weapon.CurrentStateName == 6) | ((int)bowHandlerFP.weapon.CurrentStateName == 3) | ((int)bowHandlerFP.weapon.CurrentStateName == 4))
					{
						bowHandlerFP.nextanim = "Aim";
						bowHandlerFP.animneedsbreak = true;
						bowHandlerFP.animrunning = false;
						return false;
					}
					if (bowHandlerFP.animneedsbreak)
					{
						bowHandlerFP.animrunning = false;
						return false;
					}
					((Component)bowHandlerFP.meleealign).transform.localPosition = new Vector3(0.26f, 0.14f, -0.285f);
					((Component)bowHandlerFP.meleealign).transform.localEulerAngles = new Vector3(333f, 334f, 258f);
					((Item)bowHandlerFP.weapon).LeftHandGripTrans.localPosition = new Vector3(0.22f, 0.145f, -0.37f);
					((Item)bowHandlerFP.weapon).LeftHandGripTrans.localEulerAngles = new Vector3(24f, 92f, 333f);
					num2 = (Time.time - <aimstarttime>5__2) / ((ItemEquippable)bowHandlerFP.weapon).MeleeAnimationData.MaxDamageChargeTime;
					if (num2 > 1f)
					{
						num2 = 1f;
					}
					num3 = num2 * 1.7f;
					bowHandlerFP.arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.6f - num3);
					<>2__current = null;
					<>1__state = 1;
					return true;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerFP <>4__this;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0069: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Invalid comparison between Unknown and I4
				//IL_0078: Unknown result type (might be due to invalid IL or missing references)
				//IL_007f: Invalid comparison between Unknown and I4
				//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ea: Invalid comparison between Unknown and I4
				//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f9: Invalid comparison between Unknown and I4
				//IL_0102: Unknown result type (might be due to invalid IL or missing references)
				//IL_0108: Invalid comparison between Unknown and I4
				//IL_0111: Unknown result type (might be due to invalid IL or missing references)
				//IL_0117: Invalid comparison between Unknown and I4
				//IL_0120: Unknown result type (might be due to invalid IL or missing references)
				//IL_0126: Invalid comparison between Unknown and I4
				//IL_012f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0135: Invalid comparison between Unknown and I4
				//IL_013e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0144: Invalid comparison between Unknown and I4
				//IL_014d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0154: Invalid comparison between Unknown and I4
				//IL_0098: Unknown result type (might be due to invalid IL or missing references)
				//IL_009d: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				BowHandlerFP bowHandlerFP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					bowHandlerFP.plr.FPSCamera.OverrideFieldOfView(bowHandlerFP.origfov);
					bowHandlerFP.animname = "ChargeMelee";
					bowHandlerFP.nextanim = "";
					bowHandlerFP.animrunning = true;
					bowHandlerFP.animneedsbreak = false;
					goto IL_0063;
				case 1:
					<>1__state = -1;
					goto IL_0063;
				case 2:
					{
						<>1__state = -1;
						return false;
					}
					IL_0063:
					if (((int)bowHandlerFP.weapon.CurrentStateName == 14) | ((int)bowHandlerFP.weapon.CurrentStateName == 15) | InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0))
					{
						pPlayerData_Session session = SNet.LocalPlayer.Session;
						NetworkAPI.InvokeEvent<Plugin.BowNetInfo>("BowNetInfo", new Plugin.BowNetInfo(0, ((pPlayerData_Session)(ref session)).playerSlotIndex, bowHandlerFP.inbackabs), (SNet_ChannelType)2);
						bowHandlerFP.weapon.ChangeState((eMeleeWeaponState)1);
						bowHandlerFP.nextanim = "Idle";
						bowHandlerFP.animneedsbreak = true;
						bowHandlerFP.animrunning = false;
						return false;
					}
					if (((int)bowHandlerFP.weapon.CurrentStateName == 11) | ((int)bowHandlerFP.weapon.CurrentStateName == 12) | ((int)bowHandlerFP.weapon.CurrentStateName == 5) | ((int)bowHandlerFP.weapon.CurrentStateName == 6) | ((int)bowHandlerFP.weapon.CurrentStateName == 3) | ((int)bowHandlerFP.weapon.CurrentStateName == 4) | ((int)bowHandlerFP.weapon.CurrentStateName == 8) | ((int)bowHandlerFP.weapon.CurrentStateName == 10))
					{
						CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(bowHandlerFP.AnimShove()), (Action)null);
						return false;
					}
					if (bowHandlerFP.animneedsbreak)
					{
						bowHandlerFP.animrunning = false;
						return false;
					}
					<>2__current = null;
					<>1__state = 1;
					return true;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerFP <>4__this;

			private float <starttime>5__2;

			private bool <animdone>5__3;

			private float <progress>5__4;

			private Vector3 <origpos>5__5;

			private Vector3 <origeul>5__6;

			private Vector3 <maorigpos>5__7;

			private Vector3 <maorigeul>5__8;

			private Vector3 <origrpos>5__9;

			private Vector3 <origreul>5__10;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0043: Unknown result type (might be due to invalid IL or missing references)
				//IL_006e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0073: Unknown result type (might be due to invalid IL or missing references)
				//IL_0112: Unknown result type (might be due to invalid IL or missing references)
				//IL_0117: Unknown result type (might be due to invalid IL or missing references)
				//IL_0128: Unknown result type (might be due to invalid IL or missing references)
				//IL_012d: Unknown result type (might be due to invalid IL or missing references)
				//IL_013e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0143: Unknown result type (might be due to invalid IL or missing references)
				//IL_0154: Unknown result type (might be due to invalid IL or missing references)
				//IL_0159: Unknown result type (might be due to invalid IL or missing references)
				//IL_016a: Unknown result type (might be due to invalid IL or missing references)
				//IL_016f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0180: Unknown result type (might be due to invalid IL or missing references)
				//IL_0185: Unknown result type (might be due to invalid IL or missing references)
				//IL_0190: Unknown result type (might be due to invalid IL or missing references)
				//IL_0196: Invalid comparison between Unknown and I4
				//IL_019e: Unknown result type (might be due to invalid IL or missing references)
				//IL_01a5: Invalid comparison between Unknown and I4
				//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_01cb: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d2: Invalid comparison between Unknown and I4
				//IL_0209: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_01dc: Invalid comparison between Unknown and I4
				//IL_0299: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
				//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
				//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
				//IL_0303: Unknown result type (might be due to invalid IL or missing references)
				//IL_0317: Unknown result type (might be due to invalid IL or missing references)
				//IL_0322: Unknown result type (might be due to invalid IL or missing references)
				//IL_0338: Unknown result type (might be due to invalid IL or missing references)
				//IL_034c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0357: Unknown result type (might be due to invalid IL or missing references)
				//IL_036d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0381: Unknown result type (might be due to invalid IL or missing references)
				//IL_038c: 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_03b6: 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)
				int num = <>1__state;
				BowHandlerFP bowHandlerFP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
				{
					<>1__state = -1;
					bowHandlerFP.arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.6f);
					bowHandlerFP.plr.FPSCamera.OverrideFieldOfView(bowHandlerFP.origfov);
					pPlayerData_Session session = SNet.LocalPlayer.Session;
					NetworkAPI.InvokeEvent<Plugin.BowNetInfo>("BowNetInfo", new Plugin.BowNetInfo(0, ((pPlayerData_Session)(ref session)).playerSlotIndex, bowHandlerFP.inbackabs), (SNet_ChannelType)2);
					if (bowHandlerFP.clipabs == 0 && bowHandlerFP.inbackabs == 0)
					{
						session = SNet.LocalPlayer.Session;
						NetworkAPI.InvokeEvent<Plugin.BowNetInfo>("BowNetInfo", new Plugin.BowNetInfo(6, ((pPlayerData_Session)(ref session)).playerSlotIndex, bowHandlerFP.inbackabs), (SNet_ChannelType)2);
					}
					bowHandlerFP.animname = "Idle";
					bowHandlerFP.nextanim = "";
					bowHandlerFP.animrunning = true;
					bowHandlerFP.animneedsbreak = false;
					<starttime>5__2 = Time.time;
					<animdone>5__3 = false;
					<progress>5__4 = 0f;
					<origpos>5__5 = ((Item)bowHandlerFP.weapon).LeftHandGripTrans.localPosition;
					<origeul>5__6 = ((Item)bowHandlerFP.weapon).LeftHandGripTrans.localEulerAngles;
					<maorigpos>5__7 = ((Component)bowHandlerFP.meleealign).transform.localPosition;
					<maorigeul>5__8 = ((Component)bowHandlerFP.meleealign).transform.localEulerAngles;
					<origrpos>5__9 = ((Item)bowHandlerFP.weapon).RightHandGripTrans.localPosition;
					<origreul>5__10 = ((Item)bowHandlerFP.weapon).RightHandGripTrans.localEulerAngles;
					goto IL_018a;
				}
				case 1:
					<>1__state = -1;
					goto IL_018a;
				case 2:
					{
						<>1__state = -1;
						return false;
					}
					IL_018a:
					if (((int)bowHandlerFP.weapon.CurrentStateName == 7) | ((int)bowHandlerFP.weapon.CurrentStateName == 9))
					{
						bowHandlerFP.nextanim = "ChargeMelee";
						bowHandlerFP.animneedsbreak = true;
						bowHandlerFP.animrunning = false;
						return false;
					}
					if ((int)bowHandlerFP.weapon.CurrentStateName == 13 && (int)bowHandlerFP.prevstate != 13 && InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0))
					{
						bowHandlerFP.animname = "Shove";
						CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(bowHandlerFP.AnimShove()), (Action)null);
						return false;
					}
					bowHandlerFP.prevstate = (eMeleeWeaponState)1;
					if (bowHandlerFP.animneedsbreak)
					{
						bowHandlerFP.animrunning = false;
						bowHandlerFP.animname = "";
						return false;
					}
					if (<progress>5__4 < 1f)
					{
						<progress>5__4 = (Time.time - <starttime>5__2) * 4f;
					}
					if (!<animdone>5__3 & (<progress>5__4 >= 1f))
					{
						<animdone>5__3 = true;
						<progress>5__4 = 0.99999f;
					}
					if (<progress>5__4 < 1f)
					{
						((Component)bowHandlerFP.meleealign).transform.localPosition = Vector3.Lerp(<maorigpos>5__7, new Vector3(0.14f, 0.2f, -0.2f), <progress>5__4);
						((Component)bowHandlerFP.meleealign).transform.localEulerAngles = Vector3.Lerp(<maorigeul>5__8, new Vector3(335f, 340f, 216f), <progress>5__4);
						((Item)bowHandlerFP.weapon).LeftHandGripTrans.localPosition = Vector3.Lerp(<origpos>5__5, new Vector3(0.11f, 0.2f, -0.29f), <progress>5__4);
						((Item)bowHandlerFP.weapon).LeftHandGripTrans.localEulerAngles = Vector3.Lerp(<origeul>5__6, new Vector3(42f, 92f, 333f), <progress>5__4);
						((Item)bowHandlerFP.weapon).RightHandGripTrans.localPosition = Vector3.Lerp(<origrpos>5__9, new Vector3(-0.26f, 0f, -0.53f), <progress>5__4);
						((Item)bowHandlerFP.weapon).RightHandGripTrans.localEulerAngles = Vector3.Lerp(<origreul>5__10, new Vector3(36f, 64f, 327f), <progress>5__4);
					}
					<>2__current = null;
					<>1__state = 1;
					return true;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerFP <>4__this;

			private float <progress>5__2;

			private Vector3 <origpos>5__3;

			private Vector3 <origeul>5__4;

			private float <starttime>5__5;

			private bool <animdone>5__6;

			private Vector3 <newpos>5__7;

			private Vector3 <neweul>5__8;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//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_01f5: Unknown result type (might be due to invalid IL or missing references)
				//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
				//IL_0049: Unknown result type (might be due to invalid IL or missing references)
				//IL_004e: Unknown result type (might be due to invalid IL or missing references)
				//IL_007e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0083: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Unknown result type (might be due to invalid IL or missing references)
				//IL_0099: Unknown result type (might be due to invalid IL or missing references)
				//IL_036a: Unknown result type (might be due to invalid IL or missing references)
				//IL_036f: Unknown result type (might be due to invalid IL or missing references)
				//IL_011f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0133: Unknown result type (might be due to invalid IL or missing references)
				//IL_013e: 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_016d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0178: Unknown result type (might be due to invalid IL or missing references)
				//IL_0269: 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_0288: Unknown result type (might be due to invalid IL or missing references)
				//IL_029e: Unknown result type (might be due to invalid IL or missing references)
				//IL_02b2: Unknown result type (might be due to invalid IL or missing references)
				//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				BowHandlerFP bowHandlerFP = <>4__this;
				pPlayerData_Session session;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (bowHandlerFP.reloadrunning)
					{
						return false;
					}
					bowHandlerFP.reloadrunning = true;
					session = SNet.LocalPlayer.Session;
					NetworkAPI.InvokeEvent<Plugin.BowNetInfo>("BowNetInfo", new Plugin.BowNetInfo(1, ((pPlayerData_Session)(ref session)).playerSlotIndex, bowHandlerFP.inbackabs), (SNet_ChannelType)2);
					<progress>5__2 = 0f;
					<origpos>5__3 = ((Item)bowHandlerFP.weapon).RightHandGripTrans.localPosition;
					<origeul>5__4 = ((Item)bowHandlerFP.weapon).RightHandGripTrans.localEulerAngles;
					<starttime>5__5 = Time.time;
					<animdone>5__6 = false;
					goto IL_0199;
				case 1:
					<>1__state = -1;
					goto IL_0199;
				case 2:
					<>1__state = -1;
					goto IL_02de;
				case 3:
					{
						<>1__state = -1;
						return false;
					}
					IL_02de:
					if (!<animdone>5__6)
					{
						if (<progress>5__2 < 1f)
						{
							<progress>5__2 = (Time.time - <starttime>5__5) * 2f;
						}
						if (!<animdone>5__6 && <progress>5__2 >= 1f)
						{
							<animdone>5__6 = true;
							<progress>5__2 = 0.99999f;
						}
						if (<progress>5__2 < 1f)
						{
							((Item)bowHandlerFP.weapon).RightHandGripTrans.localPosition = Vector3.Lerp(<newpos>5__7, new Vector3(-0.26f, 0f, -0.53f), <progress>5__2);
							((Item)bowHandlerFP.weapon).RightHandGripTrans.localEulerAngles = Vector3.Lerp(<neweul>5__8, new Vector3(36f, 64f, 327f), <progress>5__2);
						}
						<>2__current = null;
						<>1__state = 2;
						return true;
					}
					try
					{
						bowHandlerFP.handarrow.SetActive(false);
					}
					catch (Exception)
					{
					}
					bowHandlerFP.arrow.SetActive(true);
					if (bowHandlerFP.inbackabs > 0)
					{
						bowHandlerFP.inbackabs += -1;
					}
					bowHandlerFP.clipabs = 1;
					bowHandlerFP.inbackrel = (float)bowHandlerFP.inbackabs / (float)bowHandlerFP.inbackmax;
					GuiManager.PlayerLayer.Inventory.SetSlotAmmo((InventorySlot)10, 1, bowHandlerFP.inbackabs, bowHandlerFP.inbackrel);
					bowHandlerFP.reloadrunning = false;
					session = SNet.LocalPlayer.Session;
					NetworkAPI.InvokeEvent<Plugin.BowNetInfo>("BowNetInfo", new Plugin.BowNetInfo(2, ((pPlayerData_Session)(ref session)).playerSlotIndex, bowHandlerFP.inbackabs), (SNet_ChannelType)2);
					<>2__current = null;
					<>1__state = 3;
					return true;
					IL_0199:
					if (!<animdone>5__6)
					{
						if (<progress>5__2 < 1f)
						{
							<progress>5__2 = (Time.time - <starttime>5__5) * 2f;
						}
						if (!<animdone>5__6 && <progress>5__2 >= 1f)
						{
							<animdone>5__6 = true;
							<progress>5__2 = 0.99999f;
						}
						if (<progress>5__2 < 1f)
						{
							((Component)((Item)bowHandlerFP.weapon).RightHandGripTrans).transform.localPosition = Vector3.Lerp(<origpos>5__3, new Vector3(1.04f, -0.1f, 1.47f), <progress>5__2);
							((Component)((Item)bowHandlerFP.weapon).RightHandGripTrans).transform.localEulerAngles = Vector3.Lerp(<origeul>5__4, new Vector3(36f, 90f, 327f), <progress>5__2);
						}
						<>2__current = null;
						<>1__state = 1;
						return true;
					}
					try
					{
						bowHandlerFP.handarrow.SetActive(true);
					}
					catch (Exception)
					{
					}
					<animdone>5__6 = false;
					<progress>5__2 = 0f;
					<starttime>5__5 = Time.time;
					<newpos>5__7 = ((Item)bowHandlerFP.weapon).RightHandGripTrans.localPosition;
					<neweul>5__8 = ((Item)bowHandlerFP.weapon).RightHandGripTrans.localEulerAngles;
					goto IL_02de;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerFP <>4__this;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_008d: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
				//IL_011d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0141: 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_015b: Expected O, but got Unknown
				int num = <>1__state;
				BowHandlerFP bowHandlerFP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					bowHandlerFP.animrunning = true;
					bowHandlerFP.animname = "Shove";
					bowHandlerFP.prevstate = (eMeleeWeaponState)13;
					bowHandlerFP.plr.FPSCamera.OverrideFieldOfView(bowHandlerFP.origfov);
					Debug.Log(Object.op_Implicit("RecurveBow - shove coroutine"));
					bowHandlerFP.shoveTime = Time.time;
					((Component)bowHandlerFP.meleealign).transform.localPosition = new Vector3(0.14f, 0.3f, -0.1f);
					((Component)bowHandlerFP.meleealign).transform.localEulerAngles = new Vector3(335f, 340f, 216f);
					((Item)bowHandlerFP.weapon).LeftHandGripTrans.localPosition = new Vector3(0.11f, 0.3f, -0.19f);
					((Item)bowHandlerFP.weapon).LeftHandGripTrans.localEulerAngles = new Vector3(42f, 92f, 333f);
					((Item)bowHandlerFP.weapon).RightHandGripTrans.localPosition = new Vector3(0.17f, 0.13f, -0.15f);
					((Item)bowHandlerFP.weapon).RightHandGripTrans.localEulerAngles = new Vector3(36f, 64f, 327f);
					<>2__current = (object)new WaitForSeconds(0.25f);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					bowHandlerFP.nextanim = "Idle";
					bowHandlerFP.animneedsbreak = false;
					bowHandlerFP.animrunning = false;
					<>2__current = null;
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					return false;
				}
			}

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

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

		public bool arrowshouldfire;

		private eMeleeWeaponState prevstate;

		public bool animneedsbreak;

		public bool animrunning;

		private string animname = "Idle";

		public string nextanim = "";

		private MeleeWeaponFirstPerson weapon;

		private PlayerAgent plr;

		public bool started;

		private MWS_Base mystate = new MWS_Base();

		private GameObject sight;

		private Transform meleealign = new Transform();

		private Texture2D bowpic2 = new Texture2D(512, 512);

		private float origfov;

		public GameObject arrow = new GameObject();

		public GameObject handarrow = new GameObject();

		private float shoveTime;

		public int inbackabs = Plugin._BowMaxAmmo;

		public int clipabs;

		public float inbackrel;

		public int inbackmax = Plugin._BowMaxAmmo;

		private bool reloadrunning;

		private void Awake()
		{
			string path = Path.Combine(Paths.ConfigPath, "../Assets/RecurveBow/recurvebowcamo.png");
			if (File.Exists(path))
			{
				Debug.Log(Object.op_Implicit("RecurveBow - loading bow texture from file recurvebowcamo.png"));
				byte[] array = File.ReadAllBytes(path);
				ImageConversion.LoadImage(bowpic2, Il2CppStructArray<byte>.op_Implicit(array));
				bowpic2.Apply();
				Object.DontDestroyOnLoad((Object)(object)bowpic2);
			}
			((Object)bowpic2).hideFlags = (HideFlags)61;
		}

		public void BeginGame()
		{
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: 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_025b: Unknown result type (might be due to invalid IL or missing references)
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0360: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c9: Expected O, but got Unknown
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0473: Unknown result type (might be due to invalid IL or missing references)
			weapon = ((Component)this).GetComponent<MeleeWeaponFirstPerson>();
			if ((Object)(object)weapon == (Object)null || (Object)(object)((Component)this).GetComponentInParent<FirstPersonItemHolder>() == (Object)null)
			{
				return;
			}
			plr = ((Item)weapon).Owner;
			foreach (Transform componentsInChild in ((Component)weapon).GetComponentsInChildren<Transform>())
			{
				if (((Object)componentsInChild).name == "melee_align")
				{
					meleealign = componentsInChild;
				}
			}
			((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localScale = new Vector3(1f, 1f, 1f);
			((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localPosition = new Vector3(0f, 0.1f, 0f);
			((ItemEquippable)weapon).GearPartHolder.SightPart.transform.localEulerAngles = new Vector3(0f, 0f, 90f);
			((Component)meleealign).transform.localPosition = new Vector3(0.14f, 0.2f, -0.2f);
			((Component)meleealign).transform.localEulerAngles = new Vector3(335f, 340f, 216f);
			((Behaviour)((Component)weapon).GetComponentInChildren<Animator>()).enabled = false;
			((ItemEquippable)weapon).StopAnimationSequenceCoroutine();
			origfov = CellSettingsManager.SettingsData.Video.Fov.Value;
			string path = Path.Combine(Paths.ConfigPath, "../Assets/RecurveBow/recurvebowcamo.png");
			if (File.Exists(path))
			{
				((Renderer)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren<MeshRenderer>()).sharedMaterial.SetTexture("_MainTex", (Texture)(object)bowpic2);
			}
			if (!File.Exists(path))
			{
				Debug.Log(Object.op_Implicit("RecurveBow - cant find bow texture"));
			}
			GameObject val = Object.Instantiate<GameObject>(AssetAPI.GetLoadedAsset<GameObject>("Assets/AssetPrefabs/Items/Gear/Parts/Melee/Heads/Head_Knife_1.prefab"));
			((Object)val).name = "Bow_Knife_Attachment";
			val.transform.parent = ((Component)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren<MeshRenderer>()).gameObject.transform;
			val.transform.localPosition = new Vector3(0f, 0f, 0f);
			val.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
			val.transform.localScale = new Vector3(1f, 1f, 1f);
			GameObject gameObject = ((Component)val.GetComponentInChildren<MeshRenderer>()).gameObject;
			gameObject.transform.localScale = new Vector3(0.5f, 0.2f, 1.2f);
			gameObject.transform.localPosition = new Vector3(0f, 0.05f, 0f);
			gameObject.transform.localEulerAngles = new Vector3(0f, 0f, 180f);
			gameObject.layer = LayerManager.LAYER_FIRST_PERSON_ITEM;
			arrow = Object.Instantiate<GameObject>(ArrowHandler.Build(isprop: true));
			Transform transform = arrow.transform;
			Transform parent = (val.transform.parent = ((Component)((ItemEquippable)weapon).GearPartHolder.MeleeHandlePart.GetComponentInChildren<MeshRenderer>()).gameObject.transform);
			transform.parent = parent;
			arrow.transform.localEulerAngles = new Vector3(90f, 0f, 0f);
			arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.6f);
			arrow.transform.localScale = new Vector3(0.013f, 1.2839f, 0.005f);
			arrow.gameObject.SetActive(false);
			Transform parent2 = new Transform();
			foreach (Transform componentsInChild2 in ((Component)plr.FPItemHolder).GetComponentsInChildren<Transform>())
			{
				if (((Object)componentsInChild2).name == "RightIndex1")
				{
					parent2 = componentsInChild2;
				}
			}
			handarrow = Object.Instantiate<GameObject>(ArrowHandler.Build(isprop: true));
			handarrow.transform.parent = parent2;
			handarrow.transform.localEulerAngles = new Vector3(325f, 62f, 130f);
			handarrow.transform.localPosition = new Vector3(0f, 0f, 0f);
			inbackrel = (float)inbackabs / (float)inbackmax;
			GuiManager.PlayerLayer.Inventory.SetSlotAmmo((InventorySlot)10, 0, inbackabs, inbackrel);
			started = true;
		}

		private void FixedUpdate()
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Invalid comparison between Unknown and I4
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Invalid comparison between Unknown and I4
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Invalid comparison between Unknown and I4
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Invalid comparison between Unknown and I4
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_036c: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: 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)
			if (!started)
			{
				return;
			}
			if (clipabs <= 0)
			{
				arrowshouldfire = false;
				arrow.gameObject.SetActive(false);
				if (inbackabs > 0)
				{
					CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimReload()), (Action)null);
				}
			}
			if (clipabs > 0)
			{
				arrow.gameObject.SetActive(true);
			}
			if ((int)weapon.CurrentStateName == 13 && InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0) && (int)prevstate != 13)
			{
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimShove()), (Action)null);
			}
			else
			{
				if ((int)weapon.CurrentStateName == 13 && (int)prevstate == 13)
				{
					return;
				}
				if (!InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && !InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && !animrunning)
				{
					CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimIdle()), (Action)null);
				}
				else if (!InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && !InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && animrunning && animname != "Idle" && !InputMapper.GetButtonKeyMouse((InputAction)12, (eFocusState)0))
				{
					nextanim = "Idle";
					animneedsbreak = true;
				}
				else if (!InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && animrunning && animname == "Aim")
				{
					nextanim = "Idle";
					animneedsbreak = true;
				}
				else
				{
					if ((InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && animrunning && animname == "Aim") || (InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && animrunning && animname == "ChargeArrow"))
					{
						return;
					}
					if (InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && !InputMapper.GetButtonKeyMouse((InputAction)8, (eFocusState)0) && animrunning && animname != "Aim")
					{
						nextanim = "Aim";
						animneedsbreak = true;
					}
					else
					{
						if (InputMapper.GetButtonKeyMouse((InputAction)7, (eFocusState)0) && animrunning && animname == "Aim")
						{
							return;
						}
						prevstate = weapon.CurrentStateName;
						if (animrunning && animneedsbreak)
						{
							return;
						}
						if (!animrunning && animneedsbreak)
						{
							animneedsbreak = false;
						}
						if (!animrunning)
						{
							if (nextanim == "Idle")
							{
								CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimIdle()), (Action)null);
							}
							if (nextanim == "Aim")
							{
								CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimAim()), (Action)null);
							}
							if (nextanim == "ChargeMelee")
							{
								CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimChargeMelee()), (Action)null);
							}
							if (nextanim == "ChargeArrow")
							{
								CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimChargeArrow()), (Action)null);
							}
							if (nextanim == "Shove")
							{
								CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(AnimShove()), (Action)null);
							}
							((Item)weapon).LeftHandGripTrans.localPosition = new Vector3(0.11f, 0.2f, -0.29f);
							((Item)weapon).LeftHandGripTrans.localEulerAngles = new Vector3(42f, 92f, 333f);
							((Item)weapon).RightHandGripTrans.position = ((Item)weapon).LeftHandGripTrans.position - ((Item)weapon).LeftHandGripTrans.forward * 0.3f;
							nextanim = "Idle";
						}
					}
				}
			}
		}

		[IteratorStateMachine(typeof(<AnimIdle>d__25))]
		private IEnumerator AnimIdle()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <AnimIdle>d__25(0)
			{
				<>4__this = this
			};
		}

		[IteratorStateMachine(typeof(<AnimAim>d__26))]
		private IEnumerator AnimAim()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <AnimAim>d__26(0)
			{
				<>4__this = this
			};
		}

		[IteratorStateMachine(typeof(<AnimShove>d__27))]
		public IEnumerator AnimShove()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <AnimShove>d__27(0)
			{
				<>4__this = this
			};
		}

		[IteratorStateMachine(typeof(<AnimChargeMelee>d__28))]
		private IEnumerator AnimChargeMelee()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <AnimChargeMelee>d__28(0)
			{
				<>4__this = this
			};
		}

		[IteratorStateMachine(typeof(<AnimChargeArrow>d__29))]
		private IEnumerator AnimChargeArrow()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <AnimChargeArrow>d__29(0)
			{
				<>4__this = this
			};
		}

		[IteratorStateMachine(typeof(<AnimReload>d__30))]
		private IEnumerator AnimReload()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <AnimReload>d__30(0)
			{
				<>4__this = this
			};
		}
	}
	internal class BowHandlerTP : MonoBehaviour
	{
		[CompilerGenerated]
		private sealed class <AnimAim>d__42 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public BowHandlerTP <>4__this;

			private float <progress>5__2;

			private Vector3 <maorigpos>5__3;

			private Vector3 <maorigeul>5__4;

			private float <starttime>5__5;

			private bool <animdone>5__6;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_004a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0087: Unknown result type (might be due to invalid IL or missing references)
				//IL_0098: Unknown result type (might be due to invalid IL or missing references)
				//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
				//IL_00af: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c5: 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_00e6: Unknown result type (might be due to invalid IL or missing references)
				//IL_0100: Unknown result type (might be due to invalid IL or missing references)
				//IL_0177: Unknown result type (might be due to invalid IL or missing references)
				//IL_018b: 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_01ac: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
				//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				BowHandlerTP bowHandlerTP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					bowHandlerTP.aimrunning = true;
					bowHandlerTP.arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.81f);
					bowHandlerTP.animname = "Aim";
					bowHandlerTP.nextanim = "";
					bowHandlerTP.animneedsbreak = false;
					<progress>5__2 = 0f;
					_ = ((Item)bowHandlerTP.weapon).LeftHandGripTrans.localPosition;
					_ = ((Item)bowHandlerTP.weapon).LeftHandGripTrans.localEulerAngles;
					<maorigpos>5__3 = ((Component)bowHandlerTP.weapon).transform.localPosition;
					<maorigeul>5__4 = ((Component)bowHandlerTP.weapon).transform.localEulerAngles;
					_ = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localPosition;
					_ = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localEulerAngles;
					<starttime>5__5 = Time.time;
					<animdone>5__6 = false;
					bowHandlerTP.prevstate = (eMeleeWeaponState)1;
					goto IL_01ec;
				case 1:
					<>1__state = -1;
					goto IL_01ec;
				case 2:
					{
						<>1__state = -1;
						return false;
					}
					IL_01ec:
					if (bowHandlerTP.aimrunning)
					{
						if (<progress>5__2 < 1f)
						{
							<progress>5__2 = (Time.time - <starttime>5__5) * 4f;
						}
						if (!<animdone>5__6 && <progress>5__2 >= 1f)
						{
							<animdone>5__6 = true;
							<progress>5__2 = 0.99999f;
						}
						if (<progress>5__2 < 1f && !<animdone>5__6)
						{
							((Component)bowHandlerTP.weapon).transform.localPosition = Vector3.Lerp(<maorigpos>5__3, new Vector3(0.06f, 0f, 0.63f), <progress>5__2);
							((Component)bowHandlerTP.weapon).transform.localEulerAngles = Vector3.Lerp(<maorigeul>5__4, new Vector3(-7f, 355f, 335f), <progress>5__2);
						}
						<>2__current = null;
						<>1__state = 1;
						return true;
					}
					<>2__current = null;
					<>1__state = 2;
					return true;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerTP <>4__this;

			private float <progress>5__2;

			private Vector3 <origpos>5__3;

			private Vector3 <arroworigpos>5__4;

			private float <starttime>5__5;

			private bool <animdone>5__6;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_006b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0070: Unknown result type (might be due to invalid IL or missing references)
				//IL_0080: Unknown result type (might be due to invalid IL or missing references)
				//IL_0092: Unknown result type (might be due to invalid IL or missing references)
				//IL_0097: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
				//IL_011f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0133: Unknown result type (might be due to invalid IL or missing references)
				//IL_013e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0154: Unknown result type (might be due to invalid IL or missing references)
				//IL_0168: Unknown result type (might be due to invalid IL or missing references)
				//IL_0173: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				BowHandlerTP bowHandlerTP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					bowHandlerTP.chargearrowrunning = true;
					bowHandlerTP.animname = "ChargeArrow";
					bowHandlerTP.nextanim = "";
					bowHandlerTP.animrunning = true;
					bowHandlerTP.animneedsbreak = false;
					<progress>5__2 = 0f;
					<origpos>5__3 = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localPosition;
					_ = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localEulerAngles;
					<arroworigpos>5__4 = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localPosition;
					<starttime>5__5 = Time.time;
					<animdone>5__6 = false;
					goto IL_0194;
				case 1:
					<>1__state = -1;
					goto IL_0194;
				case 2:
					{
						<>1__state = -1;
						return false;
					}
					IL_0194:
					if (!<animdone>5__6)
					{
						bowHandlerTP.prevstate = (eMeleeWeaponState)1;
						if (<progress>5__2 < 1f)
						{
							<progress>5__2 = (Time.time - <starttime>5__5) * 4f;
						}
						if (!<animdone>5__6 && <progress>5__2 >= 1f)
						{
							<animdone>5__6 = true;
							<progress>5__2 = 0.99999f;
						}
						if (<progress>5__2 < 1f)
						{
							((Item)bowHandlerTP.weapon).RightHandGripTrans.localPosition = Vector3.Lerp(<origpos>5__3, new Vector3(0.04f, 0.1f, -0.63f), <progress>5__2);
							bowHandlerTP.arrow.transform.localPosition = Vector3.Lerp(<arroworigpos>5__4, new Vector3(-0.03f, 0.03f, -0.39f), <progress>5__2);
						}
						<>2__current = null;
						<>1__state = 1;
						return true;
					}
					<>2__current = null;
					<>1__state = 2;
					return true;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerTP <>4__this;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				int num = <>1__state;
				BowHandlerTP bowHandlerTP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					bowHandlerTP.animname = "ChargeMelee";
					bowHandlerTP.nextanim = "";
					bowHandlerTP.animrunning = true;
					bowHandlerTP.animneedsbreak = false;
					<>2__current = null;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerTP <>4__this;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0050: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_0098: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				BowHandlerTP bowHandlerTP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					bowHandlerTP.aimrunning = false;
					bowHandlerTP.reloadrunning = false;
					bowHandlerTP.chargearrowrunning = false;
					((Component)bowHandlerTP.weapon).transform.localPosition = new Vector3(0.06f, -0.2f, 0.63f);
					((Component)bowHandlerTP.weapon).transform.localEulerAngles = new Vector3(13f, 347f, 300f);
					bowHandlerTP.arrow.transform.localPosition = new Vector3(-0.03f, 0.03f, 0.81f);
					bowHandlerTP.righthand.localPosition = new Vector3(0.04f, 0.1f, -0.23f);
					<>2__current = null;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					return false;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerTP <>4__this;

			private float <progress>5__2;

			private Vector3 <origpos>5__3;

			private Vector3 <origeul>5__4;

			private float <starttime>5__5;

			private bool <animdone>5__6;

			private Vector3 <newpos>5__7;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
				//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
				//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
				//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
				//IL_0074: Unknown result type (might be due to invalid IL or missing references)
				//IL_0079: Unknown result type (might be due to invalid IL or missing references)
				//IL_008a: Unknown result type (might be due to invalid IL or missing references)
				//IL_008f: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
				//IL_013e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0152: Unknown result type (might be due to invalid IL or missing references)
				//IL_015d: Unknown result type (might be due to invalid IL or missing references)
				//IL_025f: Unknown result type (might be due to invalid IL or missing references)
				//IL_0265: Unknown result type (might be due to invalid IL or missing references)
				//IL_0270: Unknown result type (might be due to invalid IL or missing references)
				int num = <>1__state;
				BowHandlerTP bowHandlerTP = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					if (bowHandlerTP.reloadrunning)
					{
						return false;
					}
					bowHandlerTP.chargearrowrunning = false;
					if (bowHandlerTP.inbackabs < 1)
					{
						bowHandlerTP.arrowshouldfire = false;
						bowHandlerTP.StartIdle();
						return false;
					}
					bowHandlerTP.reloadrunning = true;
					<progress>5__2 = 0f;
					<origpos>5__3 = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localPosition;
					<origeul>5__4 = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localEulerAngles;
					<starttime>5__5 = Time.time;
					<animdone>5__6 = false;
					((Component)((Item)bowHandlerTP.weapon).RightHandGripTrans).transform.localEulerAngles = new Vector3(180f, 0f, 0f);
					goto IL_017e;
				case 1:
					<>1__state = -1;
					goto IL_017e;
				case 2:
					<>1__state = -1;
					goto IL_0291;
				case 3:
					{
						<>1__state = -1;
						return false;
					}
					IL_017e:
					if (!<animdone>5__6)
					{
						if (<progress>5__2 < 1f)
						{
							<progress>5__2 = (Time.time - <starttime>5__5) * 2f;
						}
						if (!<animdone>5__6 && <progress>5__2 >= 1f)
						{
							<animdone>5__6 = true;
							<progress>5__2 = 0.99999f;
						}
						if (<progress>5__2 < 1f)
						{
							((Component)((Item)bowHandlerTP.weapon).RightHandGripTrans).transform.localPosition = Vector3.Lerp(<origpos>5__3, new Vector3(-0.16f, 0.2f, -0.73f), <progress>5__2);
						}
						<>2__current = null;
						<>1__state = 1;
						return true;
					}
					try
					{
						bowHandlerTP.handarrow.SetActive(true);
					}
					catch (Exception)
					{
					}
					<animdone>5__6 = false;
					<progress>5__2 = 0f;
					<starttime>5__5 = Time.time;
					<newpos>5__7 = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localPosition;
					_ = ((Item)bowHandlerTP.weapon).RightHandGripTrans.localEulerAngles;
					((Item)bowHandlerTP.weapon).RightHandGripTrans.localEulerAngles = <origeul>5__4;
					goto IL_0291;
					IL_0291:
					if (!<animdone>5__6)
					{
						if (<progress>5__2 < 1f)
						{
							<progress>5__2 = (Time.time - <starttime>5__5) * 2f;
						}
						if (!<animdone>5__6 && <progress>5__2 >= 1f)
						{
							<animdone>5__6 = true;
							<progress>5__2 = 0.99999f;
						}
						if (<progress>5__2 < 1f)
						{
							((Item)bowHandlerTP.weapon).RightHandGripTrans.localPosition = Vector3.Lerp(<newpos>5__7, <origpos>5__3, <progress>5__2);
						}
						<>2__current = null;
						<>1__state = 2;
						return true;
					}
					try
					{
						bowHandlerTP.handarrow.SetActive(false);
					}
					catch (Exception)
					{
					}
					bowHandlerTP.arrow.SetActive(true);
					bowHandlerTP.arrowloaded = true;
					if (bowHandlerTP.inbackabs > 0)
					{
						bowHandlerTP.inbackabs--;
					}
					bowHandlerTP.clipabs = 1;
					bowHandlerTP.inbackrel = (float)bowHandlerTP.inbackabs / (float)bowHandlerTP.inbackmax;
					bowHandlerTP.reloadrunning = false;
					<>2__current = null;
					<>1__state = 3;
					return true;
				}
			}

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

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

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

			private object <>2__current;

			public BowHandlerTP <>4__this;

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

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

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

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0068: Unknown result type (might be due to invalid IL or missing references)
				//IL_008c: Unknown result type (might be due to invalid IL or missing references)
				//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
				//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
				/