Decompiled source of AssassinMod v1.3.2

AssassinMod.dll

Decompiled 5 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AncientScepter;
using AssassinMod.Components;
using AssassinMod.Modules;
using AssassinMod.Modules.Achievements;
using AssassinMod.Modules.Characters;
using AssassinMod.Modules.Survivors;
using AssassinMod.SkillStates;
using AssassinMod.SkillStates.Assassin;
using AssassinMod.SkillStates.BaseStates;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EmotesAPI;
using EntityStates;
using EntityStates.Commando;
using HG;
using HG.BlendableTypes;
using On.RoR2;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.ContentManagement;
using RoR2.Projectile;
using RoR2.Skills;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("AssassinMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("AssassinMod")]
[assembly: AssemblyTitle("AssassinMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace AssassinMod
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("com.HasteReapr.AssassinMod", "AssassinMod", "1.3.2")]
	[R2APISubmoduleDependency(new string[] { "PrefabAPI", "LanguageAPI", "SoundAPI", "UnlockableAPI" })]
	public class AssassinPlugin : BaseUnityPlugin
	{
		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static hook_Init <>9__10_0;

			internal void <EmoteApiCompat>b__10_0(orig_Init orig)
			{
				orig.Invoke();
				foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs)
				{
					if (((Object)allSurvivorDef.bodyPrefab).name == "AssassinSurvivorBody")
					{
						string text = "rogue_emote_skeleton.prefab";
						Random random = new Random();
						if (random.Next(0, 100) <= 1)
						{
							text = "rogue_emote_skeleton_tiny.prefab";
							Log.Info("Little guy :3");
						}
						GameObject val = Assets.mainAssetBundle.LoadAsset<GameObject>(text);
						CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val, true, 0, true);
						val.GetComponentInChildren<BoneMapper>().scale = 1f;
					}
				}
			}
		}

		public const string MODUID = "com.HasteReapr.AssassinMod";

		public const string MODNAME = "AssassinMod";

		public const string MODVERSION = "1.3.2";

		public const string DEVELOPER_PREFIX = "HASTEREAPR";

		public static AssassinPlugin instance;

		public static bool emoteAPILoaded;

		public static bool scepterStandaloneLoaded;

		private void Awake()
		{
			instance = this;
			Log.Init(((BaseUnityPlugin)this).Logger);
			Assets.Initialize();
			Config.ReadConfig();
			States.RegisterStates();
			Buffs.RegisterBuffs();
			Projectiles.RegisterProjectiles();
			Tokens.AddTokens();
			ItemDisplays.PopulateDisplays();
			emoteAPILoaded = Chainloader.PluginInfos.ContainsKey("MetrosexualFruitcake-CustomEmotesAPI-1.10.2");
			scepterStandaloneLoaded = Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");
			new AssassinPlr().Initialize();
			new ContentPacks().Initialize();
			Hook();
			EmoteApiCompat();
		}

		private void Hook()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			CharacterBody.OnTakeDamageServer += new hook_OnTakeDamageServer(CharacterBody_OnTakeDamageServer);
			CustomEmotesAPI.animChanged += new AnimationChanged(CustomEmotesAPI_animChanged);
		}

		private void CustomEmotesAPI_animChanged(string newAnimation, BoneMapper mapper)
		{
			if (newAnimation != "none")
			{
				if (((Object)((Component)mapper).transform).name == "rogue_emote_skeleton" || ((Object)((Component)mapper).transform).name == "rogue_emote_skeleton_tiny")
				{
					((Component)((Component)((Component)mapper).transform.parent).GetComponent<ChildLocator>().FindChild("Knife_L")).gameObject.SetActive(false);
					((Component)((Component)((Component)mapper).transform.parent).GetComponent<ChildLocator>().FindChild("Knife_R")).gameObject.SetActive(false);
				}
			}
			else if (((Object)((Component)mapper).transform).name == "rogue_emote_skeleton" || ((Object)((Component)mapper).transform).name == "rogue_emote_skeleton_tiny")
			{
				((Component)((Component)((Component)mapper).transform.parent).GetComponent<ChildLocator>().FindChild("Knife_L")).gameObject.SetActive(true);
				((Component)((Component)((Component)mapper).transform.parent).GetComponent<ChildLocator>().FindChild("Knife_R")).gameObject.SetActive(true);
			}
		}

		private void EmoteApiCompat()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			object obj = <>c.<>9__10_0;
			if (obj == null)
			{
				hook_Init val = delegate(orig_Init orig)
				{
					orig.Invoke();
					foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs)
					{
						if (((Object)allSurvivorDef.bodyPrefab).name == "AssassinSurvivorBody")
						{
							string text = "rogue_emote_skeleton.prefab";
							Random random = new Random();
							if (random.Next(0, 100) <= 1)
							{
								text = "rogue_emote_skeleton_tiny.prefab";
								Log.Info("Little guy :3");
							}
							GameObject val2 = Assets.mainAssetBundle.LoadAsset<GameObject>(text);
							CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, val2, true, 0, true);
							val2.GetComponentInChildren<BoneMapper>().scale = 1f;
						}
					}
				};
				<>c.<>9__10_0 = val;
				obj = (object)val;
			}
			SurvivorCatalog.Init += (hook_Init)obj;
		}

		private void CharacterBody_OnTakeDamageServer(orig_OnTakeDamageServer orig, CharacterBody self, DamageReport damageReport)
		{
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0294: Unknown result type (might be due to invalid IL or missing references)
			//IL_0296: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_029c: 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_02a6: 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_02b3: 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_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Expected O, but got Unknown
			orig.Invoke(self, damageReport);
			if (self.baseNameToken == "HASTEREAPR_ASSASSIN_BODY_NAME" && self.healthComponent.combinedHealth <= self.healthComponent.fullCombinedHealth * 0.6f)
			{
				self.AddTimedBuff(Buffs.madGodBuff, 3f);
			}
			if (DamageAPI.HasModdedDamageType(damageReport.damageInfo, Projectiles.poisonDmgType))
			{
				self.AddTimedBuff(Buffs.poisonDebuff, 10f);
				((Component)self).gameObject.AddComponent<Buffs.AssassinPoisonController>();
				((Component)self).gameObject.GetComponent<Buffs.AssassinPoisonController>().attackerBody = damageReport.attackerBody;
				((Component)self).gameObject.GetComponent<Buffs.AssassinPoisonController>().totalDamage = Util.OnHitProcDamage(damageReport.damageInfo.damage, damageReport.attackerBody.damage, 15f);
				((Component)self).gameObject.GetComponent<Buffs.AssassinPoisonController>().duration = 10f;
				((Component)self).gameObject.GetComponent<Buffs.AssassinPoisonController>().stacks += 1f;
			}
			if (DamageAPI.HasModdedDamageType(damageReport.damageInfo, Projectiles.smokeDmgType))
			{
				SetStateOnHurt.SetStunOnObject(((Component)damageReport.victimBody).gameObject, 2.5f);
			}
			if (DamageAPI.HasModdedDamageType(damageReport.damageInfo, Projectiles.backStabDmg) && BackstabManager.IsBackstab(damageReport.attackerBody.characterDirection.forward, damageReport.victimBody))
			{
				float combinedHealth = damageReport.victimBody.healthComponent.combinedHealth;
				float fullCombinedHealth = damageReport.victimBody.healthComponent.fullCombinedHealth;
				float num = 0f;
				num = ((Config.BackstabInsta.Value || !damageReport.victimBody.isBoss) ? ((!((combinedHealth + fullCombinedHealth) * 6f <= 2.1474836E+09f)) ? 2.1474836E+09f : ((combinedHealth + fullCombinedHealth) * 6f)) : ((!Util.CheckRoll(Config.BackstabChance.Value, damageReport.attackerMaster)) ? (damageReport.victimBody.healthComponent.fullHealth * 0.25f + damageReport.victimBody.healthComponent.adaptiveArmorValue) : ((!((combinedHealth + fullCombinedHealth) * 6f <= 2.1474836E+09f)) ? 2.1474836E+09f : ((combinedHealth + fullCombinedHealth) * 6f))));
				DamageInfo val = new DamageInfo
				{
					attacker = ((Component)damageReport.attackerBody).gameObject,
					crit = false,
					damage = num,
					damageColorIndex = (DamageColorIndex)2,
					force = Vector3.zero,
					procCoefficient = 0f,
					damageType = (DamageType)0,
					position = damageReport.victimBody.corePosition,
					inflictor = ((Component)damageReport.attackerBody).gameObject
				};
				damageReport.victimBody.healthComponent.TakeDamage(val);
				damageReport.attackerBody.AddTimedBuff(Buffs.CloakSpeed, 2.5f);
			}
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self))
			{
				if (self.HasBuff(Buffs.madGodBuff))
				{
					self.damage *= 1f + 0.075f * (float)self.GetBuffCount(Buffs.madGodBuff);
					self.attackSpeed *= 1f + 0.075f * (float)self.GetBuffCount(Buffs.madGodBuff);
				}
				if (self.HasBuff(Buffs.hardcoreDrugsBuff))
				{
					self.damage *= 1.05f;
					self.attackSpeed *= 1.05f;
					self.maxHealth *= 1.05f;
					self.moveSpeed *= 1.05f;
					self.regen *= 1.05f;
				}
				if (self.HasBuff(Buffs.poisonDebuff))
				{
					self.armor *= 1f - 0.1f * (float)self.GetBuffCount(Buffs.poisonDebuff);
				}
			}
		}

		public static void SetupScepterStandalone(string bodyName, SkillDef scepterSkill, SkillSlot skillSlot, int skillIndex)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			if (scepterStandaloneLoaded)
			{
				SetupScepterStandaloneInternal(bodyName, scepterSkill, skillSlot, skillIndex);
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
		private static void SetupScepterStandaloneInternal(string bodyName, SkillDef scepterSkill, SkillSlot skillSlot, int skillIndex)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			ItemBase<AncientScepterItem>.instance.RegisterScepterSkill(scepterSkill, bodyName, skillSlot, skillIndex);
		}
	}
	internal static class Log
	{
		internal static ManualLogSource _logSource;

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

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

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

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

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

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

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
}
namespace AssassinMod.SkillStates
{
	public class Backstab : BaseMeleeAttack
	{
		public override void OnEnter()
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			hitboxName = "BackstabHitBox";
			damageType = (DamageType)0;
			damageCoefficient = 15f;
			procCoefficient = 1f;
			pushForce = 300f;
			bonusForce = Vector3.zero;
			baseDuration = 0.5f;
			attackStartTime = 0.2f;
			attackEndTime = 0.5f;
			baseEarlyExitTime = 0.35f;
			hitStopDuration = 0.012f;
			attackRecoil = 0.25f;
			hitHopVelocity = 1f;
			hitSoundString = "Play_Backstab";
			duration = baseDuration;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			animator.SetBool("inCombat", true);
			((EntityState)this).GetModelAnimator().SetFloat("Backstab.playbackRate", 1f);
			((EntityState)this).PlayCrossfade("Gesture, Override", "Backstab", "Backstab.playbackRate", duration, 0.1f);
			base.OnEnter();
			DamageAPI.AddModdedDamageType(attack, Projectiles.backStabDmg);
		}

