Decompiled source of SettMod v4.6.1

SettMod.dll

Decompiled 2 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.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.Commando;
using EntityStates.Huntress;
using EntityStates.LemurianBruiserMonster;
using EntityStates.Mage;
using EntityStates.Merc;
using HG;
using HG.BlendableTypes;
using IL.RoR2;
using KinematicCharacterController;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using R2API.Utils;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.ContentManagement;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using SettMod.Controllers;
using SettMod.Modules;
using SettMod.Modules.Survivors;
using SettMod.SkillStates;
using SettMod.SkillStates.BaseStates;
using SettMod.SkillStates.Emotes;
using SettMod.SkillStates.Keystone;
using SettMod.States;
using SettMod.States.Emotes;
using SettMod.UI;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.Serialization;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("SettMod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("4.6.1.0")]
[assembly: AssemblyInformationalVersion("4.6.1+53541547546a311a805f132a902fa3b1d63cd1a8")]
[assembly: AssemblyProduct("SettMod")]
[assembly: AssemblyTitle("SettMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.6.1.0")]
[module: UnverifiableCode]
internal enum SettCameraParams
{
	DEFAULT,
	EMOTE
}
internal class BodyInfo
{
	internal string bodyName = "";

	internal string bodyNameToken = "";

	internal string subtitleNameToken = "";

	internal string bodyNameToClone = "Commando";

	internal Texture characterPortrait;

	internal GameObject crosshair;

	internal GameObject podPrefab;

	internal float maxHealth = 100f;

	internal float healthGrowth = 2f;

	internal float healthRegen;

	internal float regenGrowth;

	internal float shield;

	internal float shieldGrowth;

	internal float moveSpeed = 7f;

	internal float moveSpeedGrowth;

	internal float acceleration = 80f;

	internal float jumpPower = 15f;

	internal float jumpPowerGrowth;

	internal float damage = 12f;

	internal float damageGrowth;

	internal float attackSpeed = 1f;

	internal float attackSpeedGrowth;

	internal float armor;

	internal float armorGrowth;

	internal float crit = 1f;

	internal float critGrowth;

	internal int jumpCount = 1;

	internal Color bodyColor = Color.grey;

	internal Vector3 aimOriginPosition = new Vector3(0f, 1.8f, 0f);

	internal Vector3 modelBasePosition = new Vector3(0f, -0.92f, 0f);

	internal Vector3 cameraPivotPosition = new Vector3(0f, 1.6f, 0f);
}
internal class CustomRendererInfo
{
	internal string childName;

	internal Material material;

	internal bool ignoreOverlays;
}
internal class SkillDefInfo
{
	public string skillName;

	public string skillNameToken;

	public string skillDescriptionToken;

	public string[] keywordTokens = new string[0];

	public Sprite skillIcon;

	public SerializableEntityStateType activationState;

	public InterruptPriority interruptPriority;

	public string activationStateMachineName;

	public float baseRechargeInterval;

	public int baseMaxStock = 1;

	public int rechargeStock = 1;

	public int requiredStock = 1;

	public int stockToConsume = 1;

	public bool isCombatSkill = true;

	public bool canceledFromSprinting;

	public bool forceSprintDuringState;

	public bool cancelSprintingOnActivation = true;

	public bool beginSkillCooldownOnSkillEnd;

	public bool fullRestockOnAssign = true;

	public bool resetCooldownTimerOnUse;

	public bool mustKeyPress;

	public SkillDefInfo()
	{
	}

	public SkillDefInfo(string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false)
	{
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		skillName = skillNameToken;
		this.skillNameToken = skillNameToken;
		this.skillDescriptionToken = skillDescriptionToken;
		this.skillIcon = skillIcon;
		this.activationState = activationState;
		this.activationStateMachineName = activationStateMachineName;
		interruptPriority = (InterruptPriority)0;
		isCombatSkill = true;
		baseRechargeInterval = 0f;
		requiredStock = 0;
		stockToConsume = 0;
		cancelSprintingOnActivation = !agile;
		if (agile)
		{
			keywordTokens = new string[1] { "KEYWORD_AGILE" };
		}
	}
}
namespace SettMod
{
	public class MenuSound : MonoBehaviour
	{
		private uint playID;

		private uint playID2;

		private void OnDestroy()
		{
			if (playID != 0)
			{
				AkSoundEngine.StopPlayingID(playID);
			}
			if (playID2 != 0)
			{
				AkSoundEngine.StopPlayingID(playID2);
			}
		}

		private void OnEnable()
		{
			((MonoBehaviour)this).Invoke("PlayEffect", 0.05f);
		}

		private void PlayEffect()
		{
			if (Config.voiceLines.Value)
			{
				playID = Util.PlaySound("SettMenuVO", ((Component)this).gameObject);
			}
			playID2 = Util.PlaySound("SettMenuSFX", ((Component)this).gameObject);
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[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.Lemonlust.Sett", "Sett", "4.6.1")]
	public class SettPlugin : BaseUnityPlugin
	{
		public const string developerPrefix = "SETT";

		public const string MODNAME = "Sett";

		public const string MODUID = "com.Lemonlust.Sett";

		public const string MODVERSION = "4.6.1";

		public static SettPlugin instance;

		public static ModdedDamageType settDamage;

		internal List<SurvivorBase> Survivors = new List<SurvivorBase>();

		private GritGauge gritGauge;

		public void OnDestroy()
		{
			try
			{
				UnHooks();
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)(ex.Message + " - " + ex.StackTrace));
			}
		}

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			instance = this;
			try
			{
				settDamage = DamageAPI.ReserveDamageType();
				Assets.Initialize();
				Config.ReadConfig();
				CameraParams.InitializeParams();
				SettMod.Modules.States.RegisterStates();
				Buffs.RegisterBuffs();
				Projectiles.RegisterProjectiles();
				Tokens.AddTokens();
				ItemDisplays.PopulateDisplays();
				new Sett().Initialize();
				new ContentPacks().Initialize();
				ContentManager.onContentPacksAssigned += LateSetup;
				Hook();
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)(ex.Message + " - " + ex.StackTrace));
			}
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self))
			{
				float num = Mathf.Floor(self.level / 4f);
				if (self.HasBuff(Buffs.regenBuff))
				{
					float num2 = self.GetBuffCount(Buffs.regenBuff);
					self.regen += num2 * (0.25f + num * 0.25f);
				}
				if (self.HasBuff(Buffs.lethalBuff))
				{
					float num3 = self.GetBuffCount(Buffs.lethalBuff);
					self.attackSpeed += self.attackSpeed * (num3 * 0.1f);
				}
				if (self.HasBuff(Buffs.conquerorBuff))
				{
					float num4 = self.GetBuffCount(Buffs.conquerorBuff);
					self.damage += num4 * (0.6f + num * 0.045f);
				}
				if (self.HasBuff(Buffs.movementSpeedBuff))
				{
					self.moveSpeed += self.moveSpeed * (0.3f + num * 0.05f);
				}
			}
		}

		private void CreateGritGauge(HUD hud)
		{
			//IL_0096: 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_00c0: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			if (!Object.op_Implicit((Object)(object)gritGauge) && (Object)(object)hud != (Object)null && (Object)(object)hud.mainUIPanel != (Object)null)
			{
				gritGauge = hud.mainUIPanel.GetComponentInChildren<GritGauge>();
				if (!Object.op_Implicit((Object)(object)gritGauge))
				{
					GameObject val = Object.Instantiate<GameObject>(Assets.mainAssetBundle.LoadAsset<GameObject>("GritGaugePanelNew"));
					gritGauge = val.AddComponent<GritGauge>();
					val.transform.SetParent(hud.mainUIPanel.transform);
					RectTransform component = val.GetComponent<RectTransform>();
					component.anchorMin = new Vector2(0.5f, 0.5f);
					component.anchorMax = new Vector2(0.5f, 0.5f);
					component.pivot = new Vector2(0.5f, 0.5f);
					component.sizeDelta = new Vector2(120f, 120f);
					component.anchoredPosition = new Vector2(-619f, -478f);
					((Transform)component).localRotation = Quaternion.Euler(0f, 354f, 0f);
					((Transform)component).localScale = new Vector3(1f, 1f, 1f);
					val.gameObject.SetActive(false);
				}
			}
		}

		private void Hook()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			HUD.Awake += new hook_Awake(HUD_Awake);
			HUD.onHudTargetChangedGlobal += HUD_onHudTargetChangedGlobal;
			PickupPickerController.FixedUpdateServer += new hook_FixedUpdateServer(PickupPickerController_FixedUpdateServer);
		}

		private void HUD_Awake(orig_Awake orig, HUD self)
		{
			CreateGritGauge(self);
			orig.Invoke(self);
		}

		private void HUD_onHudTargetChangedGlobal(HUD obj)
		{
			if (Object.op_Implicit((Object)(object)obj) && Object.op_Implicit((Object)(object)obj.targetBodyObject) && Object.op_Implicit((Object)(object)gritGauge))
			{
				GritComponent component = obj.targetBodyObject.GetComponent<GritComponent>();
				if (Object.op_Implicit((Object)(object)component))
				{
					((Component)gritGauge).gameObject.SetActive(true);
					gritGauge.source = component;
				}
				else
				{
					((Component)gritGauge).gameObject.SetActive(false);
					gritGauge.source = null;
				}
			}
		}

		private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj)
		{
		}

		private void PickupPickerController_FixedUpdateServer(orig_FixedUpdateServer orig, PickupPickerController self)
		{
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			CharacterMaster currentParticipantMaster = self.networkUIPromptController.currentParticipantMaster;
			if (!Object.op_Implicit((Object)(object)currentParticipantMaster))
			{
				return;
			}
			CharacterBody body = currentParticipantMaster.GetBody();
			Interactor val = (Object.op_Implicit((Object)(object)body) ? ((Component)body).GetComponent<Interactor>() : null);
			if (Object.op_Implicit((Object)(object)body))
			{
				Vector3 val2 = body.inputBank.aimOrigin - ((Component)self).transform.position;
				if (!((double)((Vector3)(ref val2)).sqrMagnitude > (Object.op_Implicit((Object)(object)val) ? Math.Pow(val.maxInteractionDistance + self.cutoffDistance, 2.0) : ((double)(self.cutoffDistance * self.cutoffDistance)))))
				{
					return;
				}
			}
			self.networkUIPromptController.SetParticipantMaster((CharacterMaster)null);
		}

		private void UnHooks()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Expected O, but got Unknown
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Expected O, but got Unknown
			CharacterBody.RecalculateStats -= new hook_RecalculateStats(CharacterBody_RecalculateStats);
			HUD.Awake -= new hook_Awake(HUD_Awake);
			HUD.onHudTargetChangedGlobal -= HUD_onHudTargetChangedGlobal;
			PickupPickerController.FixedUpdateServer -= new hook_FixedUpdateServer(PickupPickerController_FixedUpdateServer);
		}
	}
}
namespace SettMod.UI
{
	public class GritGauge : MonoBehaviour
	{
		private Image gritBar;

