Decompiled source of Wisp WarframeSurvivorMod v3.1.0

WispMod.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using EmotesAPI;
using EntityStates;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.Huntress;
using ExtraSkillSlots;
using HG;
using KinematicCharacterController;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.UI;
using WispMod.Equipment;
using WispMod.Modules;
using WispMod.Modules.Achievements;
using WispMod.Modules.Artifact;
using WispMod.Modules.Elite;
using WispMod.Modules.Elites;
using WispMod.Modules.Equipment;
using WispMod.Modules.Networking;
using WispMod.Modules.Networking.Nukor;
using WispMod.Modules.Survivors;
using WispMod.SkillStates;
using WispMod.SkillStates.Orbs;
using WispMod.SkillStates.Wisp;
using WispMod.SkillStates.Wisp.Gloom;
using WispMod.SkillStates.Wisp.Motes;
using WispMod.SkillStates.Wisp.Pull;
using WispMod.SkillStates.Wisp.WillOWisp;
using WispMod.Utils;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("WispMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+0746fb479a1a706478ccb73944e5361e225b69dd")]
[assembly: AssemblyProduct("WispMod")]
[assembly: AssemblyTitle("WispMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
public class BillboardingScript : MonoBehaviour
{
	private Camera mainCam;

	private Transform cameraTransform;

	private void Start()
	{
		mainCam = Camera.main;
		cameraTransform = ((Component)mainCam).transform;
	}

	private void Update()
	{
		//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)
		((Component)this).transform.forward = -cameraTransform.forward;
	}
}
internal class BodyInfo
{
	internal string bodyName = "";

	internal string bodyNameToken = "";

	internal string subtitleNameToken = "";

	internal string bodyNameToClone = "Commando";

	internal Texture characterPortrait = null;

	internal GameObject crosshair = null;

	internal GameObject podPrefab = null;

	internal float maxHealth = 100f;

	internal float healthGrowth = 2f;

	internal float healthRegen = 0f;

	internal float healthRegenGrowth = 0f;

	internal float shield = 0f;

	internal float shieldGrowth = 0f;

	internal float moveSpeed = 7f;

	internal float moveSpeedGrowth = 0f;

	internal float acceleration = 80f;

	internal float jumpPower = 15f;

	internal float jumpPowerGrowth = 0f;

	internal float damage = 12f;

	internal float damageGrowth = 2f;

	internal float attackSpeed = 1f;

	internal float attackSpeedGrowth = 0f;

	internal float armor = 0f;

	internal float armorGrowth = 0f;

	internal float crit = 1f;

	internal float critGrowth = 0f;

	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 Sprite skillIcon;

	public SerializableEntityStateType activationState;

	public string activationStateMachineName;

	public int baseMaxStock;

	public float baseRechargeInterval;

	public bool beginSkillCooldownOnSkillEnd;

	public bool canceledFromSprinting;

	public bool forceSprintDuringState;

	public bool fullRestockOnAssign;

	public InterruptPriority interruptPriority;

	public bool resetCooldownTimerOnUse;

	public bool isCombatSkill;

	public bool mustKeyPress;

	public bool cancelSprintingOnActivation;

	public int rechargeStock;

	public int requiredStock;

	public int stockToConsume;

	public string[] keywordTokens;
}
namespace WispMod
{
	[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.*/)]
	[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.PopcornFactory.WispMod", "Wisp_Mod", "3.1.0")]
	public class WispPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.PopcornFactory.WispMod";

		public const string MODNAME = "Wisp_Mod";

		public const string MODVERSION = "3.1.0";

		public static bool scepterInstalled = false;

		public static bool isControllerCheck = false;

		public static bool fallbackScepter = false;

		public static bool betterUIInstalled = false;

		public static bool riskUIInstalled = false;

		public const string developerPrefix = "POPCORN";

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

		public static WispPlugin instance;

		public static Dictionary<string, CharacterMaster> summonCharacterMaster = new Dictionary<string, CharacterMaster>();

		public static Vector3 clientWispLocation;

		public static bool clientWispUpdatedRecently;

		public static BuffDef nullifierEliteDef;

		private void Awake()
		{
			instance = this;
			Config.ReadConfig();
			AssetsWisp.Initialize();
			if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"))
			{
				Config.SetupRiskOfOptions();
			}
			States.RegisterStates();
			Buffs.RegisterBuffs();
			Projectiles.RegisterProjectiles();
			Tokens.AddTokens();
			if (Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ExtraSkillSlots"))
			{
				isControllerCheck = true;
			}
			if (Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"))
			{
				scepterInstalled = true;
			}
			if (Chainloader.PluginInfos.ContainsKey("com.ThinkInvisible.ClassicItems"))
			{
				fallbackScepter = true;
			}
			if (Chainloader.PluginInfos.ContainsKey("bubbet.riskui"))
			{
				riskUIInstalled = true;
			}
			new Wisp().Initialize();
			IEnumerable<Type> enumerable = from type in Assembly.GetExecutingAssembly().GetTypes()
				where !type.IsAbstract && type.IsSubclassOf(typeof(EquipmentBase))
				select type;
			foreach (Type item in enumerable)
			{
				EquipmentBase equipmentBase = (EquipmentBase)Activator.CreateInstance(item);
				equipmentBase.Init();
			}
			IEnumerable<Type> enumerable2 = from type in Assembly.GetExecutingAssembly().GetTypes()
				where !type.IsAbstract && type.IsSubclassOf(typeof(EliteEquipmentBase))
				select type;
			foreach (Type item2 in enumerable2)
			{
				EliteEquipmentBase eliteEquipmentBase = (EliteEquipmentBase)Activator.CreateInstance(item2);
				eliteEquipmentBase.Init();
				if (eliteEquipmentBase.EliteModifier == "Nullifier")
				{
					nullifierEliteDef = EliteEquipmentBase.EliteBuffDef;
				}
			}
			IEnumerable<Type> enumerable3 = from type in Assembly.GetExecutingAssembly().GetTypes()
				where !type.IsAbstract && type.IsSubclassOf(typeof(ArtifactBase))
				select type;
			foreach (Type item3 in enumerable3)
			{
				ArtifactBase artifactBase = (ArtifactBase)Activator.CreateInstance(item3);
				artifactBase.Init();
			}
			new ContentPacks().Initialize();
			ContentManager.onContentPacksAssigned += LateSetup;
			Hook();
			SetupNetworkMessages();
		}

		private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj)
		{
			SurvivorBase.instance.SetItemDisplays();
		}

		private void SetupNetworkMessages()
		{
			NetworkingAPI.RegisterMessageType<GloomSpawnNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PerformPullNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ClientMoteSpawnNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ServerMoteShadowNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ServerForceMotePlacementAnimNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ClientWispSpawnNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ClientWispChildPositionNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ClientWispDestroyNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ServerForceFallStateNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ServerForceSolGateStateNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ServerForceSolGateEquipmentNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ServerForceFallStateNetworkRequest>();
			NetworkingAPI.RegisterMessageType<NullifierEliteRemoveOneStockNetworkRequest>();
			NetworkingAPI.RegisterMessageType<NukorEffectOnNetworkRequest>();
			NetworkingAPI.RegisterMessageType<NukorEffectOffNetworkRequest>();
		}

		private void Hook()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Expected O, but got Unknown
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Expected O, but got Unknown
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			CharacterMaster.Start += new hook_Start(CharacterMaster_Start);
			CharacterModel.Start += new hook_Start(CharacterModel_Start);
			CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays);
			if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI"))
			{
				SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init);
			}
		}

		private void SurvivorCatalog_Init(orig_Init orig)
		{
			orig.Invoke();
			foreach (SurvivorDef allSurvivorDef in SurvivorCatalog.allSurvivorDefs)
			{
				if (((Object)allSurvivorDef.bodyPrefab).name == "WarframeWispBody")
				{
					CustomEmotesAPI.ImportArmature(allSurvivorDef.bodyPrefab, AssetsWisp.mainAssetBundle.LoadAsset<GameObject>("HumanoidWisp"), 0, true);
				}
			}
		}

		private void CharacterMaster_Start(orig_Start orig, CharacterMaster self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self.bodyPrefab) && ((Object)self.bodyPrefab).name.Contains("WarframeWisp") && Config.spawnWithSolGate.Value)
			{
				self.inventory.GiveEquipmentString("EQUIPMENT_SOL_GATE");
			}
		}

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			orig.Invoke(self);
			if (self.HasBuff(Buffs.healthmoteBuff))
			{
				self.regen += 30f;
				self.hasOneShotProtection = false;
			}
			if (self.HasBuff(Buffs.hastemoteBuff))
			{
				self.moveSpeed *= 1.4f;
				self.attackSpeed *= 1.75f;
			}
			if (self.HasBuff(Buffs.gloomDebuff))
			{
				self.moveSpeed *= 0.5f;
				self.attackSpeed *= 0.2f;
			}
			if (self.HasBuff(Buffs.gloomLifestealBuff) || self.HasBuff(Buffs.gloomScepterLifestealBuff) || self.HasBuff(Buffs.gloomDebuff))
			{
				GloomEffectController component = ((Component)self).gameObject.GetComponent<GloomEffectController>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					component = ((Component)self).gameObject.AddComponent<GloomEffectController>();
					component.charbody = self;
				}
			}
			if (self.HasBuff(Buffs.roarBuff))
			{
				self.damage += self.damage * 1f;
			}
			if (self.HasBuff(Buffs.roarScepterBuff))
			{
				self.damage += self.damage * 1.5f;
			}
			if (self.HasBuff(Buffs.nullifierArmourBuff) && !self.HasBuff(nullifierEliteDef))
			{
				self.armor += Config.nullifierArmourBuff.Value;
			}
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0024: 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_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: 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_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: 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_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_025d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)damageInfo?.attacker))
			{
				if (self.body.HasBuff(Buffs.breachsurgeDebuff.buffIndex))
				{
					damageInfo.damage *= 2f;
				}
				if (self.body.HasBuff(Buffs.breachsurgescepterDebuff.buffIndex))
				{
					damageInfo.damage *= 4f;
				}
			}
			if (self.body.baseNameToken == "POPCORN_WARFRAMEWISP_BODY_NAME")
			{
				DamageType val = (DamageType)2097153;
				DamageType val2 = (DamageType)2359296;
				if (DamageTypeCombo.op_Implicit(damageInfo.damageType) == val || DamageTypeCombo.op_Implicit(damageInfo.damageType) == val2)
				{
					damageInfo.rejected = true;
					if (damageInfo.damage > self.body.maxHealth / 2.86f)
					{
						NetMessageExtensions.Send((INetMessage)(object)new ServerForceFallStateNetworkRequest(self.body.masterObjectId), (NetworkDestination)1);
					}
					damageInfo.damage = 0f;
				}
			}
			if (Object.op_Implicit((Object)(object)damageInfo.attacker))
			{
				CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component))
				{
					if (component.HasBuff(Buffs.gloomLifestealBuff) && self.body.HasBuff(Buffs.gloomDebuff))
					{
						component.healthComponent.Heal(damageInfo.damage * 0.01f, damageInfo.procChainMask, true);
					}
					if (component.HasBuff(Buffs.gloomScepterLifestealBuff))
					{
						component.healthComponent.Heal(damageInfo.damage * 0.01f, damageInfo.procChainMask, true);
					}
				}
			}
			if (Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(EliteEquipmentBase.EliteBuffDef) && self.body.isPlayerControlled && Random.Range(0f, 100f) <= Config.nullifierBlockChance.Value)
			{
				EffectData val3 = new EffectData
				{
					origin = damageInfo.position,
					rotation = Util.QuaternionSafeLookRotation((damageInfo.force != Vector3.zero) ? damageInfo.force : Random.onUnitSphere)
				};
				EffectManager.SpawnEffect(AssetReferences.bearEffectPrefab, val3, true);
				damageInfo.rejected = true;
			}
			orig.Invoke(self, damageInfo);
		}

		private void CharacterModel_Start(orig_Start orig, CharacterModel self)
		{
			orig.Invoke(self);
			if (!((Object)((Component)self).gameObject).name.Contains("WarframeWispDisplay"))
			{
				return;
			}
			DisplayWeaponHandler component = ((Component)self).gameObject.GetComponent<DisplayWeaponHandler>();
			if (!Object.op_Implicit((Object)(object)component))
			{
				ChildLocator component2 = ((Component)self).gameObject.GetComponent<ChildLocator>();
				if (Object.op_Implicit((Object)(object)component2))
				{
					Transform meshTransform = component2.FindChild("FulminModel");
					Transform targetTransform = component2.FindChild("GunHolsterPos");
					component = ((Component)self).gameObject.AddComponent<DisplayWeaponHandler>();
					component.meshTransform = meshTransform;
					component.targetTransform = targetTransform;
				}
			}
			WispDisplayPrimaryController component3 = ((Component)self).gameObject.GetComponent<WispDisplayPrimaryController>();
			if (!Object.op_Implicit((Object)(object)component3))
			{
				ChildLocator component4 = ((Component)self).gameObject.GetComponent<ChildLocator>();
				Transform val = component4.FindChild("FulminModel");
				Transform val2 = component4.FindChild("NukorMesh");
				component3 = ((Component)self).gameObject.AddComponent<WispDisplayPrimaryController>();
				component3.fulmin = ((Component)val).gameObject;
				component3.nukor = ((Component)val2).gameObject;
			}
		}

		private void CharacterModel_UpdateOverlays(orig_UpdateOverlays orig, CharacterModel self)
		{
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body))
			{
				LiterallyGarbageOverlayFunction(AssetsWisp.roarOverlayBuff, self.body.HasBuff(Buffs.roarBuff) || self.body.HasBuff(Buffs.roarScepterBuff), self);
			}
		}

		private void LiterallyGarbageOverlayFunction(Material overlayMaterial, bool condition, CharacterModel model)
		{
			if (model.activeOverlayCount < CharacterModel.maxOverlays && condition)
			{
				Material[] currentOverlays = model.currentOverlays;
				int activeOverlayCount = model.activeOverlayCount;
				model.activeOverlayCount = activeOverlayCount + 1;
				currentOverlays[activeOverlayCount] = overlayMaterial;
			}
		}
	}
}
namespace WispMod.SkillStates
{
	public class BreachSurge : BaseSkillState
	{
		private GameObject explosionPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/effects/MageLightningBombExplosion");