		public override void OnExit()
		{
			base.OnExit();
			animator.SetBool("inCombat", false);
			if (((EntityState)this).characterBody.HasBuff(Buffs.Cloak))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.Cloak);
			}
			if (((EntityState)this).characterBody.HasBuff(Buffs.CloakSpeed))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.CloakSpeed);
			}
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
	public class Roll : BaseSkillState
	{
		public static float duration = 0.5f;

		public static float initialSpeedCoefficient = 10f;

		public static float finalSpeedCoefficient = 1.25f;

		public static string dodgeSoundString = "Play_dodgeroll";

		public static float dodgeFOV = DodgeState.dodgeFOV;

		private float rollSpeed;

		private Vector3 forwardDirection;

		private Animator animator;

		private Vector3 previousPosition;

		public override void OnEnter()
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: 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_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector);
				forwardDirection = ((Vector3)(ref val)).normalized;
			}
			Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : forwardDirection);
			Vector3 val3 = Vector3.Cross(Vector3.up, val2);
			float num = Vector3.Dot(forwardDirection, val2);
			float num2 = Vector3.Dot(forwardDirection, val3);
			RecalculateRollSpeed();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterMotor.velocity.y = 0f;
				((EntityState)this).characterMotor.velocity = forwardDirection * rollSpeed;
			}
			Vector3 val4 = (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) ? ((EntityState)this).characterMotor.velocity : Vector3.zero);
			previousPosition = ((EntityState)this).transform.position - val4;
			((EntityState)this).PlayAnimation("FullBody, Override", "Roll", "Roll.playbackRate", duration);
			animator.SetBool("inCombat", true);
			Util.PlaySound(dodgeSoundString, ((EntityState)this).gameObject);
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.armorBuff, 3f * duration);
				((EntityState)this).characterBody.AddTimedBuff(Buffs.HiddenInvincibility, 0.5f * duration);
				((EntityState)this).characterBody.AddTimedBuff(Buffs.Cloak, 3f);
				((EntityState)this).characterBody.AddTimedBuff(Buffs.CloakSpeed, 3f);
			}
		}

		private void RecalculateRollSpeed()
		{
			rollSpeed = ((BaseState)this).moveSpeedStat * Mathf.Lerp(initialSpeedCoefficient, finalSpeedCoefficient, ((EntityState)this).fixedAge / duration);
		}

		public override void FixedUpdate()
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: 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)
			((EntityState)this).FixedUpdate();
			RecalculateRollSpeed();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection))
			{
				((EntityState)this).characterDirection.forward = forwardDirection;
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				((EntityState)this).cameraTargetParams.fovOverride = Mathf.Lerp(dodgeFOV, 60f, ((EntityState)this).fixedAge / duration);
			}
			Vector3 val = ((EntityState)this).transform.position - previousPosition;
			Vector3 normalized = ((Vector3)(ref val)).normalized;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && normalized != Vector3.zero)
			{
				Vector3 val2 = normalized * rollSpeed;
				float num = Mathf.Max(Vector3.Dot(val2, forwardDirection), 0f);
				val2 = forwardDirection * num;
				val2.y = 0f;
				((EntityState)this).characterMotor.velocity = val2;
			}
			previousPosition = ((EntityState)this).transform.position;
			if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				((EntityState)this).cameraTargetParams.fovOverride = -1f;
			}
			((EntityState)this).OnExit();
			animator.SetBool("inCombat", false);
			if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.assassinDrugsBuff))
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.Warbanner, 3f);
			}
			((EntityState)this).characterMotor.disableAirControlUntilCollision = false;
		}

		public override void OnSerialize(NetworkWriter writer)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			((BaseSkillState)this).OnSerialize(writer);
			writer.Write(forwardDirection);
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			((BaseSkillState)this).OnDeserialize(reader);
			forwardDirection = reader.ReadVector3();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
	internal class ThrowVirulent : BaseSkillState
	{
		private Ray aimRay;

		public float baseDuration = 0.25f;

		public float duration;

		public float fireTime;

		public float recoil = 0f;

		private string handString;

		private Animator animator;

		private bool hasFired;

		public override void OnEnter()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = 0f;
			hasFired = false;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			animator.SetBool("inCombat", true);
			((EntityState)this).GetModelAnimator().SetFloat("ThrowPoison.playbackRate", ((BaseState)this).attackSpeedStat);
			string[] array = new string[2] { "ThrowPoison", "ThrowPoison2" };
			int num = Random.RandomRangeInt(0, 2);
			string[] array2 = new string[2] { "Hand_R", "Hand_R" };
			handString = array2[num];
			((EntityState)this).PlayCrossfade("Gesture, Override", array[num], "ThrowPoison.playbackRate", duration, 0.1f);
			Util.PlaySound("Play_dagger_sfx", ((EntityState)this).gameObject);
			if (((EntityState)this).characterBody.HasBuff(Buffs.Cloak))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.Cloak);
			}
			if (((EntityState)this).characterBody.HasBuff(Buffs.CloakSpeed))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.CloakSpeed);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			animator.SetBool("inCombat", false);
		}

		private void Fire()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: 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_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01af: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: 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_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			hasFired = true;
			Ray val = ((BaseState)this).GetAimRay();
			if (Util.HasEffectiveAuthority(((EntityState)this).gameObject))
			{
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 3f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val3 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 3f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, 5f, 0f);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val4 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 3f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, -5f, 0f);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val5 = val2;
				if (((EntityState)this).characterBody.HasBuff(Buffs.assassinDrugsBuff))
				{
					ProjectileManager.instance.FireProjectile(val5);
					ProjectileManager.instance.FireProjectile(val4);
				}
				else
				{
					ProjectileManager.instance.FireProjectile(val3);
				}
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= fireTime && !hasFired)
			{
				Fire();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class DrugSelf : GenericProjectileBaseState
	{
		private Animator animator;

		public override void OnEnter()
		{
			((GenericProjectileBaseState)this).OnEnter();
			base.duration = 0.8f;
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			((EntityState)this).GetModelAnimator().SetFloat("PoisonFlurry.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).PlayCrossfade("Gesture, Override", "Enrage", "PoisonFlurry.playbackRate", base.duration, 0.1f);
		}

		public override void OnExit()
		{
			((GenericProjectileBaseState)this).OnExit();
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.assassinDrugsBuff, 5f);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
	public class ThrowDagger : BaseSkillState
	{
		private Ray aimRay;

		public float baseDuration = 0.3f;

		public float duration;

		public float fireTime;

		public float recoil = 0f;

		private string handString;

		private Animator animator;

		private bool hasFired;

		public override void OnEnter()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = 0f;
			hasFired = false;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			animator.SetBool("inCombat", true);
			((EntityState)this).GetModelAnimator().SetFloat("ThrowKnife.playbackRate", ((BaseState)this).attackSpeedStat);
			string[] array = new string[4] { "ThrowKnife1", "ThrowKnife2", "ThrowKnife3", "ThrowKnife4" };
			int num = Random.RandomRangeInt(0, 4);
			string[] array2 = new string[4] { "Hand_R", "Hand_L", "Hand_R", "Hand_L" };
			handString = array2[num];
			((EntityState)this).PlayCrossfade("Gesture, Override", array[num], "ThrowKnife.playbackRate", duration, 0.1f);
			Util.PlaySound("Play_dagger_sfx", ((EntityState)this).gameObject);
			if (((EntityState)this).characterBody.HasBuff(Buffs.Cloak))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.Cloak);
			}
			if (((EntityState)this).characterBody.HasBuff(Buffs.CloakSpeed))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.CloakSpeed);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			animator.SetBool("inCombat", false);
			animator.SetBool("attacking", false);
		}

		private void Fire()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: 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_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: 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_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: 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_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: 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_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: 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_0331: Unknown result type (might be due to invalid IL or missing references)
			//IL_033d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0361: Unknown result type (might be due to invalid IL or missing references)
			//IL_036e: Unknown result type (might be due to invalid IL or missing references)
			hasFired = true;
			Ray val = ((BaseState)this).GetAimRay();
			if (((EntityState)this).isAuthority)
			{
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val3 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, -0.5f, 0f);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val4 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, -1f, 0f);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val5 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, 0.5f, 0f);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val6 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, 1f, 0f);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val7 = val2;
				ProjectileManager.instance.FireProjectile(val4);
				ProjectileManager.instance.FireProjectile(val6);
				if (((EntityState)this).characterBody.HasBuff(Buffs.assassinDrugsBuff))
				{
					ProjectileManager.instance.FireProjectile(val5);
					ProjectileManager.instance.FireProjectile(val7);
				}
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= fireTime && !hasFired)
			{
				Fire();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
	public class ThrowPearl : BaseSkillState
	{
		private Ray aimRay;

		public float baseDuration = 0.5f;

		public float duration;

		private float initialFireTime;

		private float secondFireTime;

		public float recoil = 0f;

		private bool thrownSmoke;

		private bool thrownPearl;

		private Animator animator;

		public override void OnEnter()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			thrownSmoke = false;
			thrownPearl = false;
			aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration;
			initialFireTime = 0f;
			secondFireTime = 0.6f;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			animator.SetBool("inCombat", true);
			((EntityState)this).GetModelAnimator().SetFloat("EnderPearl.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).PlayCrossfade("Gesture, Override", "ThrowEnderPearl", "EnderPearl.playbackRate", duration, 0.1f);
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			animator.SetBool("inCombat", false);
		}

		private void ThrowSmoke()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: 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_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			Ray val = ((BaseState)this).GetAimRay();
			if (Util.HasEffectiveAuthority(((EntityState)this).gameObject))
			{
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 2.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction);
				val2.projectilePrefab = Projectiles.cloudyPotion;
				((FireProjectileInfo)(ref val2)).speedOverride = 0f;
				FireProjectileInfo val3 = val2;
				ProjectileManager.instance.FireProjectile(val3);
				thrownSmoke = true;
			}
		}

		private void ThrowPearlProjectile()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			Ray val = ((BaseState)this).GetAimRay();
			if (Util.HasEffectiveAuthority(((EntityState)this).gameObject))
			{
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 0f;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction);
				val2.projectilePrefab = Projectiles.enderPearl;
				((FireProjectileInfo)(ref val2)).speedOverride = (((EntityState)this).characterBody.HasBuff(Buffs.assassinDrugsBuff) ? 128 : 96);
				FireProjectileInfo val3 = val2;
				ProjectileManager.instance.FireProjectile(val3);
				thrownPearl = true;
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= initialFireTime && !thrownPearl)
			{
				ThrowPearlProjectile();
			}
			if (((EntityState)this).fixedAge >= secondFireTime && !thrownSmoke)
			{
				ThrowSmoke();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority && thrownSmoke)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
	public class ThrowPoison : BaseSkillState
	{
		private Ray aimRay;

		public float baseDuration = 0.25f;

		public float duration;

		public float fireTime;

		public float recoil = 0f;

		private string handString;

		private Animator animator;

		private bool hasFired;

		public override void OnEnter()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = 0f;
			hasFired = false;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			animator.SetBool("inCombat", true);
			((EntityState)this).GetModelAnimator().SetFloat("ThrowPoison.playbackRate", ((BaseState)this).attackSpeedStat);
			string[] array = new string[2] { "ThrowPoison", "ThrowPoison2" };
			int num = Random.RandomRangeInt(0, 2);
			string[] array2 = new string[2] { "Hand_R", "Hand_L" };
			handString = array2[num];
			((EntityState)this).PlayCrossfade("Gesture, Override", array[num], "ThrowPoison.playbackRate", duration, 0.1f);
			Util.PlaySound("Play_dagger_sfx", ((EntityState)this).gameObject);
			if (((EntityState)this).characterBody.HasBuff(Buffs.Cloak))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.Cloak);
			}
			if (((EntityState)this).characterBody.HasBuff(Buffs.CloakSpeed))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.CloakSpeed);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			animator.SetBool("inCombat", false);
		}

		private void Fire()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			hasFired = true;
			Ray val = ((BaseState)this).GetAimRay();
			if (Util.HasEffectiveAuthority(((EntityState)this).gameObject))
			{
				GameObject projectilePrefab = (((EntityState)this).characterBody.HasBuff(Buffs.assassinDrugsBuff) ? Projectiles.clusterPoison : Projectiles.poison);
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 2.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.position = ((Ray)(ref val)).origin;
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction);
				val2.projectilePrefab = projectilePrefab;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val3 = val2;
				ProjectileManager.instance.FireProjectile(val3);
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= fireTime && !hasFired)
			{
				Fire();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class ScepterDagger : BaseSkillState
	{
		private Ray aimRay;

		public float baseDuration = 0.4f;

		public float duration;

		public float fireTime;

		public float recoil = 0f;

		private string handString;

		private Animator animator;

		public override void OnEnter()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = duration;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			((EntityState)this).GetModelAnimator().SetFloat("ThrowKnife.playbackRate", ((BaseState)this).attackSpeedStat);
			string[] array = new string[4] { "ThrowKnife1", "ThrowKnife2", "ThrowKnife3", "ThrowKnife4" };
			int num = Random.RandomRangeInt(0, 4);
			string[] array2 = new string[4] { "Hand_R", "Hand_L", "Hand_R", "Hand_L" };
			handString = array2[num];
			((EntityState)this).PlayCrossfade("Gesture, Override", array[num], "ThrowKnife.playbackRate", duration, 0.1f);
			Util.PlaySound("Play_dagger_sfx", ((EntityState)this).gameObject);
			if (((EntityState)this).characterBody.HasBuff(Buffs.Cloak))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.Cloak);
			}
			if (((EntityState)this).characterBody.HasBuff(Buffs.CloakSpeed))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.CloakSpeed);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			animator.SetBool("attacking", false);
		}

		private void Fire()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: 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_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: 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_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: 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_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_021e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: 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_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: 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_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: 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_032a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_0342: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Unknown result type (might be due to invalid IL or missing references)
			Ray val = ((BaseState)this).GetAimRay();
			if (((EntityState)this).isAuthority)
			{
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1.25f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val3 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1.25f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, -1f, 0f);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val4 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1.25f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, 1f, 0f);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val5 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1.25f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, -2f, 0f);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val6 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 1.25f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, 2f, 0f);
				val2.projectilePrefab = Projectiles.dagger;
				((FireProjectileInfo)(ref val2)).speedOverride = 256f;
				FireProjectileInfo val7 = val2;
				ProjectileManager.instance.FireProjectile(val3);
				ProjectileManager.instance.FireProjectile(val4);
				ProjectileManager.instance.FireProjectile(val5);
				if (((EntityState)this).characterBody.HasBuff(Buffs.assassinDrugsBuff))
				{
					ProjectileManager.instance.FireProjectile(val6);
					ProjectileManager.instance.FireProjectile(val7);
				}
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= fireTime)
			{
				Fire();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}
	}
	public class ScepterDrugs : GenericProjectileBaseState
	{
		private Animator animator;

		public override void OnEnter()
		{
			((GenericProjectileBaseState)this).OnEnter();
			base.duration = 0.8f;
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			((EntityState)this).GetModelAnimator().SetFloat("PoisonFlurry.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).PlayCrossfade("Gesture, Override", "Enrage", "PoisonFlurry.playbackRate", base.duration, 0.1f);
		}

		public override void OnExit()
		{
			((GenericProjectileBaseState)this).OnExit();
			if (NetworkServer.active)
			{
				((EntityState)this).characterBody.AddTimedBuff(Buffs.assassinDrugsBuff, 5f);
				((EntityState)this).characterBody.AddTimedBuff(Buffs.hardcoreDrugsBuff, 5f);
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)3;
		}
	}
	public class ScepterPoison : BaseSkillState
	{
		private Ray aimRay;

		public float baseDuration = 0.25f;

		public float duration;

		public float fireTime;

		public float recoil = 0f;

		private string handString;

		private Animator animator;

		public override void OnEnter()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = duration;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			((EntityState)this).GetModelAnimator().SetFloat("ThrowPoison.playbackRate", ((BaseState)this).attackSpeedStat);
			string[] array = new string[2] { "ThrowPoison", "ThrowPoison2" };
			int num = Random.RandomRangeInt(0, 2);
			string[] array2 = new string[2] { "Hand_R", "Hand_R" };
			handString = array2[num];
			((EntityState)this).PlayCrossfade("Gesture, Override", array[num], "ThrowPoison.playbackRate", duration, 0.1f);
			Util.PlaySound("Play_dagger_sfx", ((EntityState)this).gameObject);
			if (((EntityState)this).characterBody.HasBuff(Buffs.Cloak))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.Cloak);
			}
			if (((EntityState)this).characterBody.HasBuff(Buffs.CloakSpeed))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.CloakSpeed);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
		}

		private void Fire()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: 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_00bb: Unknown result type (might be due to invalid IL or missing references)
			Ray val = ((BaseState)this).GetAimRay();
			if (Util.HasEffectiveAuthority(((EntityState)this).gameObject))
			{
				GameObject projectilePrefab = (((EntityState)this).characterBody.HasBuff(Buffs.assassinDrugsBuff) ? Projectiles.recursivePoison : Projectiles.clusterPoison);
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 2.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((BaseState)this).FindModelChild(handString).position;
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction);
				val2.projectilePrefab = projectilePrefab;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val3 = val2;
				ProjectileManager.instance.FireProjectile(val3);
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= fireTime)
			{
				Fire();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	internal class ScepterVenom : BaseSkillState
	{
		private Ray aimRay;

		public float baseDuration = 0.25f;

		public float duration;

		public float fireTime;

		public float recoil = 0f;

		private string handString;

		private Animator animator;

		private bool hasFired;

		public override void OnEnter()
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = 0f;
			hasFired = false;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			animator.SetBool("inCombat", true);
			((EntityState)this).GetModelAnimator().SetFloat("ThrowPoison.playbackRate", ((BaseState)this).attackSpeedStat);
			string[] array = new string[2] { "ThrowPoison", "ThrowPoison2" };
			int num = Random.RandomRangeInt(0, 2);
			string[] array2 = new string[2] { "Hand_R", "Hand_R" };
			handString = array2[num];
			((EntityState)this).PlayCrossfade("Gesture, Override", array[num], "ThrowPoison.playbackRate", duration, 0.1f);
			Util.PlaySound("Play_dagger_sfx", ((EntityState)this).gameObject);
			if (((EntityState)this).characterBody.HasBuff(Buffs.Cloak))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.Cloak);
			}
			if (((EntityState)this).characterBody.HasBuff(Buffs.CloakSpeed))
			{
				((EntityState)this).characterBody.ClearTimedBuffs(Buffs.CloakSpeed);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			animator.SetBool("inCombat", false);
		}

		private void Fire()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: 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_00c2: 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_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//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_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: 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_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0208: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_0268: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: 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_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0305: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: 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_0328: Unknown result type (might be due to invalid IL or missing references)
			//IL_0346: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: 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_0387: 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_03a7: 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_03c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0440: Unknown result type (might be due to invalid IL or missing references)
			//IL_044c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0408: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Unknown result type (might be due to invalid IL or missing references)
			//IL_0422: Unknown result type (might be due to invalid IL or missing references)
			//IL_042f: Unknown result type (might be due to invalid IL or missing references)
			hasFired = true;
			Ray val = ((BaseState)this).GetAimRay();
			if (Util.HasEffectiveAuthority(((EntityState)this).gameObject))
			{
				FireProjectileInfo val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 7.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, 5f, 0f);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val3 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 7.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, -5f, 0f);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val4 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 7.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, 5f, 10f);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val5 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 7.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, 5f, -10f);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val6 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 7.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, -5f, 10f);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val7 = val2;
				val2 = default(FireProjectileInfo);
				val2.owner = ((EntityState)this).gameObject;
				val2.damage = 7.5f * ((EntityState)this).characterBody.damage;
				val2.force = 0f;
				val2.position = ((Ray)(ref val)).origin;
				val2.crit = ((EntityState)this).characterBody.RollCrit();
				val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction) * Quaternion.Euler(0f, -5f, -10f);
				val2.projectilePrefab = Projectiles.virulentPoison;
				((FireProjectileInfo)(ref val2)).speedOverride = 96f;
				FireProjectileInfo val8 = val2;
				if (((EntityState)this).characterBody.HasBuff(Buffs.assassinDrugsBuff))
				{
					ProjectileManager.instance.FireProjectile(val8);
					ProjectileManager.instance.FireProjectile(val7);
					ProjectileManager.instance.FireProjectile(val6);
					ProjectileManager.instance.FireProjectile(val5);
				}
				else
				{
					ProjectileManager.instance.FireProjectile(val4);
					ProjectileManager.instance.FireProjectile(val3);
				}
			}
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= fireTime && !hasFired)
			{
				Fire();
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
}
namespace AssassinMod.SkillStates.BaseStates
{
	public class BaseEmote : BaseState
	{
		public string soundString;