		private Image gritBarBG;

		private TextMeshProUGUI currentGritText;

		private TextMeshProUGUI maxGritText;

		public GritComponent source { get; set; }

		public void Update()
		{
			UpdateGritGauge(Time.deltaTime);
		}

		private void Awake()
		{
			Transform obj = ((Component)this).gameObject.GetComponentInChildren<Transform>().Find("Text");
			TextMeshProUGUI component = ((Component)((Component)obj).GetComponentInChildren<Transform>().Find("CurrentGrit")).GetComponent<TextMeshProUGUI>();
			TextMeshProUGUI component2 = ((Component)((Component)obj).GetComponentInChildren<Transform>().Find("MaxGrit")).GetComponent<TextMeshProUGUI>();
			Transform val = ((Component)this).gameObject.GetComponentInChildren<Transform>().Find("Grit");
			gritBar = ((Component)val).GetComponent<Image>();
			Transform val2 = ((Component)this).gameObject.GetComponentInChildren<Transform>().Find("Background");
			gritBarBG = ((Component)val2).GetComponent<Image>();
			if (Object.op_Implicit((Object)(object)component))
			{
				currentGritText = component;
			}
			if (Object.op_Implicit((Object)(object)component2))
			{
				maxGritText = component2;
			}
		}

		private void Start()
		{
			UpdateGritGauge(0f);
		}

		private void UpdateGritGauge(float deltaTime)
		{
			if (Object.op_Implicit((Object)(object)source) && Object.op_Implicit((Object)(object)gritBar))
			{
				((TMP_Text)currentGritText).text = ((int)source.GetCurrentGrit()).ToString();
				((TMP_Text)maxGritText).text = ((int)source.GetMaxGrit()).ToString();
				gritBar.fillAmount = source.GetCurrentGrit() / source.GetMaxGrit();
			}
		}
	}
}
namespace SettMod.States
{
	public class SettMain : GenericCharacterMain
	{
		private ChildLocator childLocator;

		private Animator animator;

		public LocalUser localUser;

		public override void OnEnter()
		{
			((GenericCharacterMain)this).OnEnter();
			childLocator = ((EntityState)this).GetModelChildLocator();
			animator = ((EntityState)this).GetModelAnimator();
			localUser = LocalUserManager.readOnlyLocalUsersList[0];
		}

		public override void Update()
		{
			//IL_0036: 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_007e: 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)
			((GenericCharacterMain)this).Update();
			if (((EntityState)this).isAuthority && ((EntityState)this).characterMotor.isGrounded && !localUser.isUIFocused)
			{
				if (Input.GetKeyDown(Config.tauntKeybind.Value))
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new Taunt(), (InterruptPriority)0);
				}
				else if (Input.GetKeyDown(Config.jokeKeybind.Value))
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new Joke(), (InterruptPriority)0);
				}
				else if (Input.GetKeyDown(Config.laughKeybind.Value))
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new Laugh(), (InterruptPriority)0);
				}
				else if (Input.GetKeyDown(Config.danceKeybind.Value))
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new Dance(), (InterruptPriority)0);
				}
			}
		}

		public override void FixedUpdate()
		{
			((GenericCharacterMain)this).FixedUpdate();
		}

		public override void OnExit()
		{
			((GenericCharacterMain)this).OnExit();
		}
	}
}
namespace SettMod.States.Emotes
{
	public class Dance : BaseEmote
	{
		public bool spam;

		public override void OnEnter()
		{
			if (spam)
			{
				animString = "DanceSpam";
			}
			else
			{
				animString = "Dance";
			}
			duration = float.MaxValue;
			base.OnEnter();
		}
	}
	public class Joke : BaseEmote
	{
		private GameObject mom;

		public override void OnEnter()
		{
			animString = "Joke";
			duration = 8.667f;
			soundString = "SettJoke";
			base.OnEnter();
			if (!Object.op_Implicit((Object)(object)mom))
			{
				mom = Object.Instantiate<GameObject>(Assets.mainAssetBundle.LoadAsset<GameObject>("momPortrait"));
			}
			mom.SetActive(false);
		}

		public override void FixedUpdate()
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (Object.op_Implicit((Object)(object)mom))
			{
				mom.transform.parent = ((Component)((BaseState)this).FindModelChild("L_Hand")).transform;
				mom.transform.position = ((Component)((BaseState)this).FindModelChild("L_Hand")).transform.position;
				mom.transform.localPosition = new Vector3(0.1517885f, 0.1841809f, -0.1253804f);
				mom.transform.localRotation = Quaternion.Euler(-176.593f, 85.119f, -9.799011f);
			}
			if (((EntityState)this).fixedAge >= 2.3f && !mom.activeSelf)
			{
				mom.SetActive(true);
			}
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)mom))
			{
				EntityState.Destroy((Object)(object)mom.gameObject);
			}
			base.OnExit();
		}
	}
	public class Laugh : BaseEmote
	{
		public override void OnEnter()
		{
			animString = "Laugh";
			duration = 3.667f;
			soundString = "SettLaugh";
			base.OnEnter();
		}
	}
	public class Taunt : BaseEmote
	{
		public override void OnEnter()
		{
			animString = "Taunt";
			duration = 6.417f;
			soundString = "SettTaunt";
			base.OnEnter();
		}
	}
}
namespace SettMod.SkillStates
{
	public class Facebreaker : BaseSkillState
	{
		public static Vector3 CameraPosition = new Vector3(0f, -1.3f, -10f);