		public static float blastRadius = 15f;

		private float baseDuration = 2f;

		private float duration;

		private float triggerTimer;

		private float debuffduration = 8f;

		private BlastAttack blastAttack;

		public float breachage;

		public float breachfiretime;

		private Ray downRay;

		private Transform IndicatorInstance;

		public BuffDef buffDef = Buffs.breachsurgeDebuff;

		private WispController wispCon;

		public bool hasSurged;

		public bool shouldTeleport;

		protected DamageType damageType = (DamageType)1184;

		public override void OnEnter()
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: 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_01d6: 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_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Expected O, but got Unknown
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			hasSurged = false;
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			breachfiretime = duration / 3.5f;
			AkSoundEngine.PostEvent(1394878156u, ((EntityState)this).gameObject);
			blastAttack = new BlastAttack();
			blastAttack.radius = blastRadius;
			blastAttack.procCoefficient = 1f;
			blastAttack.attacker = ((EntityState)this).gameObject;
			blastAttack.crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master);
			blastAttack.baseDamage = 0f;
			blastAttack.falloffModel = (FalloffModel)0;
			blastAttack.baseForce = 0f;
			blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker);
			blastAttack.damageType = DamageTypeCombo.op_Implicit(damageType);
			blastAttack.attackerFiltering = (AttackerFiltering)0;
			wispCon = ((EntityState)this).gameObject.GetComponent<WispController>();
			if (Object.op_Implicit((Object)(object)wispCon))
			{
				if (shouldTeleport && Object.op_Implicit((Object)(object)wispCon.targettedMote))
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(wispCon.targettedMote.position, wispCon.targettedMote.rotation, true);
				}
				wispCon.SetNewTransitionTarget(WispController.GunState.HOLSTER);
			}
			((EntityState)this).PlayCrossfade("Fullbody, Override", "BreachSurge", "ShootGun.playbackRate", duration, duration / 5f);
			Ray val = default(Ray);
			((Ray)(ref val)).direction = Vector3.down;
			((Ray)(ref val)).origin = ((EntityState)this).transform.position;
			downRay = val;
			EffectManager.SpawnEffect(explosionPrefab, new EffectData
			{
				origin = ((EntityState)this).characterBody.corePosition,
				scale = blastRadius
			}, true);
			if (NetworkServer.active)
			{
				float radiusSqr = blastRadius * blastRadius;
				Vector3 position = ((EntityState)this).transform.position;
				BuffTeam(TeamComponent.GetTeamMembers((TeamIndex)2), radiusSqr, position);
			}
		}

		private void BuffTeam(IEnumerable<TeamComponent> recipients, float radiusSqr, Vector3 currentPosition)
		{
			//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)
			//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)
			if (!NetworkServer.active)
			{
				return;
			}
			foreach (TeamComponent recipient in recipients)
			{
				Vector3 val = ((Component)recipient).transform.position - currentPosition;
				if (((Vector3)(ref val)).sqrMagnitude <= radiusSqr)
				{
					CharacterBody body = recipient.body;
					if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)buffDef))
					{
						AkSoundEngine.PostEvent(4284703427u, ((Component)body).gameObject);
						body.AddTimedBuff(buffDef, debuffduration);
					}
				}
			}
		}

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

		private void UpdateSlamIndicator()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: 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)
			if (Object.op_Implicit((Object)(object)IndicatorInstance))
			{
				float num = 250f;
				RaycastHit val = default(RaycastHit);
				if (Physics.Raycast(downRay, ref val, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
				{
					((Component)IndicatorInstance).transform.position = ((RaycastHit)(ref val)).point;
					((Component)IndicatorInstance).transform.up = ((RaycastHit)(ref val)).normal;
				}
			}
		}

		private void CreateIndicator()
		{
			//IL_002b: 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)
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				IndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				IndicatorInstance.localScale = Vector3.one * blastRadius;
			}
		}

		public override void OnExit()
		{
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			if (Object.op_Implicit((Object)(object)IndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)IndicatorInstance).gameObject);
			}
			((EntityState)this).OnExit();
			wispCon.SetNewTransitionTarget(WispController.GunState.RUN);
		}

		public override void FixedUpdate()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			Ray aimRay = ((BaseState)this).GetAimRay();
			if (((EntityState)this).fixedAge > breachfiretime && !hasSurged)
			{
				hasSurged = true;
				blastAttack.position = ((EntityState)this).characterBody.corePosition;
				if (((EntityState)this).isAuthority)
				{
					for (int i = 0; i <= 2; i++)
					{
						blastAttack.Fire();
					}
				}
			}
			if (((EntityState)this).fixedAge >= breachfiretime && !Object.op_Implicit((Object)(object)IndicatorInstance))
			{
				CreateIndicator();
			}
			if (breachage >= 0.5f && ((EntityState)this).isAuthority && hasSurged)
			{
				breachage = 0f;
				blastAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)32);
				blastAttack.Fire();
			}
			else
			{
				breachage += Time.fixedDeltaTime;
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
	public class BreachSurgeScepter : BaseSkillState
	{
		private GameObject explosionPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/effects/MageLightningBombExplosion");

		public static float blastRadius = 30f;

		private float baseDuration = 2f;

		private float duration;

		private float debuffduration = 8f;

		private BlastAttack blastAttack;

		public float breachage;

		public float breachfiretime = 0f;

		private Ray downRay;

		private Transform IndicatorInstance;

		public BuffDef buffDef = Buffs.breachsurgescepterDebuff;

		public WispController wispCon;

		public bool hasSurged;

		public bool shouldTeleport;

		protected DamageType damageType = (DamageType)1184;

		public override void OnEnter()
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Expected O, but got Unknown
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: 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_01d6: 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_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Expected O, but got Unknown
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_024d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			hasSurged = false;
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			breachfiretime = duration / 3.5f;
			AkSoundEngine.PostEvent(1394878156u, ((EntityState)this).gameObject);
			blastAttack = new BlastAttack();
			blastAttack.radius = blastRadius;
			blastAttack.procCoefficient = 1f;
			blastAttack.attacker = ((EntityState)this).gameObject;
			blastAttack.crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master);
			blastAttack.baseDamage = 0f;
			blastAttack.falloffModel = (FalloffModel)0;
			blastAttack.baseForce = 0f;
			blastAttack.teamIndex = TeamComponent.GetObjectTeam(blastAttack.attacker);
			blastAttack.damageType = DamageTypeCombo.op_Implicit(damageType);
			blastAttack.attackerFiltering = (AttackerFiltering)0;
			((EntityState)this).PlayCrossfade("Fullbody, Override", "BreachSurge", "ShootGun.playbackRate", duration, duration / 5f);
			wispCon = ((EntityState)this).gameObject.GetComponent<WispController>();
			if (Object.op_Implicit((Object)(object)wispCon))
			{
				wispCon.SetNewTransitionTarget(WispController.GunState.HOLSTER);
				if (shouldTeleport && Object.op_Implicit((Object)(object)wispCon.targettedMote))
				{
					((EntityState)this).characterMotor.velocity = Vector3.zero;
					((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(wispCon.targettedMote.position, wispCon.targettedMote.rotation, true);
				}
			}
			Ray val = default(Ray);
			((Ray)(ref val)).direction = Vector3.down;
			((Ray)(ref val)).origin = ((EntityState)this).transform.position;
			downRay = val;
			EffectManager.SpawnEffect(explosionPrefab, new EffectData
			{
				origin = ((EntityState)this).characterBody.corePosition,
				scale = blastRadius
			}, true);
			if (NetworkServer.active)
			{
				float radiusSqr = blastRadius * blastRadius;
				Vector3 position = ((EntityState)this).transform.position;
				BuffTeam(TeamComponent.GetTeamMembers((TeamIndex)2), radiusSqr, position);
			}
		}

		private void BuffTeam(IEnumerable<TeamComponent> recipients, float radiusSqr, Vector3 currentPosition)
		{
			//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_0037: 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)
			if (!NetworkServer.active)
			{
				return;
			}
			foreach (TeamComponent recipient in recipients)
			{
				Vector3 val = ((Component)recipient).transform.position - currentPosition;
				if (((Vector3)(ref val)).sqrMagnitude <= radiusSqr)
				{
					CharacterBody body = recipient.body;
					if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)buffDef))
					{
						AkSoundEngine.PostEvent(4284703427u, ((Component)body).gameObject);
						body.AddTimedBuff(buffDef, debuffduration);
					}
				}
			}
		}

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

		private void UpdateSlamIndicator()
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: 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)
			if (Object.op_Implicit((Object)(object)IndicatorInstance))
			{
				float num = 250f;
				RaycastHit val = default(RaycastHit);
				if (Physics.Raycast(downRay, ref val, num, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)))
				{
					((Component)IndicatorInstance).transform.position = ((RaycastHit)(ref val)).point;
					((Component)IndicatorInstance).transform.up = ((RaycastHit)(ref val)).normal;
				}
			}
		}

		private void CreateIndicator()
		{
			//IL_002b: 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)
			if (Object.op_Implicit((Object)(object)ArrowRain.areaIndicatorPrefab))
			{
				IndicatorInstance = Object.Instantiate<GameObject>(ArrowRain.areaIndicatorPrefab).transform;
				IndicatorInstance.localScale = Vector3.one * blastRadius;
			}
		}

		public override void OnExit()
		{
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			if (Object.op_Implicit((Object)(object)IndicatorInstance))
			{
				EntityState.Destroy((Object)(object)((Component)IndicatorInstance).gameObject);
			}
			((EntityState)this).OnExit();
			wispCon.SetNewTransitionTarget(WispController.GunState.RUN);
		}

		public override void FixedUpdate()
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			Ray aimRay = ((BaseState)this).GetAimRay();
			if (((EntityState)this).fixedAge > breachfiretime && !hasSurged)
			{
				hasSurged = true;
				blastAttack.position = ((EntityState)this).characterBody.corePosition;
				if (((EntityState)this).isAuthority)
				{
					for (int i = 0; i <= 2; i++)
					{
						blastAttack.Fire();
					}
				}
			}
			if (((EntityState)this).fixedAge >= breachfiretime && !Object.op_Implicit((Object)(object)IndicatorInstance))
			{
				CreateIndicator();
			}
			if (breachage >= 0.5f && ((EntityState)this).isAuthority && hasSurged)
			{
				breachage = 0f;
				blastAttack.damageType = DamageTypeCombo.op_Implicit((DamageType)32);
				blastAttack.Fire();
			}
			else
			{
				breachage += Time.fixedDeltaTime;
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

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

		public static float procCoefficient = 1.25f;

		public static float baseDuration = 0.111f;

		public static float force = 50f;

		public static float recoil = 1.5f;

		public static float range = 256f;

		private float duration;

		private float fireTime;

		private bool hasFired;

		private string muzzleString;

		private WispController wispCon;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = 0.2f * duration;
			((EntityState)this).characterBody.SetAimTimer(2f);
			muzzleString = "Muzzle";
			((EntityState)this).PlayCrossfade("Gesture, Override", "ShootSmallRecoil", "ShootGun.playbackRate", duration, duration / 3f);
			wispCon = ((EntityState)this).gameObject.GetComponent<WispController>();
			wispCon.firedRecently = true;
			wispCon.stopwatch = 0f;
			wispCon.resetToRunStopwatch = 0f;
			wispCon.gunHoldStateTime = 0f;
			wispCon.gunTransitionTime = 0f;
			wispCon.SetNewTransitionTarget(WispController.GunState.SHOOT);
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			wispCon.gunHoldStateTime = 0.15f;
			wispCon.gunTransitionTime = 0.1f;
		}

		private void Fire()
		{
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: 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_00b2: 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_00c3: 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_00cd: 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_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0105: 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_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: 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_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: 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_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)
			if (!hasFired)
			{
				hasFired = true;
				AkSoundEngine.StopPlayingID(3828622232u);
				((EntityState)this).characterBody.AddSpreadBloom(1.5f);
				EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false);
				AkSoundEngine.PostEvent(3435608004u, ((EntityState)this).gameObject);
				if (((EntityState)this).isAuthority)
				{
					Ray aimRay = ((BaseState)this).GetAimRay();
					((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil);
					new BulletAttack
					{
						bulletCount = 1u,
						aimVector = ((Ray)(ref aimRay)).direction,
						origin = ((Ray)(ref aimRay)).origin,
						damage = damageCoefficient * ((BaseState)this).damageStat,
						damageColorIndex = (DamageColorIndex)0,
						damageType = DamageTypeCombo.op_Implicit((DamageType)0),
						falloffModel = (FalloffModel)1,
						maxDistance = range,
						force = force,
						hitMask = CommonMasks.bullet,
						minSpread = 0f,
						maxSpread = 0f,
						isCrit = ((BaseState)this).RollCrit(),
						owner = ((EntityState)this).gameObject,
						muzzleName = muzzleString,
						smartCollision = false,
						procChainMask = default(ProcChainMask),
						procCoefficient = procCoefficient,
						radius = 0.25f,
						sniper = false,
						stopperMask = CommonMasks.bullet,
						weapon = null,
						tracerEffectPrefab = AssetsWisp.tracerEffectPrefab,
						spreadPitchScale = 0f,
						spreadYawScale = 0f,
						queryTriggerInteraction = (QueryTriggerInteraction)0,
						hitEffectPrefab = FirePistol2.hitEffectPrefab
					}.Fire();
				}
			}
		}

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

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

		public static float procCoefficient = 0.5f;

		public static float baseDuration = 0.5f;

		public static float force = 100f;

		public static float recoil = 3f;

		public static float range = 256f;

		private float duration;

		private float fireTime;

		private bool hasFired;

		private string muzzleString;

		private WispController wispCon;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = 0.2f * duration;
			((EntityState)this).characterBody.SetAimTimer(2f);
			muzzleString = "Muzzle";
			((EntityState)this).PlayCrossfade("Gesture, Override", "ShootLargeRecoil", "ShootGun.playbackRate", duration, duration / 3f);
			wispCon = ((EntityState)this).gameObject.GetComponent<WispController>();
			wispCon.firedRecently = true;
			wispCon.stopwatch = 0f;
			wispCon.resetToRunStopwatch = 0f;
			wispCon.gunHoldStateTime = 0f;
			wispCon.gunTransitionTime = 0f;
			wispCon.SetNewTransitionTarget(WispController.GunState.SHOOT);
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			wispCon.gunHoldStateTime = 0.15f;
			wispCon.gunTransitionTime = 0.1f;
		}

		private void Fire()
		{
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: 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_00b2: 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_00c3: 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_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: 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_00f8: 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_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: 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_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: 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_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: 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_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: 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_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: Unknown result type (might be due to invalid IL or missing references)
			if (!hasFired)
			{
				hasFired = true;
				((EntityState)this).characterBody.AddSpreadBloom(1.5f);
				EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false);
				AkSoundEngine.StopPlayingID(3828622232u);
				AkSoundEngine.PostEvent(51683977u, ((EntityState)this).gameObject);
				if (((EntityState)this).isAuthority)
				{
					Ray aimRay = ((BaseState)this).GetAimRay();
					((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil);
					new BulletAttack
					{
						bulletCount = 5u,
						aimVector = ((Ray)(ref aimRay)).direction,
						origin = ((Ray)(ref aimRay)).origin,
						damage = damageCoefficient * ((BaseState)this).damageStat / 5f,
						damageColorIndex = (DamageColorIndex)0,
						damageType = DamageTypeCombo.op_Implicit((DamageType)0),
						falloffModel = (FalloffModel)0,
						maxDistance = range,
						force = force,
						hitMask = CommonMasks.bullet,
						minSpread = 1f,
						maxSpread = 2f,
						isCrit = ((BaseState)this).RollCrit(),
						owner = ((EntityState)this).gameObject,
						muzzleName = muzzleString,
						smartCollision = false,
						procChainMask = default(ProcChainMask),
						procCoefficient = procCoefficient,
						radius = 0.25f,
						sniper = false,
						stopperMask = ((LayerIndex)(ref LayerIndex.world)).collisionMask,
						weapon = null,
						tracerEffectPrefab = AssetsWisp.tracerEffectPrefab,
						spreadPitchScale = 1f,
						spreadYawScale = 1f,
						queryTriggerInteraction = (QueryTriggerInteraction)0,
						hitEffectPrefab = FirePistol2.hitEffectPrefab
					}.Fire();
				}
			}
		}

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

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

		public static float radius = 16f;

		private float tapduration = 0.2f;

		private float moteAnimBaseDuration = 0.9f;

		private float moteAnimDuration;

		private bool hasActivated;

		private bool hasSpawned;

		public Vector3 thespot;

		private GameObject explosionPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/effects/MageLightningBombExplosion");

		public MoteController motecon;

		public WispController wispcon;

		public override void OnEnter()
		{
			//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_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: 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)
			((BaseState)this).OnEnter();
			moteAnimDuration = moteAnimBaseDuration / ((BaseState)this).attackSpeedStat;
			hasActivated = false;
			hasSpawned = false;
			Ray aimRay = ((BaseState)this).GetAimRay();
			thespot = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction;
			wispcon = ((EntityState)this).GetComponent<WispController>();
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			wispcon.SetNewTransitionTarget(WispController.GunState.RUN);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= baseDuration && ((EntityState)this).isAuthority && !hasSpawned)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
			if (hasSpawned && ((EntityState)this).fixedAge >= moteAnimDuration)
			{
				SpawnMote();
				((EntityState)this).outer.SetNextStateToMain();
			}
			if (!(((EntityState)this).fixedAge >= tapduration) || hasActivated)
			{
				return;
			}
			hasActivated = true;
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			if (((EntityState)this).inputBank.skill2.down && !hasSpawned)
			{
				hasSpawned = true;
				AkSoundEngine.PostEvent(2853488923u, ((EntityState)this).gameObject);
				((EntityState)this).PlayAnimation("FullBody, Override", "PlaceMote", "ShootGun.playbackRate", moteAnimDuration, 0f);
				if (Object.op_Implicit((Object)(object)wispcon))
				{
					wispcon.SetNewTransitionTarget(WispController.GunState.HOLSTER);
				}
			}
			else
			{
				((EntityState)this).skillLocator.secondary.UnsetSkillOverride((object)((EntityState)this).skillLocator.secondary, VitalityMote.secondaryDef, (SkillOverridePriority)1);
				((EntityState)this).skillLocator.secondary.AddOneStock();
			}
		}

		public void SpawnMote()
		{
			//IL_0027: 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_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: 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_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: 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_0097: Expected O, but got Unknown
			if (WispController.currentnumberofmotes < WispController.maxnumberofmotes)
			{
				WispController.currentnumberofmotes++;
				NetMessageExtensions.Send((INetMessage)(object)new ClientMoteSpawnNetworkRequest(((EntityState)this).characterBody.masterObjectId, isHealthMote: false, ((EntityState)this).transform.position, wispcon.backupaddition, moteAnimDuration), (NetworkDestination)1);
				Ray aimRay = ((BaseState)this).GetAimRay();
				EffectManager.SpawnEffect(explosionPrefab, new EffectData
				{
					origin = thespot,
					scale = 1f,
					rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction)
				}, true);
			}
		}

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

		private float tapduration = 0.2f;

		private float moteAnimBaseDuration = 0.9f;

		private float moteAnimDuration;

		private bool hasActivated;

		private bool hasSpawned;

		public Vector3 thespot;

		public float radius = 16f;

		public static SkillDef secondaryDef = WispMod.Modules.Survivors.Wisp.hastemoteSkillDef;

		private GameObject explosionPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/effects/MageLightningBombExplosion");

		public MoteController motecon;

		public WispController wispcon;

		public override void OnEnter()
		{
			//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_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: 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)
			((BaseState)this).OnEnter();
			moteAnimDuration = moteAnimBaseDuration / ((BaseState)this).attackSpeedStat;
			hasActivated = false;
			hasSpawned = false;
			Ray aimRay = ((BaseState)this).GetAimRay();
			thespot = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction;
			wispcon = ((EntityState)this).GetComponent<WispController>();
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			wispcon.SetNewTransitionTarget(WispController.GunState.RUN);
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= baseDuration && ((EntityState)this).isAuthority && !hasSpawned)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
			if (hasSpawned && ((EntityState)this).fixedAge >= moteAnimDuration)
			{
				SpawnMote();
				((EntityState)this).outer.SetNextStateToMain();
			}
			if (!(((EntityState)this).fixedAge >= tapduration) || hasActivated)
			{
				return;
			}
			hasActivated = true;
			if (!((EntityState)this).isAuthority)
			{
				return;
			}
			if (((EntityState)this).inputBank.skill2.down && !hasSpawned)
			{
				AkSoundEngine.PostEvent(1744278690u, ((EntityState)this).gameObject);
				hasSpawned = true;
				((EntityState)this).PlayAnimation("FullBody, Override", "PlaceMote", "ShootGun.playbackRate", moteAnimDuration, 0f);
				if (Object.op_Implicit((Object)(object)wispcon))
				{
					wispcon.SetNewTransitionTarget(WispController.GunState.HOLSTER);
				}
			}
			else
			{
				((EntityState)this).skillLocator.secondary.SetSkillOverride((object)((EntityState)this).skillLocator.secondary, secondaryDef, (SkillOverridePriority)1);
				((EntityState)this).skillLocator.secondary.AddOneStock();
			}
		}

		public void SpawnMote()
		{
			//IL_0027: 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_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: 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_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: 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_0097: Expected O, but got Unknown
			if (WispController.currentnumberofmotes < WispController.maxnumberofmotes)
			{
				WispController.currentnumberofmotes++;
				NetMessageExtensions.Send((INetMessage)(object)new ClientMoteSpawnNetworkRequest(((EntityState)this).characterBody.masterObjectId, isHealthMote: true, ((EntityState)this).transform.position, wispcon.backupaddition, moteAnimDuration), (NetworkDestination)1);
				Ray aimRay = ((BaseState)this).GetAimRay();
				EffectManager.SpawnEffect(explosionPrefab, new EffectData
				{
					origin = thespot,
					scale = 1f,
					rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction)
				}, true);
			}
		}

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

		public static float procCoefficient = 0.25f;

		public static float baseDuration = 0.05f;

		public static float force = 0f;

		public static float recoil = 1.5f;

		public static float range = 256f;

		private float duration;

		private float fireTime;

		private bool hasFired;

		private string muzzleString;

		private WispController wispCon;

		private HealthComponent hitHealthComponent;

		public static bool resetBouncedObjects = true;

		public Animator anim;

		public override void OnEnter()
		{
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			wispCon = ((EntityState)this).gameObject.GetComponent<WispController>();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			fireTime = 0.2f * duration;
			((EntityState)this).characterBody.SetAimTimer(2f);
			muzzleString = "NukorMuzzle";
			anim = ((EntityState)this).GetModelAnimator();
			if (anim.GetBool("isMoving"))
			{
				((EntityState)this).PlayCrossfade("Gesture, Override", "RunNukorShoot", "ShootGun.playbackRate", duration, duration / 3f);
			}
			else
			{
				((EntityState)this).PlayCrossfade("Gesture, Override", "NukorShoot", "ShootGun.playbackRate", duration, duration / 3f);
			}
			if (!wispCon.isShootingNukor)
			{
				NetMessageExtensions.Send((INetMessage)(object)new NukorEffectOnNetworkRequest(((EntityState)this).characterBody.masterObjectId), (NetworkDestination)1);
				AkSoundEngine.PostEvent(4290280854u, ((EntityState)this).gameObject);
			}
			wispCon.firedRecently = true;
			wispCon.stopwatch = 0f;
			wispCon.resetToRunStopwatch = 0f;
			wispCon.gunHoldStateTime = 0f;
			wispCon.gunTransitionTime = 0f;
			wispCon.SetNewTransitionTarget(WispController.GunState.SHOOT);
		}

		public override void OnExit()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill1.down)
			{
				NetMessageExtensions.Send((INetMessage)(object)new NukorEffectOffNetworkRequest(((EntityState)this).characterBody.masterObjectId), (NetworkDestination)1);
			}
			((EntityState)this).OnExit();
			wispCon.gunHoldStateTime = 0.15f;
			wispCon.gunTransitionTime = 0.1f;
		}

		private void Fire()
		{
			//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_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_004b: 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_0057: 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_0065: 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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: 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_00aa: 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_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_00d6: 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_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_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: 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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Expected O, but got Unknown
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Expected O, but got Unknown
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Expected O, but got Unknown
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0219: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			if (hasFired)
			{
				return;
			}
			hasFired = true;
			bool hasHit = false;
			Vector3 hitPoint = Vector3.zero;
			float hitDistance = 0f;
			Ray aimRay = ((BaseState)this).GetAimRay();
			BulletAttack bulletAttack = new BulletAttack
			{
				bulletCount = 1u,
				aimVector = ((Ray)(ref aimRay)).direction,
				origin = ((Ray)(ref aimRay)).origin,
				damage = damageCoefficient * ((BaseState)this).damageStat,
				damageColorIndex = (DamageColorIndex)0,
				damageType = DamageTypeCombo.op_Implicit((DamageType)0),
				falloffModel = (FalloffModel)1,
				maxDistance = range,
				force = force,
				hitMask = CommonMasks.bullet,
				minSpread = 0f,
				maxSpread = 0f,
				isCrit = ((BaseState)this).RollCrit(),
				owner = ((EntityState)this).gameObject,
				muzzleName = muzzleString,
				smartCollision = false,
				procChainMask = default(ProcChainMask),
				procCoefficient = procCoefficient,
				radius = 0.25f,
				sniper = false,
				stopperMask = CommonMasks.bullet,
				weapon = null,
				spreadPitchScale = 0f,
				spreadYawScale = 0f,
				queryTriggerInteraction = (QueryTriggerInteraction)0,
				hitEffectPrefab = FirePistol2.hitEffectPrefab
			};
			bool flag = true;
			bulletAttack.hitCallback = (HitCallback)delegate(BulletAttack bulletAttackRef, ref BulletHit hitInfo)
			{
				//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)
				bool result = BulletAttack.defaultHitCallback.Invoke(bulletAttackRef, ref hitInfo);
				if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox))
				{
					hasHit = true;
					hitPoint = hitInfo.point;
					hitDistance = hitInfo.distance;
					hitHealthComponent = hitInfo.hitHurtBox.healthComponent;
				}
				return result;
			};
			bulletAttack.filterCallback = (FilterCallback)delegate(BulletAttack bulletAttackRef, ref BulletHit info)
			{
				return (!Object.op_Implicit((Object)(object)info.entityObject) || (Object)(object)info.entityObject != (Object)(object)bulletAttack.owner) && BulletAttack.defaultFilterCallback.Invoke(bulletAttackRef, ref info);
			};
			bulletAttack.Fire();
			if (hasHit && Object.op_Implicit((Object)(object)hitHealthComponent))
			{
				RicochetOrb ricochetOrb = new RicochetOrb();
				ricochetOrb.bouncesRemaining = 5;
				ricochetOrb.resetBouncedObjects = resetBouncedObjects;
				ricochetOrb.damageValue = bulletAttack.damage / 2f;
				ricochetOrb.isCrit = ((BaseState)this).RollCrit();
				ricochetOrb.teamIndex = TeamComponent.GetObjectTeam(((EntityState)this).gameObject);
				ricochetOrb.damageType = DamageTypeCombo.op_Implicit(bulletAttack.damageType);
				ricochetOrb.attacker = ((EntityState)this).gameObject;
				ricochetOrb.attackerBody = ((EntityState)this).characterBody;
				ricochetOrb.procCoefficient = bulletAttack.procCoefficient;
				((Orb)ricochetOrb).duration = 0.2f;
				ricochetOrb.bouncedObjects = new List<HealthComponent>();
				ricochetOrb.range = Mathf.Max(30f, hitDistance);
				ricochetOrb.tracerEffectPrefab = AssetsWisp.NukorBeamNoLoop;
				ricochetOrb.hitEffectPrefab = FireBarrage.hitEffectPrefab;
				((Orb)ricochetOrb).origin = hitPoint;
				ricochetOrb.bouncedObjects.Add(hitHealthComponent);
				HurtBox val = ricochetOrb.PickNextTarget(hitPoint);
				if (Object.op_Implicit((Object)(object)val))
				{
					((Orb)ricochetOrb).target = val;
					OrbManager.instance.AddOrb((Orb)(object)ricochetOrb);
				}
			}
		}

		public override void FixedUpdate()
		{
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= fireTime)
			{
				Fire();
			}
			if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill1.down)
			{
				NetMessageExtensions.Send((INetMessage)(object)new NukorEffectOffNetworkRequest(((EntityState)this).characterBody.masterObjectId), (NetworkDestination)1);
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

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

		public static float procCoefficient = 1f;

		public static float baseDuration = 0.1f;

		public static float throwForce = 15f;

		public static GameObject projectilePrefab;

		public static Vector3 endPoint;

		private WispController wispCon;

		private float duration;

		private float fireTimer;

		private Vector3 startingDirection;

		private bool hasFired;

		private Animator animator;

		public override void OnEnter()
		{
			//IL_0064: 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_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: 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_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			AkSoundEngine.PostEvent(2976343780u, ((EntityState)this).gameObject);
			AkSoundEngine.PostEvent(3989137411u, ((EntityState)this).gameObject);
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((EntityState)this).characterBody.SetAimTimer(2f);
			animator = ((EntityState)this).GetModelAnimator();
			((EntityState)this).characterBody.AddTimedBuffAuthority(Buffs.Cloak.buffIndex, 5f);
			hasFired = false;
			Ray aimRay = ((BaseState)this).GetAimRay();
			startingDirection = ((Ray)(ref aimRay)).direction;
			wispCon = ((EntityState)this).gameObject.GetComponent<WispController>();
			if (Object.op_Implicit((Object)(object)wispCon))
			{
				wispCon.SetNewTransitionTarget(WispController.GunState.HOLSTER);
			}
			if (((EntityState)this).isAuthority)
			{
				if (wispCon.hasFiredClone)
				{
					NetMessageExtensions.Send((INetMessage)(object)new ClientWispDestroyNetworkRequest(((EntityState)this).characterBody.masterObjectId), (NetworkDestination)1);
					wispCon.hasFiredClone = false;
					wispCon.wispStopwatch = 0f;
				}
				NetMessageExtensions.Send((INetMessage)(object)new ClientWispSpawnNetworkRequest(((EntityState)this).characterBody.masterObjectId, startingDirection, ((BaseState)this).moveSpeedStat), (NetworkDestination)1);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			wispCon.SetNewTransitionTarget(WispController.GunState.RUN);
		}

		public override void FixedUpdate()
		{
			//IL_0025: 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_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)
			((EntityState)this).FixedUpdate();
			if (!hasFired && ((EntityState)this).isAuthority)
			{
				wispCon.aimDir = startingDirection;
				wispCon.originalLoc = ((EntityState)this).transform.position;
				wispCon.hasFiredClone = true;
				wispCon.wispStopwatch = 0f;
				((EntityState)this).skillLocator.utility.SetSkillOverride((object)((EntityState)this).skillLocator.utility, WispMod.Modules.Survivors.Wisp.willOWispReactivate, (SkillOverridePriority)4);
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

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

		private Vector3 endPoint;

		private Vector3 newDirectionalVector;

		private Vector3 originalDirectionalVector;

		private float stopwatch;

		private WispController wispCon;

		public override void OnEnter()
		{
			//IL_007e: 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_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: 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_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: 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)
			stopwatch = 0f;
			wispCon = ((EntityState)this).gameObject.GetComponent<WispController>();
			if (wispCon.wispStopwatch >= 0f)
			{
				endPoint = wispCon.originalLoc + ((Vector3)(ref wispCon.aimDir)).normalized * (25f * wispCon.wispStopwatch);
			}
			else
			{
				endPoint = wispCon.originalLoc + ((Vector3)(ref wispCon.aimDir)).normalized * 25f;
			}
			if (((EntityState)this).isAuthority)
			{
				NetMessageExtensions.Send((INetMessage)(object)new ClientWispChildPositionNetworkRequest(((EntityState)this).characterBody.masterObjectId), (NetworkDestination)1);
			}
		}

		public override void OnExit()
		{
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			AkSoundEngine.PostEvent(530129416u, ((EntityState)this).gameObject);
			AkSoundEngine.PostEvent(3664384312u, ((EntityState)this).gameObject);
			AkSoundEngine.StopPlayingID(3989137411u);
			if (((EntityState)this).isAuthority)
			{
				wispCon.hasFiredClone = false;
				wispCon.wispStopwatch = 0f;
				wispCon.CustomUIObject.SetActive(false);
				((Behaviour)wispCon.willOWisptimeleft).enabled = false;
				((EntityState)this).skillLocator.utility.UnsetSkillOverride((object)((EntityState)this).skillLocator.utility, WispMod.Modules.Survivors.Wisp.willOWispReactivate, (SkillOverridePriority)4);
				NetMessageExtensions.Send((INetMessage)(object)new ClientWispDestroyNetworkRequest(((EntityState)this).characterBody.masterObjectId), (NetworkDestination)1);
			}
			((EntityState)this).OnExit();
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (((EntityState)this).isAuthority)
			{
				if (WispPlugin.clientWispUpdatedRecently)
				{
					Teleport();
				}
				if (stopwatch > teleportMaxWait)
				{
					FallbackTeleport();
				}
			}
		}

		public void Teleport()
		{
			//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_001c: 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)
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(WispPlugin.clientWispLocation, ((EntityState)this).transform.rotation, true);
			WispPlugin.clientWispUpdatedRecently = false;
			((EntityState)this).outer.SetNextStateToMain();
		}

		public void FallbackTeleport()
		{
			//IL_0003: 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_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//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_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_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = endPoint - wispCon.originalLoc;
			originalDirectionalVector = ((Vector3)(ref val)).normalized;
			val = endPoint - ((EntityState)this).transform.position;
			newDirectionalVector = ((Vector3)(ref val)).normalized;
			Ray val2 = default(Ray);
			((Ray)(ref val2))..ctor(wispCon.originalLoc, originalDirectionalVector);
			RaycastHit val3 = default(RaycastHit);
			if (Physics.Raycast(val2, ref val3, 25f * wispCon.wispStopwatch))
			{
				endPoint = ((RaycastHit)(ref val3)).point - originalDirectionalVector * 1.5f;
			}
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(endPoint, ((EntityState)this).transform.rotation, true);
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			((BaseCharacterController)((EntityState)this).characterMotor).Motor.SetPositionAndRotation(endPoint, ((EntityState)this).transform.rotation, false);
			WispPlugin.clientWispUpdatedRecently = false;
			((EntityState)this).outer.SetNextStateToMain();
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)2;
		}
	}
}
namespace WispMod.SkillStates.Orbs
{
	public class RicochetOrb : Orb
	{
		public delegate void HitCallback(RicochetOrb orb);

		public int bouncesRemaining;

		public bool resetBouncedObjects;

		public float damageValue;

		public GameObject attacker;

		public CharacterBody attackerBody;

		public GameObject inflictor;

		public List<HealthComponent> bouncedObjects;

		public TeamIndex teamIndex;

		public bool isCrit;

		public ProcChainMask procChainMask;

		public float procCoefficient = 0.25f;

		public DamageColorIndex damageColorIndex;

		public float range = 10f;

		public DamageType damageType;

		private BullseyeSearch search;

		public GameObject hitEffectPrefab;

		public GameObject tracerEffectPrefab;

		public string hitSoundString;

		public HitCallback hitCallback;

		public override void OnArrival()
		{
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//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_0077: 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_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: 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_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00c7: 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_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Expected O, but got Unknown
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Expected O, but got Unknown
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0189: Unknown result type (might be due to invalid IL or missing references)
			//IL_019e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: 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_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0352: Unknown result type (might be due to invalid IL or missing references)
			//IL_0357: Unknown result type (might be due to invalid IL or missing references)
			//IL_036c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Unknown result type (might be due to invalid IL or missing references)
			//IL_0399: Unknown result type (might be due to invalid IL or missing references)
			((Orb)this).OnArrival();
			if (Object.op_Implicit((Object)(object)base.target))
			{
				if (!string.IsNullOrEmpty(hitSoundString))
				{
					Util.PlaySound(hitSoundString, ((Component)base.target).gameObject);
				}
				if (Object.op_Implicit((Object)(object)tracerEffectPrefab))
				{
					EffectData val = new EffectData
					{
						origin = ((Component)base.target).transform.position,
						start = base.origin
					};
					Vector3 val2 = base.origin - ((Component)base.target).transform.position;
					val.scale = ((Vector3)(ref val2)).magnitude;
					val2 = base.origin - ((Component)base.target).transform.position;
					val.rotation = Quaternion.LookRotation(((Vector3)(ref val2)).normalized);
					EffectData val3 = val;
					EffectManager.SpawnEffect(tracerEffectPrefab, val3, true);
				}
				if (Object.op_Implicit((Object)(object)hitEffectPrefab))
				{
					EffectManager.SimpleImpactEffect(hitEffectPrefab, ((Component)base.target).transform.position, Vector3.zero, true);
				}
				if (damageValue > 0f)
				{
					HealthComponent healthComponent = base.target.healthComponent;
					if (Object.op_Implicit((Object)(object)healthComponent))
					{
						DamageInfo val4 = new DamageInfo();
						val4.damage = damageValue;
						val4.attacker = attacker;
						val4.inflictor = inflictor;
						val4.force = Vector3.zero;
						val4.crit = isCrit;
						val4.procChainMask = procChainMask;
						val4.procCoefficient = procCoefficient;
						val4.position = ((Component)base.target).transform.position;
						val4.damageColorIndex = damageColorIndex;
						val4.damageType = DamageTypeCombo.op_Implicit(damageType);
						healthComponent.TakeDamage(val4);
						GlobalEventManager.instance.OnHitEnemy(val4, ((Component)healthComponent).gameObject);
						GlobalEventManager.instance.OnHitAll(val4, ((Component)healthComponent).gameObject);
					}
				}
				hitCallback?.Invoke(this);
				if (bouncesRemaining > 0)
				{
					if (resetBouncedObjects)
					{
						bouncedObjects.Clear();
						bouncedObjects.Add(base.target.healthComponent);
					}
					HurtBox val5 = PickNextTarget(((Component)base.target).transform.position);
					if (Object.op_Implicit((Object)(object)val5))
					{
						RicochetOrb ricochetOrb = new RicochetOrb();
						ricochetOrb.search = search;
						((Orb)ricochetOrb).origin = ((Component)base.target).transform.position;
						((Orb)ricochetOrb).target = val5;
						ricochetOrb.attacker = attacker;
						ricochetOrb.attackerBody = attackerBody;
						ricochetOrb.inflictor = inflictor;
						ricochetOrb.teamIndex = teamIndex;
						ricochetOrb.damageValue = damageValue;
						ricochetOrb.isCrit = attackerBody.RollCrit();
						ricochetOrb.bouncesRemaining = bouncesRemaining - 1;
						ricochetOrb.bouncedObjects = bouncedObjects;
						ricochetOrb.resetBouncedObjects = resetBouncedObjects;
						ricochetOrb.procChainMask = procChainMask;
						ricochetOrb.procCoefficient = procCoefficient;
						ricochetOrb.damageColorIndex = damageColorIndex;
						((Orb)ricochetOrb).duration = ((Orb)this).duration;
						ricochetOrb.range = range;
						ricochetOrb.damageType = damageType;
						ricochetOrb.tracerEffectPrefab = tracerEffectPrefab;
						ricochetOrb.hitEffectPrefab = hitEffectPrefab;
						ricochetOrb.hitSoundString = hitSoundString;
						ricochetOrb.hitCallback = hitCallback;
						OrbManager.instance.AddOrb((Orb)(object)ricochetOrb);
						return;
					}
				}
			}
			bouncedObjects.Clear();
		}

		public HurtBox PickNextTarget(Vector3 position)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: 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_0042: 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_0071: 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_001a: Expected O, but got Unknown
			if (search == null)
			{
				search = new BullseyeSearch();
			}
			search.searchOrigin = position;
			search.searchDirection = Vector3.zero;
			search.teamMaskFilter = TeamMask.allButNeutral;
			((TeamMask)(ref search.teamMaskFilter)).RemoveTeam(teamIndex);
			search.filterByLoS = false;
			search.sortMode = (SortMode)1;
			search.maxDistanceFilter = range;
			search.RefreshCandidates();
			HurtBox val = (from v in search.GetResults()
				where !bouncedObjects.Contains(v.healthComponent)
				select v).FirstOrDefault();
			if (Object.op_Implicit((Object)(object)val))
			{
				bouncedObjects.Add(val.healthComponent);
			}
			return val;
		}
	}
}
namespace WispMod.SkillStates.Wisp
{
	internal class BreachSurgeCheckHold : BaseSkillState
	{
		internal float timeToHold;