		public string animString;

		public float duration;

		public float animDuration;

		private uint activePlayID;

		private Animator animator;

		private ChildLocator childLocator;

		public LocalUser localUser;

		private CharacterCameraParamsData emoteCameraParams = new CharacterCameraParamsData
		{
			maxPitch = BlendableFloat.op_Implicit(70f),
			minPitch = BlendableFloat.op_Implicit(-70f),
			pivotVerticalOffset = BlendableFloat.op_Implicit(0.5f),
			idealLocalCameraPos = BlendableVector3.op_Implicit(emoteCameraPosition),
			wallCushion = BlendableFloat.op_Implicit(0.1f)
		};

		public static Vector3 emoteCameraPosition = new Vector3(0f, -0.5f, -8.9f);

		private CameraParamsOverrideHandle camOverrideHandle;

		public override void OnEnter()
		{
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: 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_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: 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)
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			childLocator = ((EntityState)this).GetModelChildLocator();
			FindLocalUser();
			((EntityState)this).characterBody.hideCrosshair = true;
			if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator()))
			{
				((Behaviour)((EntityState)this).GetAimAnimator()).enabled = false;
			}
			if (duration == 0f && animDuration == 0f)
			{
				duration = GetAnimatorClipDuration();
			}
			if (animDuration == 0f && duration != 0f)
			{
				animDuration = duration;
			}
			if (animDuration > 0f)
			{
				((EntityState)this).PlayAnimation("FullBody, Override", animString, "Emote.playbackRate", animDuration);
			}
			else
			{
				((EntityState)this).PlayAnimation("FullBody, Override", animString);
			}
			activePlayID = Util.PlaySound(soundString, ((EntityState)this).gameObject);
			CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest);
			val.cameraParamsData = emoteCameraParams;
			val.priority = 0f;
			CameraParamsOverrideRequest val2 = val;
			camOverrideHandle = ((EntityState)this).cameraTargetParams.AddParamsOverride(val2, 0.5f);
		}

		private float GetAnimatorClipDuration()
		{
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			modelAnimator.speed = 1f;
			modelAnimator.Update(0f);
			int layerIndex = modelAnimator.GetLayerIndex("FullBody, Override");
			if (layerIndex >= 0)
			{
				modelAnimator.PlayInFixedTime(animString, layerIndex, 0f);
				modelAnimator.Update(0f);
				AnimatorStateInfo currentAnimatorStateInfo = modelAnimator.GetCurrentAnimatorStateInfo(layerIndex);
				return ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).length;
			}
			return 0f;
		}

		private void FindLocalUser()
		{
			if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
			{
				return;
			}
			foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList)
			{
				if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody)
				{
					localUser = readOnlyLocalUsers;
					break;
				}
			}
		}

		public override void OnExit()
		{
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			((EntityState)this).characterBody.hideCrosshair = false;
			if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator()))
			{
				((Behaviour)((EntityState)this).GetAimAnimator()).enabled = true;
			}
			animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 1f);
			animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 1f);
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			if (activePlayID != 0)
			{
				AkSoundEngine.StopPlayingID(activePlayID);
			}
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.5f);
		}

		public override void FixedUpdate()
		{
			//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_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)
			((EntityState)this).FixedUpdate();
			bool flag = false;
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				if (!((EntityState)this).characterMotor.isGrounded)
				{
					flag = true;
				}
				if (((EntityState)this).characterMotor.velocity != Vector3.zero)
				{
					flag = true;
				}
			}
			if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank))
			{
				if (((EntityState)this).inputBank.skill1.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.skill2.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.skill3.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.skill4.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.jump.down)
				{
					flag = true;
				}
				if (((EntityState)this).inputBank.moveVector != Vector3.zero)
				{
					flag = true;
				}
			}
			if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded)
			{
				CheckEmote<Sit>(Config.KeybindEmoteJuggle);
				CheckEmote<MenuPose>(Config.KeybindEmoteCss);
			}
			if (duration > 0f && ((EntityState)this).fixedAge >= duration)
			{
				flag = true;
			}
			if (flag)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new()
		{
			if (Config.GetKeyPressed(keybind))
			{
				FindLocalUser();
				if (localUser != null && !localUser.isUIFocused)
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0);
				}
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)0;
		}
	}
	public class Juggle : BaseEmote
	{
		public override void OnEnter()
		{
			animString = "Emote_Juggle";
			duration = -1f;
			base.OnEnter();
		}
	}
	public class Sit : BaseEmote
	{
		public override void OnEnter()
		{
			animString = "Emote Sit";
			duration = -1f;
			base.OnEnter();
		}
	}
	public class MenuPose : BaseEmote
	{
		private const float thumpSoundDelay = 1.5f;

		private const float loadSoundDelay = 4f / 15f;

		private bool playedThump = false;

		private bool playedLoad = false;

		public override void OnEnter()
		{
			animString = "Emote_CSS_In";
			duration = -1f;
			base.OnEnter();
		}

		public override void FixedUpdate()
		{
			base.FixedUpdate();
		}
	}
	public class BaseMeleeAttack : BaseSkillState
	{
		public int swingIndex;

		protected string hitboxName = "Sword";

		protected DamageType damageType = (DamageType)0;

		protected float damageCoefficient = 3.5f;

		protected float procCoefficient = 1f;

		protected float pushForce = 300f;

		protected Vector3 bonusForce = Vector3.zero;

		protected float baseDuration = 1f;

		protected float attackStartTime = 0.2f;

		protected float attackEndTime = 0.4f;

		protected float baseEarlyExitTime = 0.4f;

		protected float hitStopDuration = 0.012f;

		protected float attackRecoil = 0.75f;

		protected float hitHopVelocity = 4f;

		protected bool cancelled = false;

		protected string swingSoundString = "";

		protected string hitSoundString = "";

		protected string muzzleString = "SwingCenter";

		protected GameObject swingEffectPrefab;

		protected GameObject hitEffectPrefab;

		protected NetworkSoundEventIndex impactSound;

		private float earlyExitTime;

		public float duration;

		private bool hasFired;

		private float hitPauseTimer;

		public OverlapAttack attack;

		protected bool inHitPause;

		private bool hasHopped;

		protected float stopwatch;

		protected Animator animator;

		private HitStopCachedState hitStopCachedState;

		private Vector3 storedVelocity;

		public override void OnEnter()
		{
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Expected O, but got Unknown
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			earlyExitTime = baseEarlyExitTime / ((BaseState)this).attackSpeedStat;
			hasFired = false;
			animator = ((EntityState)this).GetModelAnimator();
			((BaseState)this).StartAimMode(0.5f + duration, false);
			((EntityState)this).characterBody.outOfCombatStopwatch = 0f;
			animator.SetBool("attacking", true);
			HitBoxGroup hitBoxGroup = null;
			Transform modelTransform = ((EntityState)this).GetModelTransform();
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName);
			}
			PlayAttackAnimation();
			attack = new OverlapAttack();
			attack.damageType = damageType;
			attack.attacker = ((EntityState)this).gameObject;
			attack.inflictor = ((EntityState)this).gameObject;
			attack.teamIndex = ((BaseState)this).GetTeam();
			attack.damage = damageCoefficient * ((BaseState)this).damageStat;
			attack.procCoefficient = procCoefficient;
			attack.hitEffectPrefab = hitEffectPrefab;
			attack.forceVector = bonusForce;
			attack.pushAwayForce = pushForce;
			attack.hitBoxGroup = hitBoxGroup;
			attack.isCrit = ((BaseState)this).RollCrit();
			attack.impactSound = impactSound;
		}

		protected virtual void PlayAttackAnimation()
		{
			((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f);
		}

		public override void OnExit()
		{
			if (!hasFired && !cancelled)
			{
				FireAttack();
			}
			((EntityState)this).OnExit();
			animator.SetBool("attacking", false);
		}

		protected virtual void PlaySwingEffect()
		{
			EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, true);
		}

		protected virtual void OnHitEnemyAuthority()
		{
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			Util.PlaySound(hitSoundString, ((EntityState)this).gameObject);
			if (!hasHopped)
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity);
				}
				hasHopped = true;
			}
			if (!inHitPause && hitStopDuration > 0f)
			{
				storedVelocity = ((EntityState)this).characterMotor.velocity;
				hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Slash.playbackRate");
				hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat;
				inHitPause = true;
			}
		}

		private void FireAttack()
		{
			if (!hasFired)
			{
				hasFired = true;
				Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat);
				if (((EntityState)this).isAuthority)
				{
					PlaySwingEffect();
					((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil);
				}
			}
			if (((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null))
			{
				OnHitEnemyAuthority();
			}
		}

		protected virtual void SetNextState()
		{
			int num = ((swingIndex == 0) ? 1 : 0);
			((EntityState)this).outer.SetNextState((EntityState)(object)new BaseMeleeAttack
			{
				swingIndex = num
			});
		}

		public override void FixedUpdate()
		{
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			hitPauseTimer -= Time.fixedDeltaTime;
			if (hitPauseTimer <= 0f && inHitPause)
			{
				((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator);
				inHitPause = false;
				((EntityState)this).characterMotor.velocity = storedVelocity;
			}
			if (!inHitPause)
			{
				stopwatch += Time.fixedDeltaTime;
			}
			else
			{
				if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
				}
				if (Object.op_Implicit((Object)(object)animator))
				{
					animator.SetFloat("Swing.playbackRate", 0f);
				}
			}
			if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime)
			{
				FireAttack();
			}
			if (stopwatch >= duration - earlyExitTime && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.skill1.down)
			{
				if (!hasFired)
				{
					FireAttack();
				}
				SetNextState();
			}
			else if (stopwatch >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)1;
		}

		public override void OnSerialize(NetworkWriter writer)
		{
			((BaseSkillState)this).OnSerialize(writer);
			writer.Write(swingIndex);
		}

		public override void OnDeserialize(NetworkReader reader)
		{
			((BaseSkillState)this).OnDeserialize(reader);
			swingIndex = reader.ReadInt32();
		}
	}
	public class BaseTimedSkillState : BaseSkillState
	{
		public static float TimedBaseDuration;

		public static float TimedBaseCastStartTime;

		public static float TimedBaseCastEndTime;

		protected float duration;

		protected float castStartTime;

		protected float castEndTime;

		protected bool hasFired;

		protected bool isFiring;

		protected bool hasExited;

		protected virtual void InitDurationValues(float baseDuration, float baseCastStartTime, float baseCastEndTime = 1f)
		{
			TimedBaseDuration = baseDuration;
			TimedBaseCastStartTime = baseCastStartTime;
			TimedBaseCastEndTime = baseCastEndTime;
			duration = TimedBaseDuration / ((BaseState)this).attackSpeedStat;
			castStartTime = baseCastStartTime * duration;
			castEndTime = baseCastEndTime * duration;
		}

		protected virtual void OnCastEnter()
		{
		}

		protected virtual void OnCastFixedUpdate()
		{
		}

		protected virtual void OnCastUpdate()
		{
		}

		protected virtual void OnCastExit()
		{
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (!hasFired && ((EntityState)this).fixedAge > castStartTime)
			{
				hasFired = true;
				OnCastEnter();
			}
			bool flag = ((EntityState)this).fixedAge >= castStartTime;
			bool flag2 = ((EntityState)this).fixedAge >= castEndTime;
			isFiring = false;
			if ((flag && !flag2) || (flag && flag2 && !hasFired))
			{
				isFiring = true;
				OnCastFixedUpdate();
			}
			if (flag2 && !hasExited)
			{
				hasExited = true;
				OnCastExit();
			}
			if (((EntityState)this).fixedAge > duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override void Update()
		{
			((EntityState)this).Update();
			if (isFiring)
			{
				OnCastUpdate();
			}
		}
	}
	public class ExampleTimedSkillState : BaseTimedSkillState
	{
		public static float SkillBaseDuration = 1.5f;

		public static float SkillStartTime = 0.2f;

		public static float SkillEndTime = 0.9f;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			InitDurationValues(SkillBaseDuration, SkillStartTime, SkillEndTime);
		}

		protected override void OnCastEnter()
		{
		}

		protected override void OnCastFixedUpdate()
		{
		}

		protected override void OnCastExit()
		{
		}
	}
	public class ExampleDelayedSkillState : BaseTimedSkillState
	{
		public static float SkillBaseDuration = 1.5f;

		public static float SkillStartTime = 0.2f;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			InitDurationValues(SkillBaseDuration, SkillStartTime);
		}

		protected override void OnCastEnter()
		{
		}
	}
}
namespace AssassinMod.SkillStates.Assassin
{
	public class AssassinMainState : GenericCharacterMain
	{
		private Animator animator;