		public static float pullForce = Config.faceBreakerPullForce.Value;

		public static float pullRadius = Config.faceBreakerPullRadius.Value;

		public GameObject blastEffectPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/effects/SonicBoomEffect");

		public float duration;

		public int maximumPullCount = int.MaxValue;

		public Transform pullOrigin;

		public AnimationCurve pullStrengthCurve;

		protected Animator animator;

		protected float baseDuration = 0.8f;

		protected float damageCoefficient = 6f;

		protected string hitboxName = "FaceBreaker";

		protected NetworkSoundEventIndex impactSound;

		protected float startUp = 0.5f;

		protected float stopwatch;

		private OverlapAttack attack;

		private bool back;

		private Ray downRay;

		private bool front;

		private bool hasFired;

		private bool pulling;

		private List<CharacterBody> pullList = new List<CharacterBody>();

		private Transform slamIndicatorInstance;

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= startUp && !hasFired)
			{
				hasFired = true;
				if (Config.voiceLines.Value)
				{
					Util.PlaySound("SettEVO", ((EntityState)this).gameObject);
				}
				string text = "";
				if (front && back)
				{
					text = "Facebreaker_Both";
				}
				else if (back && !front)
				{
					text = "Facebreaker_Back";
				}
				else if (front && !back)
				{
					text = "Facebreaker_Front";
				}
				else if (!front && !back)
				{
					text = "Facebreaker_Miss";
				}
				((EntityState)this).PlayCrossfade("Fullbody, Override", text, "FaceBreaker.playbackRate", duration, 0.05f);
			}
			if (stopwatch <= duration)
			{
				PullEnemies(Time.fixedDeltaTime);
			}
			if (stopwatch >= duration * startUp && ((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null))
			{
				OnHitEnemyAuthority();
			}
			if (stopwatch >= duration && ((EntityState)this).isAuthority && hasFired)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}