		internal float defaultTimer;

		public override void OnEnter()
		{
			timeToHold = 0.11f;
			defaultTimer = 0.2f;
			((BaseState)this).OnEnter();
		}

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

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).inputBank.skill4.down && ((EntityState)this).fixedAge > timeToHold)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new BreachSurge
				{
					shouldTeleport = true
				});
			}
			if (!((EntityState)this).inputBank.skill4.down)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new BreachSurge
				{
					shouldTeleport = false
				});
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)5;
		}
	}
	internal class BreachSurgeCheckHoldScepter : BaseSkillState
	{
		internal float timeToHold;

		internal float defaultTimer;

		public override void OnEnter()
		{
			timeToHold = 0.11f;
			defaultTimer = 0.2f;
			((BaseState)this).OnEnter();
		}

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

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).inputBank.skill4.down && ((EntityState)this).fixedAge > timeToHold)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new BreachSurgeScepter
				{
					shouldTeleport = true
				});
			}
			if (!((EntityState)this).inputBank.skill4.down)
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new BreachSurgeScepter
				{
					shouldTeleport = false
				});
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)5;
		}
	}
	internal class FallStun : BaseSkillState
	{
		private float stopwatch;

		public override void OnEnter()
		{
			//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)
			((BaseState)this).OnEnter();
			stopwatch = 0f;
			((EntityState)this).characterMotor.velocity = Vector3.zero;
			AkSoundEngine.PostEvent(189871802u, ((EntityState)this).gameObject);
			((EntityState)this).PlayAnimation("FullBody, Override", "FallStun", "Emote.playbackRate", 0.5f, 0f);
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).PlayCrossfade("FullBody, Override", "BufferEmpty", "Emote.playbackRate", 0.1f, 0.5f);
			((Behaviour)((EntityState)this).characterBody.inputBank).enabled = true;
		}

		public override void FixedUpdate()
		{
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= 0.7f)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)5;
		}
	}
	internal class GloomScepterState : BaseSkillState
	{
		public float baseDuration = 0.2f;

		public WispController wispCon;

		public uint castSoundID;

		public override void OnEnter()
		{
			((BaseState)this).OnEnter();
			((EntityState)this).PlayCrossfade("Fullbody, Override", "BreachSurge", "ShootGun.playbackRate", baseDuration / ((BaseState)this).attackSpeedStat, baseDuration / ((BaseState)this).attackSpeedStat / 5f);
			castSoundID = AkSoundEngine.PostEvent(2000232110u, ((EntityState)this).gameObject);
			wispCon = ((EntityState)this).gameObject.GetComponent<WispController>();
			if (Object.op_Implicit((Object)(object)wispCon))
			{
				wispCon.SetNewTransitionTarget(WispController.GunState.HOLSTER);
			}
		}

		public override void OnExit()
		{
			((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
			((EntityState)this).OnExit();
			wispCon.SetNewTransitionTarget(WispController.GunState.RUN);
		}

		public override void FixedUpdate()
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).fixedAge >= baseDuration / ((BaseState)this).attackSpeedStat)
			{
				NetMessageExtensions.Send((INetMessage)(object)new GloomSpawnNetworkRequest(((EntityState)this).characterBody.masterObjectId, isScepter: true), (NetworkDestination)1);
				AkSoundEngine.StopPlayingID(castSoundID);
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			return ((EntityState)this).GetMinimumInterruptPriority();
		}
	}
	internal class PullState : BaseSkillState
	{
		private WispController wispCon;

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

		public override void OnEnter()
		{
			//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_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: 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