		private LocalUser localUser;

		public override void OnEnter()
		{
			((GenericCharacterMain)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			FindLocalUser();
		}

		private void FindLocalUser()
		{
			if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
			{
				return;
			}
			foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList)
			{
				if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody)
				{
					localUser = readOnlyLocalUsers;
					break;
				}
			}
		}

		public override void FixedUpdate()
		{
			((GenericCharacterMain)this).FixedUpdate();
			if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded)
			{
				CheckEmote<Juggle>(Config.KeybindEmoteJuggle);
				CheckEmote<MenuPose>(Config.KeybindEmoteCss);
				CheckEmote<Sit>(Config.KeybindEmoteSit);
			}
		}

		private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new()
		{
			if (Config.GetKeyPressed(keybind))
			{
				FindLocalUser();
				if (localUser != null && !localUser.isUIFocused)
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0);
				}
			}
		}
	}
}
namespace AssassinMod.Components
{
	public class MenuSoundComponent : MonoBehaviour
	{
		private void OnEnable()
		{
			((MonoBehaviour)this).StartCoroutine(MenuSound());
		}

		private IEnumerator MenuSound()
		{
			yield return (object)new WaitForSeconds(0.21f);
			Util.PlaySound("Play_land_impact", ((Component)this).gameObject);
			yield return (object)new WaitForSeconds(0.87f);
			Util.PlaySound("Play_knife_draw2", ((Component)this).gameObject);
			yield return (object)new WaitForSeconds(0.3f);
			Util.PlaySound("Play_knife_draw1", ((Component)this).gameObject);
			yield return null;
		}
	}
}
namespace AssassinMod.Modules
{
	internal static class Assets
	{
		internal static AssetBundle mainAssetBundle;

		internal static AssetBundle projAssetBundle;

		internal static GameObject poisonExplosionEffect;

		internal static GameObject venomExplosionEffect;

		internal static GameObject smokeExplosionEffect;

		internal static GameObject pearlImpactEffect;

		internal static GameObject knifeTrail;

		internal static GameObject masteryKnifeTrail;

		internal static GameObject grandKnifeTrail;

		internal static GameObject poisonTrail;

		internal static GameObject venomTrail;

		internal static GameObject recursiveTrail;

		internal static GameObject smokeTrail;

		internal static GameObject pearlTrail;

		internal static NetworkSoundEventDef daggerThrow;

		internal static NetworkSoundEventDef bottleShatter;

		internal static NetworkSoundEventDef pearl_warp;

		private const string assetbundleName = "ror2assassin";

		private const string assetbundleNameProj = "ror2assassin";

		private const string csProjName = "AssassinMod";

		internal static void Initialize()
		{
			bool flag = false;
			LoadAssetBundle();
			LoadSoundbank();
			PopulateAssets();
		}

		internal static void LoadAssetBundle()
		{
			try