		public override void OnEnter()
		{
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			damageCoefficient = Config.faceBreakerDamageCoefficient.Value;
			((EntityState)this).characterBody.SetAimTimer(2f);
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			startUp /= ((BaseState)this).attackSpeedStat;
			hasFired = false;
			animator = ((EntityState)this).GetModelAnimator();
			((EntityState)this).PlayCrossfade("Fullbody, Override", "Facebreaker_Start", "FaceBreakerStartUp.playbackRate", startUp, 0.05f);
			HitBoxGroup val = null;
			val = Array.Find(((Component)((EntityState)this).GetModelTransform()).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName);
			pullStrengthCurve = AnimationCurve.EaseInOut(0.1f, 0f, 1f, 1f);
			Util.PlaySound("SettESFX", ((EntityState)this).gameObject);
			impactSound = Assets.swordHitSoundEvent.index;
			attack = CreateAttack(val);
			CreateIndicator();
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)slamIndicatorInstance).gameObject);
			}
			((EntityState)this).OnExit();
		}

		public override void Update()
		{
			((EntityState)this).Update();
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				UpdateSlamIndicator();
			}
		}

		protected OverlapAttack CreateAttack(HitBoxGroup hitBoxGroup)
		{
			//IL_0000: 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)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: 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_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: 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_009f: Expected O, but got Unknown
			//IL_00a0: Expected O, but got Unknown
			OverlapAttack val = new OverlapAttack
			{
				damageType = DamageTypeCombo.op_Implicit((DamageType)40),
				attacker = ((EntityState)this).gameObject,
				inflictor = ((EntityState)this).gameObject,
				teamIndex = ((BaseState)this).GetTeam(),
				damage = damageCoefficient * ((BaseState)this).damageStat,
				procCoefficient = 1f,
				hitEffectPrefab = Assets.swordHitImpactEffect,
				forceVector = Vector3.zero,
				pushAwayForce = 0f,
				hitBoxGroup = hitBoxGroup,
				isCrit = ((BaseState)this).RollCrit(),
				impactSound = impactSound
			};
			DamageAPI.AddModdedDamageType(val, SettPlugin.settDamage);
			return val;
		}

		protected virtual void OnHitEnemyAuthority()
		{
			Util.PlaySound("SettHitSFX", ((EntityState)this).gameObject);
		}

		private void AddToPullList(GameObject affectedObject)
		{
			CharacterBody component = affectedObject.GetComponent<CharacterBody>();
			if (!pullList.Contains(component))
			{
				pullList.Add(component);
			}
		}

		private void CreateIndicator()
		{
			//IL_0012: 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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_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_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: 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_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_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				Ray val = default(Ray);
				((Ray)(ref val)).direction = Vector3.down;
				((Ray)(ref val)).origin = ((EntityState)this).transform.position;
				downRay = val;
				slamIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				slamIndicatorInstance.localScale = Vector3.one * pullRadius;
				for (int i = 0; i <= 18; i++)
				{
					Vector3 val2 = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * pullRadius;
					Vector3 val3 = ((EntityState)this).characterBody.footPosition - val2;
					Vector3 normalized = ((Vector3)(ref val3)).normalized;
					val2.y = ((EntityState)this).characterBody.footPosition.y;
					EffectManager.SpawnEffect(blastEffectPrefab, new EffectData
					{
						origin = val2,
						scale = 1f * pullRadius,
						rotation = Quaternion.LookRotation(normalized)
					}, false);
				}
			}
		}

		private void InitializePull()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			if (pulling)
			{
				return;
			}
			pulling = true;
			Collider[] array = Physics.OverlapSphere(Object.op_Implicit((Object)(object)pullOrigin) ? pullOrigin.position : ((EntityState)this).transform.position, pullRadius);
			int i = 0;
			int num = 0;
			for (; i < array.Length; i++)
			{
				if (num >= maximumPullCount)
				{
					break;
				}
				HealthComponent component = ((Component)array[i]).GetComponent<HealthComponent>();
				if (Object.op_Implicit((Object)(object)component))
				{
					TeamComponent component2 = ((Component)component).GetComponent<TeamComponent>();
					bool flag = false;
					if (Object.op_Implicit((Object)(object)component2))
					{
						flag = component2.teamIndex == ((BaseState)this).GetTeam();
					}
					if (!flag)
					{
						AddToPullList(((Component)component).gameObject);
						num++;
					}
				}
			}
		}

		private void PullEnemies(float deltaTime)
		{
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: 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)
			//IL_009f: 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_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: 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_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: 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_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: 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_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: 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_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			if (!pulling)
			{
				InitializePull();
			}
			for (int i = 0; i < pullList.Count; i++)
			{
				CharacterBody val = pullList[i];
				if (!Object.op_Implicit((Object)(object)val) || !Object.op_Implicit((Object)(object)val.transform))
				{
					continue;
				}
				Vector3 val2 = (Object.op_Implicit((Object)(object)pullOrigin) ? pullOrigin.position : ((EntityState)this).transform.position) - val.corePosition;
				float num = pullStrengthCurve.Evaluate(((Vector3)(ref val2)).magnitude / pullRadius);
				Vector3 val3 = ((Vector3)(ref val2)).normalized * num * deltaTime * pullForce;
				CharacterMotor component = ((Component)val).GetComponent<CharacterMotor>();
				Vector3 forward = ((EntityState)this).characterDirection.forward;
				Vector3 normalized = ((Vector3)(ref forward)).normalized;
				Vector3 val4 = val.transform.position - (Object.op_Implicit((Object)(object)pullOrigin) ? pullOrigin.position : ((EntityState)this).transform.position);
				if (Object.op_Implicit((Object)(object)component))
				{
					component.rootMotion += val3;
					if (component.useGravity)
					{
						component.rootMotion.y -= Physics.gravity.y * deltaTime * num;
						if (Vector3.Dot(normalized, val4) < 0f)
						{
							back = true;
						}
						else if (Vector3.Dot(normalized, val4) > 0f)
						{
							front = true;
						}
						else if (Vector3.Dot(normalized, val4) == 0f)
						{
							front = true;
						}
					}
					continue;
				}
				Rigidbody component2 = ((Component)val).GetComponent<Rigidbody>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					component2.velocity += val3;
					if (Vector3.Dot(normalized, val4) < 0f)
					{
						back = true;
					}
					else if (Vector3.Dot(normalized, val4) > 0f)
					{
						front = true;
					}
					else if (Vector3.Dot(normalized, val4) == 0f)
					{
						front = true;
					}
				}
			}
		}

		private void UpdateSlamIndicator()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: 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_006f: 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)
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				float num = 250f;
				Ray val = default(Ray);
				((Ray)(ref val)).direction = Vector3.down;
				((Ray)(ref val)).origin = ((EntityState)this).transform.position;
				downRay = val;
				RaycastHit val2 = default(RaycastHit);
				if (Physics.Raycast(downRay, ref val2, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
				{
					((Component)slamIndicatorInstance).transform.position = ((RaycastHit)(ref val2)).point;
					((Component)slamIndicatorInstance).transform.up = ((RaycastHit)(ref val2)).normal;
				}
			}
		}
	}
	public class SettGrabController : MonoBehaviour
	{
		public Transform pivotTransform;

		private CharacterBody body;

		private CapsuleCollider capsuleCollider;

		private CharacterDirection direction;

		private ModelLocator modelLocator;

		private Transform modelTransform;

		private CharacterMotor motor;

		private Quaternion originalRotation;

		private SphereCollider sphereCollider;

		public void Release()
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)modelLocator))
			{
				((Behaviour)modelLocator).enabled = true;
			}
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				modelTransform.rotation = originalRotation;
			}
			if (Object.op_Implicit((Object)(object)direction))
			{
				((Behaviour)direction).enabled = true;
			}
			if (Object.op_Implicit((Object)(object)capsuleCollider))
			{
				((Collider)capsuleCollider).enabled = true;
			}
			if (Object.op_Implicit((Object)(object)sphereCollider))
			{
				((Collider)sphereCollider).enabled = true;
			}
			Object.Destroy((Object)(object)this);
		}

		private void Awake()
		{
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			body = ((Component)this).GetComponent<CharacterBody>();
			motor = ((Component)this).GetComponent<CharacterMotor>();
			direction = ((Component)this).GetComponent<CharacterDirection>();
			modelLocator = ((Component)this).GetComponent<ModelLocator>();
			capsuleCollider = ((Component)this).GetComponent<CapsuleCollider>();
			sphereCollider = ((Component)this).GetComponent<SphereCollider>();
			if (Object.op_Implicit((Object)(object)direction))
			{
				((Behaviour)direction).enabled = false;
			}
			if (Object.op_Implicit((Object)(object)capsuleCollider))
			{
				((Collider)capsuleCollider).enabled = false;
			}
			if (Object.op_Implicit((Object)(object)sphereCollider))
			{
				((Collider)sphereCollider).enabled = false;
			}
			if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform))
			{
				modelTransform = modelLocator.modelTransform;
				originalRotation = modelTransform.rotation;
				if (((Object)((Component)modelLocator).gameObject).name == "GreaterWispBody(Clone)")
				{
					modelLocator.dontReleaseModelOnDeath = true;
					modelLocator.dontDetatchFromParent = true;
				}
				((Behaviour)modelLocator).enabled = false;
			}
		}

		private void FixedUpdate()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: 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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)motor))
			{
				motor.disableAirControlUntilCollision = true;
				motor.velocity = Vector3.zero;
				motor.rootMotion = Vector3.zero;
				((BaseCharacterController)motor).Motor.SetPosition(pivotTransform.position, true);
			}
			if (Object.op_Implicit((Object)(object)pivotTransform))
			{
				((Component)this).transform.position = pivotTransform.position;
			}
			else
			{
				Release();
			}
			if (Object.op_Implicit((Object)(object)modelTransform))
			{
				modelTransform.position = pivotTransform.position;
				modelTransform.rotation = pivotTransform.rotation;
			}
		}
	}
	public class HayMaker : BaseSkillState
	{
		public static Vector3 CameraPosition = new Vector3(1.8f, -2.4f, -8f);

		public static float hayMakerDamageCoefficient = Config.hayMakerDamageCoefficient.Value;

		public static float hayMakerForce = 1000f;

		public static float hayMakerGritBonus = Config.hayMakerGritBonus.Value;

		public static float hayMakerGritBonusPer4 = Config.hayMakerGritBonusPer4.Value;

		public static float hayMakerProcCoefficient = 1f;

		public static float hayMakerRadius = 55f;

		public GameObject blastEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Junk/Treebot/SonicBoomEffect.prefab").WaitForCompletion();

		public float duration;

		protected Animator animator;

		protected float baseDuration = 1.51f;

		protected float EarlyExitTime = 1.2f;

		protected float startUp = 0.78f;

		protected float stopwatch;

		private float gritSnapShot;

		private bool hasFired;

		private float maxGritSnapShot;

		private Transform slamIndicatorInstance;

		private TemporaryOverlay temporaryOverlay;

		public override void FixedUpdate()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: 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_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Expected O, but got Unknown
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			Ray aimRay = ((BaseState)this).GetAimRay();
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && ((Ray)(ref aimRay)).direction != Vector3.zero)
			{
				((EntityState)this).characterDirection.moveVector = ((Ray)(ref aimRay)).direction;
			}
			if (!Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				CreateIndicator();
			}
			UpdateSlamIndicator();
			if (stopwatch >= startUp && !hasFired)
			{
				hasFired = true;
				if (Config.voiceLines.Value)
				{
					Util.PlaySound("SettWVO", ((EntityState)this).gameObject);
				}
				if (NetworkServer.active)
				{
					Fire();
				}
				for (int i = 0; i <= 25; i++)
				{
					float num = 45f;
					Vector3 val = Util.ApplySpread(((Ray)(ref aimRay)).direction, 10f, num, 1f, 1f, 0f, 0f);
					EffectManager.SpawnEffect(blastEffectPrefab, new EffectData
					{
						origin = ((EntityState)this).characterBody.corePosition,
						scale = 100f,
						rotation = Util.QuaternionSafeLookRotation(val)
					}, false);
				}
			}
			if (stopwatch >= EarlyExitTime && ((EntityState)this).isAuthority && hasFired)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}

		public override void OnEnter()
		{
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			((BaseState)this).StartAimMode(baseDuration, false);
			animator = ((EntityState)this).GetModelAnimator();
			hasFired = false;
			duration = baseDuration;
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			GritComponent component = ((EntityState)this).GetComponent<GritComponent>();
			float currentGrit = component.GetCurrentGrit();
			float maxGrit = component.GetMaxGrit();
			gritSnapShot = currentGrit;
			maxGritSnapShot = maxGrit;
			((EntityState)this).healthComponent.AddBarrierAuthority(currentGrit);
			((EntityState)this).GetComponent<GritComponent>().AddGritAuthority(0f - currentGrit);
			if (gritSnapShot >= maxGritSnapShot)
			{
				((EntityState)this).PlayCrossfade("Fullbody, Override", "HayMaker2", "HayMaker.playbackRate", duration, 0.2f);
				Transform modelTransform = ((EntityState)this).GetModelTransform();
				if (Object.op_Implicit((Object)(object)modelTransform))
				{
					CharacterModel component2 = ((Component)modelTransform).GetComponent<CharacterModel>();
					if (Object.op_Implicit((Object)(object)component2))
					{
						temporaryOverlay = ((EntityState)this).gameObject.AddComponent<TemporaryOverlay>();
						Material originalMaterial = Object.Instantiate<Material>(LegacyResourcesAPI.Load<Material>("Materials/matVagrantEnergized"));
						temporaryOverlay.originalMaterial = originalMaterial;
						temporaryOverlay.AddToCharacerModel(component2);
					}
				}
			}
			else
			{
				((EntityState)this).PlayCrossfade("Fullbody, Override", "HayMaker", "HayMaker.playbackRate", duration, 0.2f);
			}
			Util.PlaySound("SettWSFX", ((EntityState)this).gameObject);
			if (!Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				CreateIndicator();
			}
		}

		public override void OnExit()
		{
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)slamIndicatorInstance).gameObject);
			}
			if (Object.op_Implicit((Object)(object)temporaryOverlay))
			{
				EntityState.Destroy((Object)(object)temporaryOverlay);
			}
			((EntityState)this).OnExit();
		}

		protected virtual void OnHitEnemyAuthority()
		{
		}

		private void Fire()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: 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_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_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Expected O, but got Unknown
			//IL_0107: 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_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_011d: 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_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: 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_01de: 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_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Expected O, but got Unknown
			new List<HurtBox>();
			foreach (HurtBox item in new SphereSearch
			{
				radius = 15f,
				mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask,
				origin = ((Component)slamIndicatorInstance).transform.position
			}.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(((EntityState)this).teamComponent.teamIndex)).FilterCandidatesByDistinctHurtBoxEntities()
				.GetHurtBoxes()
				.ToList())
			{
				float num = Mathf.Floor(((EntityState)this).characterBody.level / 4f);
				float num2 = hayMakerGritBonus + num * hayMakerGritBonusPer4;
				Vector3 val = ((Component)item).gameObject.transform.position - ((EntityState)this).characterBody.corePosition;
				Vector3 normalized = ((Vector3)(ref val)).normalized;
				DamageInfo val2 = new DamageInfo();
				val2.damage = ((BaseState)this).damageStat * hayMakerDamageCoefficient + gritSnapShot * num2;
				val2.attacker = ((EntityState)this).gameObject;
				val2.inflictor = ((EntityState)this).gameObject;
				val2.force = Vector3.zero + normalized * 3000f;
				val2.crit = ((BaseState)this).RollCrit();
				val2.procCoefficient = hayMakerProcCoefficient;
				val2.position = ((Component)item).gameObject.transform.position;
				val2.damageType = DamageTypeCombo.op_Implicit((DamageType)2);
				DamageAPI.AddModdedDamageType(val2, SettPlugin.settDamage);
				item.healthComponent.TakeDamage(val2);
				GlobalEventManager.instance.OnHitEnemy(val2, ((Component)item.healthComponent).gameObject);
				GlobalEventManager.instance.OnHitAll(val2, ((Component)item.healthComponent).gameObject);
				GameObject swordHitImpactEffect = Assets.swordHitImpactEffect;
				if (Object.op_Implicit((Object)(object)swordHitImpactEffect))
				{
					EffectManager.SpawnEffect(swordHitImpactEffect, new EffectData
					{
						origin = ((Component)item.healthComponent).gameObject.transform.position,
						rotation = Quaternion.identity,
						networkSoundEventIndex = Assets.swordHitSoundEvent.index
					}, true);
				}
			}
		}

		private void CreateIndicator()
		{
			//IL_0013: 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_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: 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)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				float num = 13f;
				Ray aimRay = ((BaseState)this).GetAimRay();
				((Ray)(ref aimRay)).origin = ((BaseState)this).FindModelChild("R_Hand").position;
				Vector3 point = ((Ray)(ref aimRay)).GetPoint(num);
				slamIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				slamIndicatorInstance.localScale = Vector3.one * 15f;
				((Component)slamIndicatorInstance).transform.position = point;
			}
		}

		private void UpdateSlamIndicator()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				float num = 13f;
				Ray aimRay = ((BaseState)this).GetAimRay();
				((Ray)(ref aimRay)).origin = ((BaseState)this).FindModelChild("R_Hand").position;
				Vector3 point = ((Ray)(ref aimRay)).GetPoint(num);
				((Component)slamIndicatorInstance).transform.position = point;
			}
		}
	}
	public class Dash : BaseSkillState
	{
		public static float duration = 0.4f;

		public static float maxSpeed = 35f;

		public static float minSpeed = 15f;

		public static string dodgeSoundString = "SettDash";

		public static float dodgeFOV = DodgeState.dodgeFOV;

		protected Vector3 dashVelocity;

		public float dashSpeed { get; private set; }

		public override void OnEnter()
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: 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_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			((EntityState)this).characterMotor.disableAirControlUntilCollision = false;
			Vector3 velocity = ((EntityState)this).characterMotor.velocity;
			Ray aimRay = ((BaseState)this).GetAimRay();
			dashVelocity = CalculateLungeVelocity(velocity, ((Ray)(ref aimRay)).direction, duration, minSpeed, maxSpeed);
			((EntityState)this).characterMotor.velocity = dashVelocity;
			((EntityState)this).characterDirection.forward = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).normalized;
			dashSpeed = ((Vector3)(ref ((EntityState)this).characterMotor.velocity)).magnitude;
			((EntityState)this).PlayCrossfade("FullBody, Override", "Roll", "Roll.playbackRate", 0.7f, 0.05f);
			Util.PlaySound(dodgeSoundString, ((EntityState)this).gameObject);
		}

		public static Vector3 CalculateLungeVelocity(Vector3 currentVelocity, Vector3 aimDirection, float charge, float minLungeSpeed, float maxLungeSpeed)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			currentVelocity = ((Vector3.Dot(currentVelocity, aimDirection) < 0f) ? Vector3.zero : Vector3.Project(currentVelocity, aimDirection));
			return currentVelocity + aimDirection * Mathf.Lerp(minLungeSpeed, maxLungeSpeed, charge);
		}

		private void AttemptSlam()
		{
			//IL_0001: 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_000c: 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_0013: 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_001d: 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_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: 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_0063: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).GetAimRay();
			BullseyeSearch val = new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByLoS = true,
				searchOrigin = ((EntityState)this).transform.position,
				searchDirection = Random.onUnitSphere,
				sortMode = (SortMode)1,
				maxDistanceFilter = 8f,
				maxAngleFilter = 360f
			};
			val.RefreshCandidates();
			val.FilterOutGameObject(((EntityState)this).gameObject);
			HurtBox val2 = val.GetResults().FirstOrDefault();
			if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.healthComponent) && Object.op_Implicit((Object)(object)val2.healthComponent.body))
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new ShowStopper());
			}
		}

		public override void FixedUpdate()
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams))
			{
				((EntityState)this).cameraTargetParams.fovOverride = Mathf.Lerp(dodgeFOV, 60f, ((EntityState)this).fixedAge / duration);
			}
			((EntityState)this).characterMotor.velocity = dashVelocity;
			((EntityState)this).characterDirection.forward = dashVelocity;
			((EntityState)this).characterBody.isSprinting = true;
			AttemptSlam();
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((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();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}
	}
	public class ShowStopper : BaseSkillState
	{
		public static float bonusHealthCoefficient = Config.bonusHealthCoefficient.Value;

		public static Vector3 CameraPosition = new Vector3(0f, 3f, -25f);

		public static float dodgeFOV;

		public static float dropForce = 80f;

		public static float jumpDuration = 0.6f;

		public static float slamDamageCoefficient = Config.slamDamageCoefficient.Value;

		public static float slamForce = Config.slamForce.Value;

		public static float slamProcCoefficient = 1f;

		public static float slamRadius = Config.slamRadius.Value;

		protected Animator animator;

		protected float bonusDamage;

		private bool detonateNextFrame;

		private Ray downRay;

		private Vector3 flyVector = Vector3.zero;

		private SettGrabController grabController;

		private bool hasDropped;

		private float initialTime;

		private Transform modelTransform;

		private Transform slamCenterIndicatorInstance;

		private Transform slamIndicatorInstance;

		private CameraParamsOverrideHandle handle;

		public override void FixedUpdate()
		{
			//IL_0013: 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_0056: 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_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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_008e: 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_0094: 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_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: 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)
			((EntityState)this).FixedUpdate();
			CameraTargetParams cameraTargetParams = ((EntityState)this).cameraTargetParams;
			CharacterCameraParamsData currentCameraParamsData = cameraTargetParams.currentCameraParamsData;
			float num = 1f + Time.fixedTime - initialTime;
			float num2 = 8f / Mathf.Pow(num, 2f);
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(0f, 0f, -1f);
			currentCameraParamsData.idealLocalCameraPos = BlendableVector3.op_Implicit(CameraPosition + num2 * val);
			CameraParamsOverrideRequest val2 = default(CameraParamsOverrideRequest);
			val2.cameraParamsData = currentCameraParamsData;
			val2.priority = 0f;
			CameraParamsOverrideRequest val3 = val2;
			handle = cameraTargetParams.AddParamsOverride(val3, 0.2f);
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(handle, 0.2f);
			if (!hasDropped)
			{
				CharacterMotor characterMotor = ((EntityState)this).characterMotor;
				characterMotor.rootMotion += flyVector * (8f * FlyUpState.speedCoefficientCurve.Evaluate(((EntityState)this).fixedAge / jumpDuration) * Time.fixedDeltaTime);
				((EntityState)this).characterMotor.velocity.y = 0f;
				AttemptGrab(10f);
			}
			if (((EntityState)this).fixedAge >= 0.25f * jumpDuration && !Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				CreateIndicator();
			}
			if (((EntityState)this).fixedAge >= jumpDuration && !hasDropped)
			{
				StartDrop();
			}
			if (hasDropped && ((EntityState)this).isAuthority && (detonateNextFrame || (((BaseCharacterController)((EntityState)this).characterMotor).Motor.GroundingStatus.IsStableOnGround && !((BaseCharacterController)((EntityState)this).characterMotor).Motor.LastGroundingStatus.IsStableOnGround)))
			{
				LandingImpact();
				((EntityState)this).outer.SetNextStateToMain();
			}
			if (((EntityState)this).fixedAge >= 5f && ((EntityState)this).isAuthority && hasDropped)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)1;
		}

		public override void OnEnter()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: 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_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			((EntityState)this).characterMotor.onMovementHit += new MovementHitDelegate(OnMovementHit);
			modelTransform = ((EntityState)this).GetModelTransform();
			flyVector = Vector3.up;
			hasDropped = false;
			initialTime = Time.fixedTime;
			string[] array = new string[3] { "ShowStopper", "ShowStopper2", "ShowStopper3" };
			int num = new Random().Next(array.Length);
			((EntityState)this).PlayCrossfade("FullBody, Override", array[num], "HighJump.playbackRate", jumpDuration, 0.05f);
			Util.PlaySound("SettRSFX", ((EntityState)this).gameObject);
			if (Config.voiceLines.Value)
			{
				Util.PlaySound("SettRVO", ((EntityState)this).gameObject);
			}
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.ForceUnground(0.1f);
			((EntityState)this).characterMotor.velocity = ((EntityState)this).characterMotor.velocity * 0.65f;
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1);
			((EntityState)this).gameObject.layer = LayerIndex.fakeActor.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
		}

		public override void OnExit()
		{
			//IL_006f: 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_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Expected O, but got Unknown
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			if (Object.op_Implicit((Object)(object)grabController))
			{
				grabController.Release();
			}
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)slamIndicatorInstance).gameObject);
			}
			if (Object.op_Implicit((Object)(object)slamCenterIndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)slamCenterIndicatorInstance).gameObject);
			}
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			CharacterBody characterBody = ((EntityState)this).characterBody;
			characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2);
			if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.HiddenInvincibility))
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
			}
			((EntityState)this).gameObject.layer = LayerIndex.defaultLayer.intVal;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.RebuildCollidableLayers();
			((EntityState)this).characterMotor.onMovementHit -= new MovementHitDelegate(OnMovementHit);
			((EntityState)this).cameraTargetParams.RemoveParamsOverride(handle, 0.2f);
		}

		public void StartDrop()
		{
			hasDropped = true;
			((EntityState)this).characterMotor.disableAirControlUntilCollision = true;
			((EntityState)this).characterMotor.velocity.y = 0f - dropForce;
			AttemptGrab(15f);
		}

		public override void Update()
		{
			((EntityState)this).Update();
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				UpdateSlamIndicator();
			}
		}

		private void AttemptGrab(float grabRadius)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)grabController))
			{
				return;
			}
			((BaseState)this).GetAimRay();
			BullseyeSearch val = new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByLoS = false,
				searchOrigin = ((EntityState)this).transform.position,
				searchDirection = Random.onUnitSphere,
				sortMode = (SortMode)1,
				maxDistanceFilter = grabRadius,
				maxAngleFilter = 360f
			};
			val.RefreshCandidates();
			val.FilterOutGameObject(((EntityState)this).gameObject);
			HurtBox val2 = (from candidate in val.GetResults()
				orderby GetHurtBoxFullCombinedHealth(candidate) descending
				select candidate).ToList().FirstOrDefault();
			if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)val2.healthComponent) && Object.op_Implicit((Object)(object)val2.healthComponent.body))
			{
				if (BodyMeetsGrabConditions(val2.healthComponent.body))
				{
					bonusDamage = val2.healthComponent.fullCombinedHealth * bonusHealthCoefficient;
					grabController = ((Component)val2.healthComponent.body).gameObject.AddComponent<SettGrabController>();
					grabController.pivotTransform = ((BaseState)this).FindModelChild("R_Hand");
				}
				if (NetworkServer.active && !((EntityState)this).characterBody.HasBuff(Buffs.HiddenInvincibility))
				{
					((EntityState)this).characterBody.AddBuff(Buffs.HiddenInvincibility);
				}
			}
		}

		private float GetHurtBoxFullCombinedHealth(HurtBox hurtBox)
		{
			return hurtBox.healthComponent.fullCombinedHealth;
		}

		private bool BodyMeetsGrabConditions(CharacterBody targetBody)
		{
			return true;
		}

		private void CreateIndicator()
		{
			//IL_0012: 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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				Ray val = default(Ray);
				((Ray)(ref val)).direction = Vector3.down;
				((Ray)(ref val)).origin = ((EntityState)this).transform.position;
				downRay = val;
				slamIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				slamIndicatorInstance.localScale = Vector3.one * slamRadius;
				slamCenterIndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				slamCenterIndicatorInstance.localScale = Vector3.one * slamRadius / 3f;
			}
		}

		private void LandingImpact()
		{
			//IL_002f: 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_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Expected O, but got Unknown
			//IL_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_0076: 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_00bf: 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_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: 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_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: 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_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Expected O, but got Unknown
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: 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_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: 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_0121: 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_013f: Expected O, but got Unknown
			//IL_014f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0176: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: 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)
			if (Object.op_Implicit((Object)(object)grabController))
			{
				grabController.Release();
			}
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			CharacterMotor characterMotor = ((EntityState)this).characterMotor;
			characterMotor.velocity *= 0.1f;
			BlastAttack val = new BlastAttack();
			val.radius = slamRadius;
			val.procCoefficient = slamProcCoefficient;
			val.position = ((EntityState)this).characterBody.footPosition;
			val.procChainMask = default(ProcChainMask);
			val.attacker = ((EntityState)this).gameObject;
			val.crit = ((BaseState)this).RollCrit();
			val.baseDamage = ((BaseState)this).damageStat * slamDamageCoefficient;
			val.falloffModel = (FalloffModel)1;
			val.baseForce = slamForce;
			val.teamIndex = TeamComponent.GetObjectTeam(val.attacker);
			val.damageType = DamageTypeCombo.op_Implicit((DamageType)32);
			val.attackerFiltering = (AttackerFiltering)2;
			DamageAPI.AddModdedDamageType(val, SettPlugin.settDamage);
			val.Fire();
			if (NetworkServer.active)
			{
				HitPoint[] array = val.CollectHits();
				foreach (HitPoint val2 in array)
				{
					HealthComponent val3 = (Object.op_Implicit((Object)(object)val2.hurtBox) ? val2.hurtBox.healthComponent : null);
					if (Object.op_Implicit((Object)(object)val3))
					{
						DamageInfo val4 = new DamageInfo();
						val4.damage = bonusDamage;
						val4.damageColorIndex = (DamageColorIndex)3;
						val4.force = Vector3.zero;
						val4.crit = false;
						val4.position = ((Component)val3).transform.position;
						val4.damageType = DamageTypeCombo.op_Implicit((DamageType)2);
						val3.TakeDamage(val4);
					}
				}
			}
			Util.PlaySound("SettRImpact", ((EntityState)this).gameObject);
			for (int j = 0; j <= 4; j++)
			{
				Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * 2f;
				origin.y = ((EntityState)this).characterBody.footPosition.y;
				EffectManager.SpawnEffect(SpawnState.spawnEffectPrefab, new EffectData
				{
					origin = origin,
					scale = 0.25f
				}, false);
			}
			Vector3 val5 = default(Vector3);
			((Vector3)(ref val5))..ctor(((EntityState)this).characterBody.footPosition.x, ((EntityState)this).characterBody.footPosition.y + 4f, ((EntityState)this).characterBody.footPosition.z);
			if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
			{
				((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPosition(val5, true);
			}
			if (NetworkServer.active && ((EntityState)this).characterBody.HasBuff(Buffs.HiddenInvincibility))
			{
				((EntityState)this).characterBody.RemoveBuff(Buffs.HiddenInvincibility);
			}
		}

		private void OnMovementHit(ref MovementHitInfo movementHitInfo)
		{
			detonateNextFrame = true;
		}

		private void UpdateSlamIndicator()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: 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_006f: 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_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)slamIndicatorInstance))
			{
				float num = 250f;
				Ray val = default(Ray);
				((Ray)(ref val)).direction = Vector3.down;
				((Ray)(ref val)).origin = ((EntityState)this).transform.position;
				downRay = val;
				RaycastHit val2 = default(RaycastHit);
				if (Physics.Raycast(downRay, ref val2, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
				{
					((Component)slamIndicatorInstance).transform.position = ((RaycastHit)(ref val2)).point;
					((Component)slamIndicatorInstance).transform.up = ((RaycastHit)(ref val2)).normal;
					((Component)slamCenterIndicatorInstance).transform.position = ((RaycastHit)(ref val2)).point;
					((Component)slamCenterIndicatorInstance).transform.up = ((RaycastHit)(ref val2)).normal;
				}
			}
		}
	}
}
namespace SettMod.SkillStates.Keystone
{
	public class ElectrocuteHandler : MonoBehaviour
	{
		public CharacterBody attackerBody;

		public float electrocuteCD = 5f;

		public float stopwatch;

		private static readonly int maxElectrocuteStacks = 3;

		private CharacterBody body;

		private int electrocuteStacks;

		private bool fired;

		private HurtBox hurtBox;

		public void AddStack()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			if (GetStacks() < maxElectrocuteStacks && !fired)
			{
				body.AddTimedBuff(Buffs.electrocuteDebuff.buffIndex, 3f);
				GetStacks();
			}
		}

		public int GetStacks()
		{
			electrocuteStacks = body.GetBuffCount(Buffs.electrocuteDebuff);
			return electrocuteStacks;
		}

		public void SetStacks(int num)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			body.SetBuffCount(Buffs.electrocuteDebuff.buffIndex, num);
			GetStacks();
		}

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

		private void FireLightning()
		{
			//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_006e: 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_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: 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_00d1: Expected O, but got Unknown
			if (GetStacks() >= maxElectrocuteStacks)
			{
				SetStacks(0);
				fired = true;
				float num = Mathf.Floor(attackerBody.level / 4f);
				if (Object.op_Implicit((Object)(object)hurtBox))
				{
					float num2 = 6f + num * 0.75f;
					OrbManager.instance.AddOrb((Orb)new SimpleLightningStrikeOrb
					{
						attacker = ((Component)attackerBody).gameObject,
						damageColorIndex = (DamageColorIndex)3,
						damageValue = attackerBody.damage * num2,
						isCrit = Util.CheckRoll(attackerBody.crit, attackerBody.master),
						procChainMask = default(ProcChainMask),
						procCoefficient = 1f,
						target = hurtBox
					});
				}
			}
		}

		private void FixedUpdate()
		{
			if (!fired && NetworkServer.active)
			{
				FireLightning();
			}
			if (stopwatch < electrocuteCD)
			{
				stopwatch += Time.fixedDeltaTime;
			}
			if (stopwatch >= electrocuteCD)
			{
				Object.Destroy((Object)(object)this);
			}
		}
	}
	public class KeyStoneHandler : NetworkBehaviour, IOnDamageDealtServerReceiver, IOnTakeDamageServerReceiver
	{
		public enum KeyStones
		{
			None = 0,
			Conqueror = 1,
			Lethal = 2,
			PhaseRush = 4,
			Electrocute = 8
		}

		public float conquerorMaxStacks = 12f;

		[FormerlySerializedAs("Keystone")]
		public GenericSkill keyStone;

		public KeyStones keyStoneType;

		public float lethalMaxStacks = 6f;

		public float UptimeStopwatch;

		private CharacterBody body;

		private float conquerorUpTime = 4f;

		private HealthComponent healthComponent;

		private float lethalUpTime = 6f;

		private float MaxthrottleTime = 0.5f;

		private EntityStateMachine outer;

		private float throttleUpdateTime;

		protected bool isAuthority => Util.HasEffectiveAuthority(outer.networkIdentity);

		public void Awake()
		{
			body = ((Component)this).GetComponent<CharacterBody>();
			outer = ((Component)this).GetComponent<EntityStateMachine>();
			healthComponent = ((Component)this).GetComponent<HealthComponent>();
			GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal;
		}

		private void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Invalid comparison between Unknown and I4
			if (damageReport != null && damageReport.victimBody != null && damageReport.attackerBody != null && (int)damageReport.victimTeamIndex != 1 && damageReport.attackerBody.GetBuffCount(Buffs.movementSpeedBuff) < 1 && damageReport.attackerBody.baseNameToken == "SETT_NAME" && ((Component)damageReport.attackerBody).GetComponent<KeyStoneHandler>().keyStoneType == KeyStones.PhaseRush)
			{
				damageReport.attackerBody.AddTimedBuff(Buffs.movementSpeedBuff, 3f);
			}
		}

		public void OnDamageDealtServer(DamageReport damageReport)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: 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)
			if (damageReport == null || !Object.op_Implicit((Object)(object)damageReport.victimBody) || !Object.op_Implicit((Object)(object)damageReport.attacker) || !(damageReport.attackerBody.baseNameToken == "SETT_NAME") || !DamageAPI.HasModdedDamageType(damageReport.damageInfo, SettPlugin.settDamage))
			{
				return;
			}
			UptimeStopwatch = 0f;
			if (keyStoneType == KeyStones.PhaseRush)
			{
				if (damageReport.victimBody.GetBuffCount(Buffs.phaseRushDebuff) < 3)
				{
					damageReport.victimBody.AddTimedBuff(Buffs.phaseRushDebuff, 4f);
				}
				if (damageReport.victimBody.GetBuffCount(Buffs.phaseRushDebuff) >= 3 && body.GetBuffCount(Buffs.movementSpeedBuff) < 1)
				{
					body.AddTimedBuff(Buffs.movementSpeedBuff, 3f);
				}
			}
			if (keyStoneType == KeyStones.Electrocute)
			{
				ElectrocuteHandler component = ((Component)damageReport.victimBody).gameObject.GetComponent<ElectrocuteHandler>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					((Component)damageReport.victimBody).gameObject.AddComponent<ElectrocuteHandler>().attackerBody = damageReport.attackerBody;
				}
				else
				{
					component.AddStack();
				}
			}
			AddKeyStoneBuff();
			if (keyStoneType == KeyStones.Conqueror && GetKeyStoneBuffCount() >= GetKeyStoneMaxStacks())
			{
				float num = damageReport.damageDealt * 0.06f;
				healthComponent.Heal(num, default(ProcChainMask), true);
			}
		}

		public void OnTakeDamageServer(DamageReport damageReport)
		{
		}

		private void AddKeyStoneBuff()
		{
			if (GetKeyStoneBuffCount() < GetKeyStoneMaxStacks())
			{
				if (keyStoneType == KeyStones.Conqueror)
				{
					body.AddBuff(Buffs.conquerorBuff);
				}
				if (keyStoneType == KeyStones.Lethal)
				{
					body.AddBuff(Buffs.lethalBuff);
				}
			}
		}

		private void AuthorityFixedUpdate()
		{
		}

		private void CheckKeyStone()
		{
			if (keyStone.skillNameToken == "SETT_CONQUEROR_NAME")
			{
				keyStoneType = KeyStones.Conqueror;
			}
			if (keyStone.skillNameToken == "SETT_LETHAL_NAME")
			{
				keyStoneType = KeyStones.Lethal;
			}
			if (keyStone.skillNameToken == "SETT_PHASE_RUSH_NAME")
			{
				keyStoneType = KeyStones.PhaseRush;
			}
			if (keyStone.skillNameToken == "SETT_ELECTROCUTE_NAME")
			{
				keyStoneType = KeyStones.Electrocute;
			}
		}

		private void FixedUpdate()
		{
			if (NetworkServer.active)
			{
				ServerFixedUpdate();
			}
			if (isAuthority)
			{
				AuthorityFixedUpdate();
			}
		}

		private float GetKeyStoneBuffCount()
		{
			if (keyStoneType == KeyStones.Conqueror)
			{
				return body.GetBuffCount(Buffs.conquerorBuff);
			}
			if (keyStoneType == KeyStones.Lethal)
			{
				return body.GetBuffCount(Buffs.lethalBuff);
			}
			return 0f;
		}

		private float GetKeyStoneMaxStacks()
		{
			if (keyStoneType == KeyStones.Conqueror)
			{
				return conquerorMaxStacks;
			}
			if (keyStoneType == KeyStones.Lethal)
			{
				return lethalMaxStacks;
			}
			return 6f;
		}

		private float GetKeyStoneUpTime()
		{
			if (keyStoneType == KeyStones.Conqueror)
			{
				return conquerorUpTime;
			}
			if (keyStoneType == KeyStones.Lethal)
			{
				return lethalUpTime;
			}
			return 5f;
		}

		private void RemoveKeyStoneBuff()
		{
			if (keyStoneType == KeyStones.Conqueror)
			{
				body.RemoveBuff(Buffs.conquerorBuff);
			}
			if (keyStoneType == KeyStones.Lethal)
			{
				body.RemoveBuff(Buffs.lethalBuff);
			}
		}

		private void ServerFixedUpdate()
		{
			if (UptimeStopwatch < GetKeyStoneUpTime())
			{
				UptimeStopwatch += Time.fixedDeltaTime;
			}
			if (throttleUpdateTime < MaxthrottleTime)
			{
				throttleUpdateTime += Time.fixedDeltaTime;
			}
			if (throttleUpdateTime >= MaxthrottleTime && UptimeStopwatch > GetKeyStoneUpTime() && GetKeyStoneBuffCount() > 0f)
			{
				RemoveKeyStoneBuff();
				throttleUpdateTime = 0f;
			}
			if (GetKeyStoneBuffCount() <= 0f)
			{
				UptimeStopwatch = 0f;
			}
		}

		private void Update()
		{
			CheckKeyStone();
		}
	}
}
namespace SettMod.SkillStates.Emotes
{
	public class BaseEmote : BaseState
	{
		public string soundString;

		public string animString;

		public float duration;

		public float animDuration;

		public bool normalizeModel;

		private uint activePlayID;

		private Animator animator;

		protected ChildLocator childLocator;

		private CameraParamsOverrideHandle handle;

		public LocalUser localUser;

		public override void OnEnter()
		{
			//IL_015c: 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)
			((BaseState)this).OnEnter();
			animator = ((EntityState)this).GetModelAnimator();
			childLocator = ((EntityState)this).GetModelChildLocator();
			localUser = LocalUserManager.readOnlyLocalUsersList[0];
			((EntityState)this).characterBody.hideCrosshair = true;
			if (Object.op_Implicit((Object)(object)((EntityState)this).GetAimAnimator()))
			{
				((Behaviour)((EntityState)this).GetAimAnimator()).enabled = false;
			}
			animator.SetLayerWeight(animator.GetLayerIndex("AimPitch"), 0f);
			animator.SetLayerWeight(animator.GetLayerIndex("AimYaw"), 0f);
			if (animDuration == 0f && duration != 0f)
			{
				animDuration = duration;
			}
			if (duration > 0f)
			{
				((EntityState)this).PlayAnimation("FullBody, Override", animString, "Emote.playbackRate", duration, 0f);
			}
			else
			{
				((EntityState)this).PlayAnimation("FullBody, Override", animString, "Emote.playbackRate", animDuration, 0f);
			}
			if (Config.voiceLines.Value)
			{
				activePlayID = Util.PlaySound(soundString, ((EntityState)this).gameObject);
			}
			if (normalizeModel && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator))
			{
				((EntityState)this).modelLocator.normalizeToFloor = true;
			}
			handle = CameraParams.OverrideSettCameraParams(((EntityState)this).cameraTargetParams, SettCameraParams.EMOTE);
		}

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

		public override void FixedUpdate()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: 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_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: 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 && !localUser.isUIFocused)
			{
				if (Input.GetKeyDown(Config.tauntKeybind.Value))
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new Taunt(), (InterruptPriority)0);
					return;
				}
				if (Input.GetKeyDown(Config.jokeKeybind.Value))
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new Joke(), (InterruptPriority)0);
					return;
				}
				if (Input.GetKeyDown(Config.laughKeybind.Value))
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new Laugh(), (InterruptPriority)0);
					return;
				}
				if (Input.GetKeyDown(Config.danceKeybind.Value))
				{
					((EntityState)this).outer.SetInterruptState((EntityState)(object)new Dance
					{
						spam = (((EntityState)this).outer.state is Dance)
					}, (InterruptPriority)0);
					return;
				}
			}
			if (duration > 0f && ((EntityState)this).fixedAge >= duration)
			{
				flag = true;
			}
			if (flag)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)0;
		}
	}
}
namespace SettMod.SkillStates.BaseStates
{
	internal class Death : GenericCharacterDeath
	{
		public override void FixedUpdate()
		{
			((GenericCharacterDeath)this).FixedUpdate();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			return (InterruptPriority)7;
		}

		public override void OnEnter()
		{
			((GenericCharacterDeath)this).OnEnter();
			Util.PlaySound("SettDeath", ((EntityState)this).gameObject);
			Animator modelAnimator = ((EntityState)this).GetModelAnimator();
			if (Object.op_Implicit((Object)(object)modelAnimator))
			{
				modelAnimator.CrossFadeInFixedTime("Death", 0.1f);
			}
		}

		public override void OnExit()
		{
			((GenericCharacterDeath)this).OnExit();
		}
	}
	public class KnuckleDown : BaseSkillState
	{
		public static float baseDurationBeforeInterruptable;

		public float duration;

		public int swingIndex;

		protected Animator animator;

		protected float attackRecoil = 1f;

		protected float baseDuration = 0.7f;

		protected float baseEarlyExitTime = 0.48f;

		protected Vector3 bonusForce = Vector3.zero;

		protected float damageCoefficient = 3.5f;

		protected DamageType damageType;

		protected string hitboxName = "Sword";

		protected GameObject hitEffectPrefab;

		protected float hitHopVelocity = 4f;

		protected string hitSoundString = "SettHitSFX";

		protected NetworkSoundEventIndex impactSound = Assets.swordHitSoundEvent.index;

		protected bool inHitPause;

		protected string muzzleString = "SwingCenter";

		protected float procCoefficient = 1f;

		protected float pushForce = 300f;

		protected float stopwatch;

		protected GameObject swingEffectPrefab = Assets.swordSwingEffect;

		protected string swingSoundString = "SettHitVO";

		private OverlapAttack attack;

		private float earlyExitDuration;

		private bool extraDamage;

		private bool hasFired;

		private bool hasHopped;

		private float hitPauseTimer;

		private HitStopCachedState hitStopCachedState;

		private Transform modelBaseTransform;

		private Vector3 storedVelocity;

		public override void FixedUpdate()
		{
			//IL_002f: 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_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			((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))
				{
					((Entit