Decompiled source of Arsonist Mod v3.0.0

ArsonistMod.dll

Decompiled 2 weeks 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 ArsonistMod.Content.Controllers;
using ArsonistMod.Modules;
using ArsonistMod.Modules.Characters;
using ArsonistMod.Modules.Networking;
using ArsonistMod.Modules.ProjectileControllers;
using ArsonistMod.Modules.Survivors;
using ArsonistMod.SkillStates;
using ArsonistMod.SkillStates.Arsonist.Secondary;
using ArsonistMod.SkillStates.BaseStates;
using ArsonistMod.SkillStates.EmoteStates;
using ArsonistMod.SkillStates.ZeroPointBlast;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using EmotesAPI;
using EntityStates;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.LemurianMonster;
using EntityStates.Mage.Weapon;
using EntityStates.Missions.BrotherEncounter;
using EntityStates.VoidRaidCrab;
using HG;
using HG.BlendableTypes;
using On.EntityStates.Missions.BrotherEncounter;
using On.EntityStates.VoidRaidCrab;
using On.RoR2;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
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;

[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("ArsonistMod")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+46fb825c6826073730270a07be2889236788e0f0")]
[assembly: AssemblyProduct("ArsonistMod")]
[assembly: AssemblyTitle("ArsonistMod")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: UnverifiableCode]
namespace ArsonistMod
{
	[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.Arsonist", "Arsonist", "3.0.0")]
	public class ArsonistPlugin : BaseUnityPlugin
	{
		public const string MODUID = "com.PopcornFactory.Arsonist";

		public const string MODNAME = "Arsonist";

		public const string MODVERSION = "3.0.0";

		public const string DEVELOPER_PREFIX = "POPCORN";

		public static bool scepterAvailable;

		public static ArsonistPlugin instance;

		public static AkGameObj akGameObject;

		private void Awake()
		{
			instance = this;
			Log.Init(((BaseUnityPlugin)this).Logger);
			Config.ReadConfig();
			Config.OnChangeHooks();
			AssetsArsonist.Initialize();
			Unlockables.Initialize();
			if (Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"))
			{
				Config.SetupRiskOfOptions();
			}
			if (Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"))
			{
				scepterAvailable = true;
			}
			States.RegisterStates();
			Buffs.RegisterBuffs();
			Projectiles.RegisterProjectiles();
			Tokens.AddTokens();
			ItemDisplays.PopulateDisplays();
			Damage.SetupModdedDamage();
			new Arsonist().Initialize();
			NetworkRequestSetup();
			new ContentPacks().Initialize();
			Hook();
		}

		private void NetworkRequestSetup()
		{
			NetworkingAPI.RegisterMessageType<BurnNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PlaySoundNetworkRequest>();
			NetworkingAPI.RegisterMessageType<TakeDamageNetworkRequest>();
			NetworkingAPI.RegisterMessageType<AttachFlareNetworkRequest>();
			NetworkingAPI.RegisterMessageType<FlamethrowerDotNetworkRequest>();
			NetworkingAPI.RegisterMessageType<ToggleMasochismEffectNetworkRequest>();
			NetworkingAPI.RegisterMessageType<KillAllEffectsNetworkRequest>();
			NetworkingAPI.RegisterMessageType<PlayCleanseBlastNetworkRequest>();
		}

		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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Expected O, but got Unknown
			CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats);
			HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage);
			CharacterModel.UpdateOverlays += new hook_UpdateOverlays(CharacterModel_UpdateOverlays);
			CharacterModel.Start += new hook_Start(CharacterModel_Start);
			CharacterBody.OnDeathStart += new hook_OnDeathStart(CharacterBody_OnDeathStart);
			DotController.InflictDot_refInflictDotInfo += new hook_InflictDot_refInflictDotInfo(DotController_InflictDot_refInflictDotInfo);
			if (Chainloader.PluginInfos.ContainsKey("com.weliveinasociety.CustomEmotesAPI"))
			{
				SurvivorCatalog.Init += new hook_Init(SurvivorCatalog_Init);
			}
		}

		private void DotController_InflictDot_refInflictDotInfo(orig_InflictDot_refInflictDotInfo orig, ref InflictDotInfo inflictDotInfo)
		{
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Invalid comparison between Unknown and I4
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Invalid comparison between Unknown and I4
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Invalid comparison between Unknown and I4
			if (Object.op_Implicit((Object)(object)inflictDotInfo.victimObject))
			{
				CharacterBody component = inflictDotInfo.victimObject.GetComponent<CharacterBody>();
				if (Object.op_Implicit((Object)(object)component) && component.baseNameToken == "POPCORN_ARSONIST_BODY_NAME" && ((int)inflictDotInfo.dotIndex == 1 || (int)inflictDotInfo.dotIndex == 2 || (int)inflictDotInfo.dotIndex == 7))
				{
					inflictDotInfo.totalDamage *= StaticValues.igniteDamageReduction;
				}
			}
			orig.Invoke(ref inflictDotInfo);
		}

		private void CharacterBody_OnDeathStart(orig_OnDeathStart orig, CharacterBody self)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self);
			if (self.baseNameToken == "POPCORN_ARSONIST_BODY_NAME")
			{
				NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)self).netId, 2176930590u), (NetworkDestination)1);
				NetMessageExtensions.Send((INetMessage)(object)new KillAllEffectsNetworkRequest(((NetworkBehaviour)self).netId, killMaso: true), (NetworkDestination)1);
				NetMessageExtensions.Send((INetMessage)(object)new ToggleMasochismEffectNetworkRequest(((NetworkBehaviour)self).netId, toggleOn: false), (NetworkDestination)1);
			}
		}

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

		private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self)
		{
			if (!Object.op_Implicit((Object)(object)self.healthComponent))
			{
				return;
			}
			orig.Invoke(self);
			if (Object.op_Implicit((Object)(object)self) && self.baseNameToken == "POPCORN_ARSONIST_BODY_NAME")
			{
				EnergySystem component = ((Component)self).gameObject.GetComponent<EnergySystem>();
				if (self.HasBuff(Buffs.blueBuff))
				{
					self.damage *= StaticValues.blueDamageMultiplier;
				}
				if (self.HasBuff(Buffs.lowerBuff))
				{
					self.damage *= StaticValues.lowerDamageMultiplier;
				}
				if (self.HasBuff(Buffs.cleanseSpeedBoost))
				{
					self.moveSpeed += 5f;
				}
				if (self.HasBuff(Buffs.masochismBuff))
				{
					self.attackSpeed *= StaticValues.igniteAttackSpeedMultiplier;
				}
				if (self.HasBuff(Buffs.overheatDebuff) && !self.HasBuff(Buffs.masochismDeactivatedDebuff) && !self.HasBuff(Buffs.masochismDeactivatedNonDebuff))
				{
					self.attackSpeed *= StaticValues.overheatAttackSpeedDebuff;
				}
				if (self.skillLocator.secondary.cooldownRemaining > 0f && component.hasOverheatedSecondary)
				{
					GenericSkill secondary = self.skillLocator.secondary;
					secondary.cooldownScale *= 1f;
				}
				else if (self.skillLocator.secondary.cooldownRemaining > 0f && !component.hasOverheatedSecondary)
				{
					GenericSkill secondary2 = self.skillLocator.secondary;
					secondary2.cooldownScale *= StaticValues.secondaryCooldownMultiplier;
				}
				if (self.skillLocator.utility.cooldownRemaining > 0f && component.hasOverheatedUtility)
				{
					GenericSkill utility = self.skillLocator.utility;
					utility.cooldownScale *= 1f;
				}
				else if (self.skillLocator.utility.cooldownRemaining > 0f && !component.hasOverheatedUtility)
				{
					GenericSkill utility2 = self.skillLocator.utility;
					utility2.cooldownScale *= StaticValues.utilityCooldownMultiplier;
				}
				if (self.skillLocator.special.cooldownRemaining > 0f && component.hasOverheatedSpecial)
				{
					GenericSkill special = self.skillLocator.special;
					special.cooldownScale *= 1f;
				}
				else if (self.skillLocator.special.cooldownRemaining > 0f && !component.hasOverheatedSpecial)
				{
					GenericSkill special2 = self.skillLocator.special;
					special2.cooldownScale *= StaticValues.specialCooldownMultiplier;
				}
			}
		}

		private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Invalid comparison between Unknown and I4
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Invalid comparison between Unknown and I4
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Invalid comparison between Unknown and I4
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Invalid comparison between Unknown and I4
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: 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_00f6: 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_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: 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_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.body))
			{
				bool flag = (int)damageInfo.dotIndex == 1 || (int)damageInfo.dotIndex == 2 || (int)damageInfo.dotIndex == 7;
				bool flag2 = (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 128;
				if (DamageAPI.HasModdedDamageType(damageInfo, Damage.arsonistStickyDamageType))
				{
					NetMessageExtensions.Send((INetMessage)(object)new AttachFlareNetworkRequest(((NetworkBehaviour)self.body).netId, ((NetworkBehaviour)damageInfo.attacker.GetComponent<CharacterBody>()).netId, AttachFlareNetworkRequest.FlareType.STRONG), (NetworkDestination)1);
				}
				else if (DamageAPI.HasModdedDamageType(damageInfo, Damage.arsonistWeakStickyDamageType))
				{
					NetMessageExtensions.Send((INetMessage)(object)new AttachFlareNetworkRequest(((NetworkBehaviour)self.body).netId, ((NetworkBehaviour)damageInfo.attacker.GetComponent<CharacterBody>()).netId, AttachFlareNetworkRequest.FlareType.WEAK), (NetworkDestination)1);
				}
				else if (DamageAPI.HasModdedDamageType(damageInfo, Damage.arsonistChildExplosionDamageType))
				{
					NetMessageExtensions.Send((INetMessage)(object)new AttachFlareNetworkRequest(((NetworkBehaviour)self.body).netId, ((NetworkBehaviour)damageInfo.attacker.GetComponent<CharacterBody>()).netId, AttachFlareNetworkRequest.FlareType.CHILD_STRONG), (NetworkDestination)1);
				}
				DamageType val = (DamageType)2097153;
				DamageType val2 = (DamageType)2359296;
				if (self.body.HasBuff(Buffs.fallDamageReductionBuff) && (DamageTypeCombo.op_Implicit(damageInfo.damageType) == val || DamageTypeCombo.op_Implicit(damageInfo.damageType) == val2) && damageInfo.damage >= 20f)
				{
					damageInfo.damage = 20f;
				}
				if (self.body.baseNameToken == "POPCORN_ARSONIST_BODY_NAME" && damageInfo.damage > self.fullHealth * Config.passiveHealthPercentageTriggerIgnite.Value && DamageTypeCombo.op_Implicit(damageInfo.damageType) != val && !self.body.HasBuff(Buffs.BearVoidReady) && !flag)
				{
					damageInfo.damage *= StaticValues.igniteDamageReduction;
					InflictDotInfo val3 = default(InflictDotInfo);
					val3.totalDamage = damageInfo.damage;
					val3.attackerObject = ((Component)self.body).gameObject;
					val3.victimObject = ((Component)self.body).gameObject;
					val3.duration = StaticValues.passiveIgniteLength;
					val3.dotIndex = (DotIndex)1;
					DotController.InflictDot(ref val3);
				}
			}
			orig.Invoke(self, damageInfo);
		}

		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))
			{
				ArsonistController component = ((Component)self.body).GetComponent<ArsonistController>();
				if (Object.op_Implicit((Object)(object)component))
				{
					overlayFunction(component.overheatingMaterial, Object.op_Implicit((Object)(object)component) && self.body.hasEffectiveAuthority, self);
					overlayFunction(component.outlineMaterial, Object.op_Implicit((Object)(object)component) && self.body.hasEffectiveAuthority, self);
				}
			}
		}

		private void CharacterModel_Start(orig_Start orig, CharacterModel self)
		{
			orig.Invoke(self);
			if (((Object)((Component)self).gameObject).name.Contains("ArsonistDisplay"))
			{
				ArsonistDisplayController component = ((Component)self).gameObject.GetComponent<ArsonistDisplayController>();
				if (!Object.op_Implicit((Object)(object)component))
				{
					component = ((Component)self).gameObject.AddComponent<ArsonistDisplayController>();
				}
			}
		}

		private void Inventory_GiveItem_ItemIndex_int(orig_GiveItem_ItemIndex_int orig, Inventory self, ItemIndex itemIndex, int count)
		{
			//IL_0003: 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)
			orig.Invoke(self, itemIndex, count);
			if (!NetworkServer.active || !Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)((Component)self).GetComponent<CharacterMaster>()))
			{
				return;
			}
			CharacterBody body = ((Component)self).GetComponent<CharacterMaster>().GetBody();
			if (Object.op_Implicit((Object)(object)body) && body.baseNameToken == "POPCORN_ARSONIST_BODY_NAME")
			{
				switch (ItemCatalog.GetItemDef(itemIndex).nameToken)
				{
				case "ITEM_EXPLODEONDEATH_NAME":
					break;
				case "ITEM_STRENGTHENBURN_NAME":
					break;
				case "ITEM_ICERING_NAME":
					break;
				case "ITEM_FIRERING_NAME":
					break;
				case "ITEM_EXPLODEONDEATHVOID_NAME":
					break;
				}
			}
		}

		private void Inventory_SetEquipmentIndexForSlot(orig_SetEquipmentIndexForSlot orig, Inventory self, EquipmentIndex newEquipmentIndex, uint slot)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			orig.Invoke(self, newEquipmentIndex, slot);
			if (!NetworkServer.active || !Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)((Component)self).GetComponent<CharacterMaster>()))
			{
				return;
			}
			CharacterBody body = ((Component)self).gameObject.GetComponent<CharacterMaster>().GetBody();
			if (Object.op_Implicit((Object)(object)body) && body.baseNameToken == "POPCORN_ARSONIST_BODY_NAME")
			{
				string nameToken = EquipmentCatalog.GetEquipmentDef(newEquipmentIndex).nameToken;
				if (!(nameToken == "EQUIPMENT_BURNNEARBY_NAME"))
				{
				}
			}
		}

		private void BrotherEncounter_BossDeath_OnEnter(orig_OnEnter orig, BossDeath self)
		{
			orig.Invoke(self);
			foreach (NetworkUser instances in NetworkUser.instancesList)
			{
				if (Object.op_Implicit((Object)(object)instances.master) && Object.op_Implicit((Object)(object)instances.master.GetBody()))
				{
					string baseNameToken = instances.master.GetBody().baseNameToken;
					if (!(baseNameToken == "POPCORN_ARSONIST_BODY_NAME"))
					{
					}
				}
			}
		}

		private void BrotherEncounter_Phase1_OnEnter(orig_OnEnter orig, Phase1 self)
		{
			orig.Invoke(self);
			foreach (NetworkUser instances in NetworkUser.instancesList)
			{
				if (Object.op_Implicit((Object)(object)instances.master) && Object.op_Implicit((Object)(object)instances.master.GetBody()))
				{
					string baseNameToken = instances.master.GetBody().baseNameToken;
					if (!(baseNameToken == "POPCORN_ARSONIST_BODY_NAME"))
					{
					}
				}
			}
		}

		private void VoidRaidCrab_DeathState_OnEnter(orig_OnEnter orig, DeathState self)
		{
			orig.Invoke(self);
			if (!NetworkServer.active)
			{
				return;
			}
			foreach (NetworkUser instances in NetworkUser.instancesList)
			{
				if (Object.op_Implicit((Object)(object)instances.master) && Object.op_Implicit((Object)(object)instances.master.GetBody()))
				{
					string baseNameToken = instances.master.GetBody().baseNameToken;
					if (!(baseNameToken == "POPCORN_ARSONIST_BODY_NAME"))
					{
					}
				}
			}
		}

		private void ScriptedCombatEncounter_BeginEncounter(orig_BeginEncounter orig, ScriptedCombatEncounter self)
		{
			orig.Invoke(self);
			if (!NetworkServer.active)
			{
				return;
			}
			foreach (NetworkUser instances in NetworkUser.instancesList)
			{
				if (Object.op_Implicit((Object)(object)instances.master) && Object.op_Implicit((Object)(object)instances.master.GetBody()))
				{
					string baseNameToken = instances.master.GetBody().baseNameToken;
					if (!(baseNameToken == "POPCORN_ARSONIST_BODY_NAME"))
					{
					}
				}
			}
		}

		private void IdleState_OnInteractionBegin(orig_OnInteractionBegin orig, BaseState self, Interactor activator)
		{
			orig.Invoke(self, activator);
			if (!NetworkServer.active)
			{
				return;
			}
			foreach (NetworkUser instances in NetworkUser.instancesList)
			{
				if (Object.op_Implicit((Object)(object)instances.master) && Object.op_Implicit((Object)(object)instances.master.GetBody()))
				{
					string baseNameToken = instances.master.GetBody().baseNameToken;
					if (!(baseNameToken == "POPCORN_ARSONIST_BODY_NAME"))
					{
					}
				}
			}
		}

		private void overlayFunction(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;
			}
		}
	}
	internal static class Log
	{
		internal static ManualLogSource _logSource;

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

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

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

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

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

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

		internal static void Warning(object data)
		{
			_logSource.LogWarning(data);
		}
	}
}
namespace ArsonistMod.SkillStates
{
	public class Cleanse : BaseSkillState
	{
		public ArsonistController arsonistController;

		public EnergySystem energySystem;

		public float baseDuration = 1f;

		public float duration;

		public bool isStrong;

		public override void OnEnter()
		{
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: 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_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b8: Expected O, but got Unknown
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0271: 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)
			((BaseState)this).OnEnter();
			energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>();
			arsonistController = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistController>();
			Ray aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration;
			isStrong = false;
			((EntityState)this).characterBody.SetAimTimer(duration);
			if (NetworkServer.active)
			{
				Util.CleanseBody(((EntityState)this).characterBody, true, false, false, true, true, false);
			}
			((EntityState)this).PlayCrossfade("Gesture, Override", "Cleanse", "Attack.playbackRate", duration, 0.1f);
			if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority)
			{
				energySystem.LowerHeat(energySystem.maxOverheat * StaticValues.cleanseHeatReductionMultiplier);
				energySystem.hasOverheatedUtility = false;
				ApplyBurn();
				if (((EntityState)this).characterBody.HasBuff(Buffs.OnFire.buffIndex))
				{
					isStrong = true;
				}
				NetMessageExtensions.Send((INetMessage)(object)new PlayCleanseBlastNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, strong: true), (NetworkDestination)1);
				if (!((EntityState)this).characterBody.characterMotor.isGrounded)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterBody.characterMotor, 3f);
				}
				EffectManager.SpawnEffect(AssetsArsonist.explosionPrefab, new EffectData
				{
					origin = ((EntityState)this).characterBody.transform.position,
					scale = StaticValues.cleanseBlastRadius,
					rotation = new Quaternion(0f, 0f, 0f, 0f)
				}, false);
				NetworkingHelpers.ApplyBuff(((EntityState)this).characterBody, Buffs.cleanseSpeedBoost.buffIndex, 1, duration * 2.5f);
			}
			else if (energySystem.currentOverheat >= energySystem.maxOverheat && ((EntityState)this).isAuthority)
			{
				if (!((EntityState)this).characterBody.characterMotor.isGrounded)
				{
					((BaseState)this).SmallHop(((EntityState)this).characterBody.characterMotor, 3f);
				}
				NetMessageExtensions.Send((INetMessage)(object)new PlayCleanseBlastNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, strong: false), (NetworkDestination)1);
				energySystem.isAcceleratedCooling = true;
			}
			if (((EntityState)this).isAuthority)
			{
				NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 1924783034u), (NetworkDestination)1);
			}
		}

		public void ApplyBurn()
		{
			//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_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: 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_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: 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_0060: Expected O, but got Unknown
			//IL_00d6: 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)
			Ray aimRay = ((BaseState)this).GetAimRay();
			BullseyeSearch val = new BullseyeSearch
			{
				teamMaskFilter = TeamMask.GetEnemyTeams(((BaseState)this).GetTeam()),
				filterByLoS = false,
				searchOrigin = ((EntityState)this).characterBody.footPosition,
				searchDirection = Random.onUnitSphere,
				sortMode = (SortMode)1,
				maxDistanceFilter = StaticValues.cleanseBlastRadius,
				maxAngleFilter = 360f
			};
			val.RefreshCandidates();
			val.FilterOutGameObject(((EntityState)this).gameObject);
			List<HurtBox> list = val.GetResults().ToList();
			foreach (HurtBox item in list)
			{
				if (Object.op_Implicit((Object)(object)item) && Object.op_Implicit((Object)(object)item.healthComponent) && Object.op_Implicit((Object)(object)item.healthComponent.body))
				{
					NetMessageExtensions.Send((INetMessage)(object)new BurnNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody.master).netId, ((NetworkBehaviour)item.healthComponent.body.master).netId), (NetworkDestination)1);
				}
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty");
			if (!isStrong)
			{
			}
		}

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

		public override InterruptPriority GetMinimumInterruptPriority()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return (InterruptPriority)7;
		}
	}
	public class FireSpray : BaseSkillState
	{
		public EnergySystem energySystem;

		public float baseDuration = 0.5f;

		public float duration;

		public static GameObject effectPrefab;

		private string muzzleString = "GunMuzzle";

		private Transform muzzlePos;

		private Animator animator;

		private float damageCoefficient = StaticValues.firesprayWeakDamageCoefficient;

		private float altDamageCoefficient = StaticValues.altFiresprayWeakDamageCoefficient;

		private float strongdamageCoefficient = StaticValues.firesprayStrongDamageCoefficient;

		private float altStrongDamageCoefficient = StaticValues.altFiresprayStrongDamageCoefficient;

		public static float spreadBloomValue = 10f;

		private float force = 400f;

		private float strongforce = 1000f;

		private float speedOverride = 100f;

		private float strongspeedOverride = 100f;

		private GameObject chargeVfxInstance;

		private ArsonistPassive passive;

		private bool isBlue;

		public float Energy = StaticValues.firesprayEnergyCost;

		private float energyCost;

		private float energyflatCost;

		private float surgeTimer;

		private float surgeWait = 0.15f;

		private bool surgeFired;

		private bool fireSurgeShot;

		private bool surgeFiredOverheated;

		public override void OnEnter()
		{
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>();
			passive = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistPassive>();
			isBlue = passive.isBlueGauge();
			((EntityState)this).characterBody.isSprinting = false;
			Ray aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((EntityState)this).characterBody.SetAimTimer(duration);
			animator = ((EntityState)this).GetModelAnimator();
			animator.SetBool("attacking", true);
			((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).PlayCrossfade("Gesture, Override", "FireSpray", "Attack.playbackRate", duration, 0.1f);
			ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator();
			muzzlePos = modelChildLocator.FindChild(muzzleString);
			energyflatCost = Energy;
			if (energyflatCost < 0f)
			{
				energyflatCost = 1f;
			}
			energyCost = energySystem.costmultiplierOverheat * energyflatCost;
			if (energyCost < 0f)
			{
				energyCost = 1f;
			}
			fireSurgeShot = ((EntityState)this).characterBody.HasBuff(Buffs.masochismSurgeActiveBuff);
			if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority)
			{
				FireBolt();
				energySystem.AddHeat(energyCost);
				surgeFiredOverheated = false;
				NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 470984906u), (NetworkDestination)1);
			}
			else if (energySystem.currentOverheat >= energySystem.maxOverheat && ((EntityState)this).isAuthority)
			{
				FireBall();
				surgeFiredOverheated = true;
				NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 2300744954u), (NetworkDestination)1);
			}
			((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue);
			if (duration < surgeWait)
			{
				surgeWait = duration;
			}
		}

		public void FireBall()
		{
			//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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			Ray aimRay = ((BaseState)this).GetAimRay();
			float num = (isBlue ? altDamageCoefficient : damageCoefficient);
			Vector3 displacedOrigin = GetDisplacedOrigin(aimRay);
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager.instance.FireProjectile(Projectiles.lemurianFireBall, displacedOrigin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * num, force, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, speedOverride);
			}
		}

		public void FireBolt()
		{
			//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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_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)
			Ray aimRay = ((BaseState)this).GetAimRay();
			float num = (isBlue ? altStrongDamageCoefficient : strongdamageCoefficient);
			Vector3 displacedOrigin = GetDisplacedOrigin(aimRay);
			if (((EntityState)this).isAuthority)
			{
				ProjectileManager.instance.FireProjectile(Projectiles.artificerFirebolt, displacedOrigin, Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction), ((EntityState)this).gameObject, ((BaseState)this).damageStat * num, strongforce, Util.CheckRoll(((BaseState)this).critStat, ((EntityState)this).characterBody.master), (DamageColorIndex)0, (GameObject)null, strongspeedOverride);
			}
		}

		public Vector3 GetDisplacedOrigin(Ray aimRay)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			float num = 2.5f;
			float num2 = 1.25f;
			Vector3 direction;
			Vector3 result;
			if (!CheckLookingDown())
			{
				Vector3 origin = ((Ray)(ref aimRay)).origin;
				direction = ((Ray)(ref aimRay)).direction;
				result = origin + num2 * ((Vector3)(ref direction)).normalized;
			}
			else
			{
				Vector3 origin2 = ((Ray)(ref aimRay)).origin;
				direction = ((Ray)(ref aimRay)).direction;
				result = origin2 + num * ((Vector3)(ref direction)).normalized;
			}
			return result;
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			animator.SetBool("attacking", false);
			((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty");
			if (Object.op_Implicit((Object)(object)chargeVfxInstance))
			{
				EntityState.Destroy((Object)(object)chargeVfxInstance);
			}
		}

		public override void FixedUpdate()
		{
			//IL_0098: 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)
			((EntityState)this).FixedUpdate();
			if (fireSurgeShot)
			{
				surgeTimer += Time.fixedDeltaTime;
			}
			if (surgeTimer > surgeWait && !surgeFired && ((EntityState)this).isAuthority && fireSurgeShot)
			{
				surgeFired = true;
				if (surgeFiredOverheated)
				{
					FireBall();
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 2300744954u), (NetworkDestination)1);
				}
				else
				{
					FireBolt();
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 470984906u), (NetworkDestination)1);
				}
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority && ((BaseSkillState)this).IsKeyDownAuthority())
			{
				((EntityState)this).outer.SetNextState((EntityState)(object)new FireSpray());
			}
			else if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private bool CheckLookingDown()
		{
			//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)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Ray aimRay = ((BaseState)this).GetAimRay();
			if (Vector3.Dot(((Ray)(ref aimRay)).direction, Vector3.down) > 0.6f)
			{
				return true;
			}
			return 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)2;
		}
	}
	public class FireSprayScepter : BaseSkillState
	{
		public EnergySystem energySystem;

		public float baseDuration = 0.5f;

		public float duration;

		public static GameObject effectPrefab;

		private string muzzleString = "GunMuzzle";

		private Transform muzzlePos;

		private Animator animator;

		private float damageCoefficient = StaticValues.firesprayScepterWeakDamageCoefficient;

		private float altDamageCoefficient = StaticValues.altFiresprayScepterWeakDamageCoefficient;

		private float strongdamageCoefficient = StaticValues.firesprayScepterStrongDamageCoefficient;

		private float altStrongDamageCoefficient = StaticValues.altFiresprayScepterStrongDamageCoefficient;

		private float chargedMultiplier = StaticValues.firesprayScepterChargedMultiplier;

		private float range = StaticValues.firesprayScepterRange;

		public static float spreadBloomValue = 10f;

		private float force = 400f;

		private float strongforce = 1000f;

		private float speedOverride = 100f;

		private float strongspeedOverride = 100f;

		private GameObject chargeVfxInstance;

		private ArsonistPassive passive;

		private bool isBlue;

		public float Energy = StaticValues.firesprayEnergyCost;

		private float energyCost;

		private float energyflatCost;

		private bool isCharged = false;

		private float baseTimeCharge = 0.75f;

		private float chargeStopwatch = 0f;

		private float skillStopwatch = 0f;

		private bool finishUp = false;

		private uint chargeSound;

		private float surgeTimer;

		private float surgeWait = StaticValues.firesprayScepterWaitTimer;

		private bool surgeFired;

		private bool fireSurgeShot;

		private bool surgeFiredOverheated;

		public override void OnEnter()
		{
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>();
			passive = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistPassive>();
			isBlue = passive.isBlueGauge();
			((EntityState)this).characterBody.isSprinting = false;
			Ray aimRay = ((BaseState)this).GetAimRay();
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			((EntityState)this).characterBody.SetAimTimer(duration + 1f);
			animator = ((EntityState)this).GetModelAnimator();
			ChildLocator modelChildLocator = ((EntityState)this).GetModelChildLocator();
			muzzlePos = modelChildLocator.FindChild(muzzleString);
			AkSoundEngine.SetRTPCValue("PlaybackSpeed_Arsonist_Charge", ((BaseState)this).attackSpeedStat);
			chargeSound = AkSoundEngine.PostEvent(2746588547u, ((EntityState)this).gameObject);
			fireSurgeShot = ((EntityState)this).characterBody.HasBuff(Buffs.masochismSurgeActiveBuff);
			if (duration < surgeWait)
			{
				surgeWait = duration;
			}
		}

		public void PlayAttackAnimation()
		{
			animator.SetBool("attacking", true);
			((EntityState)this).GetModelAnimator().SetFloat("Attack.playbackRate", ((BaseState)this).attackSpeedStat);
			((EntityState)this).PlayCrossfade("Gesture, Override", "FireSpray", "Attack.playbackRate", duration, 0.1f);
		}

		public void FireBall()
		{
			//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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_009d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: 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_00f4: 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_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Expected O, but got Unknown
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: 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_0211: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: 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_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Unknown result type (might be due to invalid IL or missing references)
			//IL_024b: Expected O, but got Unknown
			//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: 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_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Expected O, but got Unknown
			Ray aimRay = ((BaseState)this).GetAimRay();
			float num = (isBlue ? altDamageCoefficient : damageCoefficient);
			Vector3 displacedOrigin = GetDisplacedOrigin(aimRay);
			if (((EntityState)this).isAuthority)
			{
				new BulletAttack
				{
					bulletCount = 1u,
					aimVector = ((Ray)(ref aimRay)).direction,
					origin = ((Ray)(ref aimRay)).origin,
					damage = ((BaseState)this).damageStat * num,
					damageColorIndex = (DamageColorIndex)0,
					damageType = DamageTypeCombo.op_Implicit((DamageType)0),
					falloffModel = (FalloffModel)0,
					maxDistance = range,
					force = force,
					hitMask = CommonMasks.laser,
					minSpread = 0f,
					maxSpread = 0f,
					isCrit = ((BaseState)this).RollCrit(),
					owner = ((EntityState)this).gameObject,
					smartCollision = true,
					procChainMask = default(ProcChainMask),
					procCoefficient = 1f,
					radius = 0.5f,
					sniper = false,
					stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask,
					weapon = null,
					spreadPitchScale = 0f,
					spreadYawScale = 0f,
					hitCallback = new HitCallback(laserHitCallback),
					queryTriggerInteraction = (QueryTriggerInteraction)0,
					hitEffectPrefab = null,
					tracerEffectPrefab = null
				}.Fire();
				RaycastHit val = default(RaycastHit);
				Physics.Raycast(aimRay, ref val, float.PositiveInfinity, ~(1 << LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)), (QueryTriggerInteraction)1);
				float distance = ((RaycastHit)(ref val)).distance;
				if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val)).collider) && ((RaycastHit)(ref val)).distance > 10f)
				{
					EffectManager.SpawnEffect(AssetsArsonist.fireballScepterWeakTracer, new EffectData
					{
						origin = muzzlePos.position,
						rotation = Quaternion.LookRotation(((RaycastHit)(ref val)).point - muzzlePos.position, Vector3.up),
						scale = 1f
					}, true);
				}
				else
				{
					EffectManager.SpawnEffect(AssetsArsonist.fireballScepterWeakTracer, new EffectData
					{
						origin = muzzlePos.position,
						rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction),
						scale = 1f
					}, true);
				}
			}
		}

		private bool laserHitCallback(BulletAttack bulletAttack, ref BulletHit hitInfo)
		{
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Invalid comparison between Unknown and I4
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Expected O, but got Unknown
			if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox) && Object.op_Implicit((Object)(object)hitInfo.hitHurtBox.healthComponent) && (int)hitInfo.hitHurtBox.healthComponent.body.teamComponent.teamIndex != 1)
			{
				EffectManager.SpawnEffect(isCharged ? AssetsArsonist.fireballScepterStrongOnHit : AssetsArsonist.fireballScepterOnHit, new EffectData
				{
					origin = hitInfo.point,
					rotation = Quaternion.LookRotation(hitInfo.surfaceNormal, Vector3.up),
					scale = 1f
				}, true);
			}
			return BulletAttack.defaultHitCallback.Invoke(bulletAttack, ref hitInfo);
		}

		private void FireBeam(bool isCharged, bool isOverheated)
		{
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			AkSoundEngine.StopPlayingID(chargeSound);
			PlayAttackAnimation();
			energyflatCost = Energy;
			if (energyflatCost < 0f)
			{
				energyflatCost = 1f;
			}
			energyCost = energySystem.costmultiplierOverheat * energyflatCost;
			if (energyCost < 0f)
			{
				energyCost = 1f;
			}
			if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority)
			{
				energySystem.AddHeat(energyCost);
				if (isCharged)
				{
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 1324654014u), (NetworkDestination)1);
				}
				else
				{
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 4235059291u), (NetworkDestination)1);
				}
			}
			else if (energySystem.currentOverheat >= energySystem.maxOverheat && ((EntityState)this).isAuthority)
			{
				NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 553582860u), (NetworkDestination)1);
			}
			((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue);
			if (isOverheated)
			{
				surgeFiredOverheated = true;
				FireBall();
			}
			if (isCharged)
			{
				surgeFiredOverheated = false;
				FireChargedBolt();
			}
			else
			{
				surgeFiredOverheated = false;
				FireBolt();
			}
		}

		public void FireChargedBolt()
		{
			//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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: 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_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00d5: 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_00e8: 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_00f4: 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_010a: 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_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_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0146: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Expected O, but got Unknown
			//IL_0150: 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_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_015e: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: 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_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Unknown result type (might be due to invalid IL or missing references)
			//IL_023b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Expected O, but got Unknown
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: 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_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0212: Expected O, but got Unknown
			Ray aimRay = ((BaseState)this).GetAimRay();
			float num = (isBlue ? altStrongDamageCoefficient : strongdamageCoefficient);
			Vector3 displacedOrigin = GetDisplacedOrigin(aimRay);
			if (((EntityState)this).isAuthority)
			{
				new BulletAttack
				{
					bulletCount = 1u,
					aimVector = ((Ray)(ref aimRay)).direction,
					origin = ((Ray)(ref aimRay)).origin,
					damage = ((BaseState)this).damageStat * num * chargedMultiplier,
					damageColorIndex = (DamageColorIndex)0,
					damageType = DamageTypeCombo.op_Implicit((DamageType)128),
					falloffModel = (FalloffModel)0,
					maxDistance = range,
					force = force,
					hitMask = CommonMasks.laser,
					minSpread = 0f,
					maxSpread = 0f,
					isCrit = ((BaseState)this).RollCrit(),
					owner = ((EntityState)this).gameObject,
					smartCollision = true,
					procChainMask = default(ProcChainMask),
					procCoefficient = 1f,
					radius = 1f,
					sniper = false,
					stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask,
					weapon = null,
					spreadPitchScale = 0f,
					spreadYawScale = 0f,
					hitCallback = new HitCallback(laserHitCallback),
					queryTriggerInteraction = (QueryTriggerInteraction)0,
					hitEffectPrefab = null,
					tracerEffectPrefab = null
				}.Fire();
				RaycastHit val = default(RaycastHit);
				Physics.Raycast(aimRay, ref val, float.PositiveInfinity, ~(1 << LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)), (QueryTriggerInteraction)1);
				float distance = ((RaycastHit)(ref val)).distance;
				if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val)).collider) && ((RaycastHit)(ref val)).distance > 10f)
				{
					EffectManager.SpawnEffect(AssetsArsonist.fireballScepterChargedTracer, new EffectData
					{
						origin = muzzlePos.position,
						rotation = Quaternion.LookRotation(((RaycastHit)(ref val)).point - muzzlePos.position, Vector3.up),
						scale = 1f
					}, true);
				}
				else
				{
					EffectManager.SpawnEffect(AssetsArsonist.fireballScepterTracer, new EffectData
					{
						origin = muzzlePos.position,
						rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction),
						scale = 1f
					}, true);
				}
			}
		}

		public void FireBolt()
		{
			//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_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: 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_00b7: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: 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_00ed: 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_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: 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_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Expected O, but got Unknown
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: 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_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_022c: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Expected O, but got Unknown
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: 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_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Expected O, but got Unknown
			Ray aimRay = ((BaseState)this).GetAimRay();
			float num = (isBlue ? altStrongDamageCoefficient : strongdamageCoefficient);
			Vector3 displacedOrigin = GetDisplacedOrigin(aimRay);
			if (((EntityState)this).isAuthority)
			{
				new BulletAttack
				{
					bulletCount = 1u,
					aimVector = ((Ray)(ref aimRay)).direction,
					origin = ((Ray)(ref aimRay)).origin,
					damage = ((BaseState)this).damageStat * num,
					damageColorIndex = (DamageColorIndex)0,
					damageType = DamageTypeCombo.op_Implicit((DamageType)128),
					falloffModel = (FalloffModel)0,
					maxDistance = range,
					force = force,
					hitMask = CommonMasks.laser,
					minSpread = 0f,
					maxSpread = 0f,
					isCrit = ((BaseState)this).RollCrit(),
					owner = ((EntityState)this).gameObject,
					smartCollision = true,
					procChainMask = default(ProcChainMask),
					procCoefficient = 1f,
					radius = 0.5f,
					sniper = false,
					stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask,
					weapon = null,
					spreadPitchScale = 0f,
					spreadYawScale = 0f,
					hitCallback = new HitCallback(laserHitCallback),
					queryTriggerInteraction = (QueryTriggerInteraction)0,
					hitEffectPrefab = null,
					tracerEffectPrefab = null
				}.Fire();
				RaycastHit val = default(RaycastHit);
				Physics.Raycast(aimRay, ref val, float.PositiveInfinity, ~(1 << LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask)), (QueryTriggerInteraction)1);
				float distance = ((RaycastHit)(ref val)).distance;
				if (Object.op_Implicit((Object)(object)((RaycastHit)(ref val)).collider) && ((RaycastHit)(ref val)).distance > 10f)
				{
					EffectManager.SpawnEffect(AssetsArsonist.fireballScepterTracer, new EffectData
					{
						origin = muzzlePos.position,
						rotation = Quaternion.LookRotation(((RaycastHit)(ref val)).point - muzzlePos.position, Vector3.up),
						scale = 1f
					}, true);
				}
				else
				{
					EffectManager.SpawnEffect(AssetsArsonist.fireballScepterTracer, new EffectData
					{
						origin = muzzlePos.position,
						rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction),
						scale = 1f
					}, true);
				}
			}
		}

		public Vector3 GetDisplacedOrigin(Ray aimRay)
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			float num = 2.5f;
			float num2 = 1.25f;
			Vector3 direction;
			Vector3 result;
			if (!CheckLookingDown())
			{
				Vector3 origin = ((Ray)(ref aimRay)).origin;
				direction = ((Ray)(ref aimRay)).direction;
				result = origin + num2 * ((Vector3)(ref direction)).normalized;
			}
			else
			{
				Vector3 origin2 = ((Ray)(ref aimRay)).origin;
				direction = ((Ray)(ref aimRay)).direction;
				result = origin2 + num * ((Vector3)(ref direction)).normalized;
			}
			return result;
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			animator.SetBool("attacking", false);
			((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty");
			if (Object.op_Implicit((Object)(object)chargeVfxInstance))
			{
				EntityState.Destroy((Object)(object)chargeVfxInstance);
			}
		}

		public override void FixedUpdate()
		{
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			if (((EntityState)this).isAuthority && ((BaseSkillState)this).IsKeyDownAuthority() && !finishUp && !isCharged)
			{
				chargeStopwatch += Time.fixedDeltaTime;
				if (chargeStopwatch >= baseTimeCharge / ((BaseState)this).attackSpeedStat)
				{
					isCharged = true;
					AkSoundEngine.PostEvent(1852205059u, ((EntityState)this).gameObject);
					AkSoundEngine.StopPlayingID(chargeSound);
				}
			}
			if (((EntityState)this).isAuthority && !((BaseSkillState)this).IsKeyDownAuthority() && !finishUp)
			{
				FireBeam(isCharged, energySystem.currentOverheat >= energySystem.maxOverheat);
				finishUp = true;
			}
			if (!finishUp || !((EntityState)this).isAuthority)
			{
				return;
			}
			skillStopwatch += Time.fixedDeltaTime;
			if (fireSurgeShot)
			{
				surgeTimer += Time.fixedDeltaTime;
			}
			if (surgeTimer > surgeWait && !surgeFired && ((EntityState)this).isAuthority && fireSurgeShot)
			{
				surgeFired = true;
				if (surgeFiredOverheated)
				{
					FireBall();
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 553582860u), (NetworkDestination)1);
				}
				else if (isCharged)
				{
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 1324654014u), (NetworkDestination)1);
					FireChargedBolt();
				}
				else
				{
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 4235059291u), (NetworkDestination)1);
					FireBolt();
				}
			}
			if (skillStopwatch >= duration)
			{
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		private bool CheckLookingDown()
		{
			//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)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Ray aimRay = ((BaseState)this).GetAimRay();
			if (Vector3.Dot(((Ray)(ref aimRay)).direction, Vector3.down) > 0.6f)
			{
				return true;
			}
			return 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)2;
		}
	}
	internal class Flamethrower : BaseSkillState
	{
		public int tickRate;

		public int baseTickRate = StaticValues.flamethrowerBaseTickRate;

		public float weakCoefficient = StaticValues.flamethrowerWeakDamageCoefficient;

		public float strongCoefficient = StaticValues.flamethrowerStrongDamageCoefficient;

		public float altWeakCoefficient = StaticValues.altFlamethrowerWeakDamageCoefficient;

		public float altStrongCoefficient = StaticValues.altFlamethrowerStrongDamageCoefficient;

		internal BulletAttack bulletAttack;

		public float flamethrowerRange = StaticValues.flamethrowerRange;

		public float procCoefficient = StaticValues.flamethrowerProcCoefficient;

		public float radius = StaticValues.flamethowerRadius;

		public static float spreadBloomValue = 10f;

		private string muzzleString = "GunMuzzle";

		private float baseDuration = 0.5f;

		private float duration;

		private float interval;

		private float stopwatch = 0f;

		private EnergySystem energySystem;

		private ArsonistPassive passive;

		private ArsonistController controller;

		private bool isBlue;

		private float energyFlatCost;

		public float Energy = StaticValues.flamethrowerEnergyCost;

		private float energyCost;

		private bool playEnd;

		private bool isSurged;

		public override void OnEnter()
		{
			//IL_0174: 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_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: 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_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Expected O, but got Unknown
			//IL_0297: Expected O, but got Unknown
			//IL_0390: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			playEnd = false;
			energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>();
			passive = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistPassive>();
			controller = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistController>();
			isBlue = passive.isBlueGauge();
			((EntityState)this).characterBody.isSprinting = false;
			isSurged = ((EntityState)this).characterBody.HasBuff(Buffs.masochismSurgeActiveBuff);
			energyFlatCost = Energy;
			if (energyFlatCost < 0f)
			{
				energyFlatCost = 1f;
			}
			energyCost = energySystem.costmultiplierOverheat * energyFlatCost;
			if (energyCost < 0f)
			{
				energyCost = 1f;
			}
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			if (duration < 0.1f)
			{
				duration = 0.1f;
			}
			tickRate = (int)((float)baseTickRate * ((BaseState)this).attackSpeedStat);
			if (isSurged)
			{
				tickRate = (int)((float)tickRate * StaticValues.masochismSurgeFlamethrowerTickRateMultiplier);
			}
			interval = duration / (float)tickRate;
			((EntityState)this).characterBody.SetAimTimer(duration * 2f);
			bulletAttack = new BulletAttack
			{
				bulletCount = 1u,
				damage = strongCoefficient * ((BaseState)this).damageStat,
				damageColorIndex = (DamageColorIndex)0,
				damageType = DamageTypeCombo.op_Implicit((DamageType)0),
				falloffModel = (FalloffModel)0,
				maxDistance = flamethrowerRange,
				force = 0f,
				hitMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask,
				hitEffectPrefab = Flamethrower.impactEffectPrefab,
				minSpread = 1f,
				maxSpread = 4f,
				isCrit = ((BaseState)this).RollCrit(),
				owner = ((EntityState)this).gameObject,
				muzzleName = muzzleString,
				smartCollision = true,
				procChainMask = default(ProcChainMask),
				procCoefficient = procCoefficient,
				radius = radius,
				sniper = false,
				stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask,
				weapon = null,
				spreadPitchScale = 0f,
				spreadYawScale = 0f,
				queryTriggerInteraction = (QueryTriggerInteraction)0,
				hitCallback = new HitCallback(flamethrowerFlameChanceHitCallback)
			};
			if (energySystem.ifOverheatMaxed)
			{
				controller.weakFlamethrower.Play();
			}
			else
			{
				controller.flamethrower.Play();
				if (Object.op_Implicit((Object)(object)controller.flamethrowerHeatHaze) && Config.enableNonAggressiveHeatHaze.Value != controller.flamethrowerHeatHaze.isPlaying)
				{
					if (Config.enableNonAggressiveHeatHaze.Value)
					{
						controller.flamethrowerHeatHaze.Play();
					}
					else
					{
						controller.flamethrowerHeatHaze.Stop();
					}
				}
			}
			if (Object.op_Implicit((Object)(object)controller) && !controller.playingFlamethrower)
			{
				controller.playingFlamethrower = true;
				if (((EntityState)this).isAuthority)
				{
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 934132236u), (NetworkDestination)1);
					controller.flamethrowerPlayingID = AkSoundEngine.PostEvent(587096102u, ((Component)((EntityState)this).characterBody).gameObject);
				}
			}
			if (Object.op_Implicit((Object)(object)energySystem) && ((EntityState)this).isAuthority)
			{
				energySystem.ifOverheatRegenAllowed = false;
				energySystem.regenPreventionDuration = 0.2f;
				energySystem.regenPreventionStopwatch = 0f;
			}
		}

		public override void OnExit()
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).OnExit();
			if (playEnd)
			{
				NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, 4168901551u), (NetworkDestination)1);
			}
			if (Object.op_Implicit((Object)(object)controller.flamethrower))
			{
				controller.flamethrower.Stop();
			}
			if (Object.op_Implicit((Object)(object)controller.weakFlamethrower))
			{
				controller.weakFlamethrower.Stop();
			}
		}

		public override void FixedUpdate()
		{
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: 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_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			if (stopwatch >= interval && ((EntityState)this).isAuthority)
			{
				float num = strongCoefficient;
				float maxDistance = flamethrowerRange;
				if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority)
				{
					num = (isBlue ? altStrongCoefficient : strongCoefficient);
				}
				else if (energySystem.currentOverheat >= energySystem.maxOverheat && ((EntityState)this).isAuthority)
				{
					num = (isBlue ? altWeakCoefficient : weakCoefficient);
					maxDistance = flamethrowerRange * 0.66f;
				}
				Ray aimRay = ((BaseState)this).GetAimRay();
				bulletAttack.aimVector = ((Ray)(ref aimRay)).direction;
				bulletAttack.origin = ((Ray)(ref aimRay)).origin;
				bulletAttack.damage = num * ((BaseState)this).damageStat;
				bulletAttack.maxDistance = maxDistance;
				bulletAttack.Fire();
				((EntityState)this).characterBody.AddSpreadBloom(spreadBloomValue);
				stopwatch = 0f;
			}
			if (((EntityState)this).fixedAge <= duration && ((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)energySystem))
			{
				energySystem.AddHeat(energyCost * Time.fixedDeltaTime);
				energySystem.ifOverheatRegenAllowed = false;
				energySystem.regenPreventionDuration = 0.1f;
				energySystem.regenPreventionStopwatch = 0f;
			}
			if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority)
			{
				if (((EntityState)this).inputBank.skill1.down)
				{
					((EntityState)this).outer.SetNextState((EntityState)(object)new Flamethrower());
					return;
				}
				playEnd = true;
				controller.flamethrower.Stop();
				controller.weakFlamethrower.Stop();
				((EntityState)this).outer.SetNextStateToMain();
			}
		}

		public bool flamethrowerFlameChanceHitCallback(BulletAttack bulletRef, ref BulletHit hitInfo)
		{
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Invalid comparison between Unknown and I4
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			BulletAttack.defaultHitCallback.Invoke(bulletRef, ref hitInfo);
			if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox))
			{
				float num = hitInfo.distance / StaticValues.flamethrowerRange;
				float num2 = -1f * Mathf.Pow(num, 0.8f) + 1.2f;
				num2 = Mathf.Clamp(num2, 0f, 1f);
				float num3 = Random.Range(1f, 100f);
				float num4 = ((EntityState)this).characterBody.master.luck;
				if (num4 < 1f)
				{
					num4 = 1f;
				}
				if (num3 * num4 * num2 >= StaticValues.flamethrowerFireChance && (int)hitInfo.hitHurtBox.healthComponent.body.teamComponent.teamIndex != 1)
				{
					if (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox.healthComponent.body.master))
					{
						NetMessageExtensions.Send((INetMessage)(object)new FlamethrowerDotNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody.master).netId, ((NetworkBehaviour)hitInfo.hitHurtBox.healthComponent.body.master).netId, 5f), (NetworkDestination)1);
					}
					return true;
				}
				return true;
			}
			return 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)2;
		}
	}
	internal class FlamethrowerScepter : BaseSkillState
	{
		public int tickRate;

		public int baseTickRate = StaticValues.flamethrowerBaseTickRate;

		public float weakCoefficient = StaticValues.flamethrowerScepterWeakDamageCoefficient;

		public float strongCoefficient = StaticValues.flamethrowerScepterStrongDamageCoefficient;

		public float altWeakCoefficient = StaticValues.altFlamethrowerScepterWeakDamageCoefficient;

		public float altStrongCoefficient = StaticValues.altFlamethrowerScepterStrongDamageCoefficient;

		internal BulletAttack bulletAttack;

		public float flamethrowerRange = StaticValues.flamethrowerRange;

		public float procCoefficient = StaticValues.flamethrowerProcCoefficient;

		public float radius = StaticValues.flamethowerRadius;

		public static float spreadBloomValue = 10f;

		private string muzzleString = "GunMuzzle";

		private float baseDuration = 0.5f;

		private float duration;

		private float interval;

		private float stopwatch = 0f;

		private EnergySystem energySystem;

		private ArsonistPassive passive;

		private ArsonistController controller;

		private bool isBlue;

		private float energyFlatCost;

		public float Energy = StaticValues.flamethrowerEnergyCost;

		private float energyCost;

		private bool playEnd;

		private bool isSurged;

		private float timeElapsed;

		private bool firedEnd;

		public override void OnEnter()
		{
			//IL_0174: 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_0180: Unknown result type (might be due to invalid IL or missing references)
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ad: 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_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_020e: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0221: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_0245: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Expected O, but got Unknown
			//IL_0297: Expected O, but got Unknown
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			((BaseState)this).OnEnter();
			playEnd = false;
			energySystem = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<EnergySystem>();
			passive = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistPassive>();
			controller = ((Component)((EntityState)this).characterBody).gameObject.GetComponent<ArsonistController>();
			isBlue = passive.isBlueGauge();
			((EntityState)this).characterBody.isSprinting = false;
			isSurged = ((EntityState)this).characterBody.HasBuff(Buffs.masochismSurgeActiveBuff);
			energyFlatCost = Energy;
			if (energyFlatCost < 0f)
			{
				energyFlatCost = 1f;
			}
			energyCost = energySystem.costmultiplierOverheat * energyFlatCost;
			if (energyCost < 0f)
			{
				energyCost = 1f;
			}
			duration = baseDuration / ((BaseState)this).attackSpeedStat;
			if (duration < 0.1f)
			{
				duration = 0.1f;
			}
			tickRate = (int)((float)baseTickRate * ((BaseState)this).attackSpeedStat);
			if (isSurged)
			{
				tickRate = (int)((float)tickRate * StaticValues.masochismSurgeFlamethrowerTickRateMultiplier);
			}
			interval = duration / (float)tickRate;
			((EntityState)this).characterBody.SetAimTimer(duration * 2f);
			bulletAttack = new BulletAttack
			{
				bulletCount = 1u,
				damage = strongCoefficient * ((BaseState)this).damageStat,
				damageColorIndex = (DamageColorIndex)0,
				damageType = DamageTypeCombo.op_Implicit((DamageType)0),
				falloffModel = (FalloffModel)0,
				maxDistance = flamethrowerRange,
				force = 0f,
				hitMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask,
				hitEffectPrefab = Flamethrower.impactEffectPrefab,
				minSpread = 1f,
				maxSpread = 4f,
				isCrit = ((BaseState)this).RollCrit(),
				owner = ((EntityState)this).gameObject,
				muzzleName = muzzleString,
				smartCollision = true,
				procChainMask = default(ProcChainMask),
				procCoefficient = procCoefficient,
				radius = radius,
				sniper = false,
				stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask,
				weapon = null,
				spreadPitchScale = 0f,
				spreadYawScale = 0f,
				queryTriggerInteraction = (QueryTriggerInteraction)0,
				hitCallback = new HitCallback(flamethrowerFlameChanceHitCallback)
			};
			if (energySystem.ifOverheatMaxed)
			{
				controller.weakFlamethrower.Play();
			}
			else
			{
				controller.ActivateScepterFlamethrowerBeam();
			}
			if (Object.op_Implicit((Object)(object)controller) && !controller.playingFlamethrower)
			{
				controller.playingFlamethrower = true;
				if (((EntityState)this).isAuthority)
				{
					NetMessageExtensions.Send((INetMessage)(object)new PlaySoundNetworkRequest(((NetworkBehaviour)((EntityState)this).characterBody).netId, "Arsonist_Flamethrower_Scepter_Start"), (NetworkDestination)1);
					controller.flamethrowerPlayingID = AkSoundEngine.PostEvent(3247972543u, ((Component)((EntityState)this).characterBody).gameObject);
				}
			}
			if (Object.op_Implicit((Object)(object)energySystem) && ((EntityState)this).isAuthority)
			{
				energySystem.ifOverheatRegenAllowed = false;
				energySystem.regenPreventionDuration = 0.2f;
				energySystem.regenPreventionStopwatch = 0f;
			}
		}

		public override void OnExit()
		{
			((EntityState)this).OnExit();
			controller.DeactivateScepterFlamethrower();
			if (Object.op_Implicit((Object)(object)controller.weakFlamethrower))
			{
				controller.weakFlamethrower.Stop();
			}
		}

		public override void FixedUpdate()
		{
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Expected O, but got Unknown
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_0457: Unknown result type (might be due to invalid IL or missing references)
			//IL_0462: Unknown result type (might be due to invalid IL or missing references)
			//IL_046d: Unknown result type (might be due to invalid IL or missing references)
			//IL_046f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0474: Unknown result type (might be due to invalid IL or missing references)
			//IL_0478: Unknown result type (might be due to invalid IL or missing references)
			//IL_047d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0482: Unknown result type (might be due to invalid IL or missing references)
			//IL_048d: Expected O, but got Unknown
			//IL_052f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0534: Unknown result type (might be due to invalid IL or missing references)
			//IL_054e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0561: Unknown result type (might be due to invalid IL or missing references)
			//IL_0566: Unknown result type (might be due to invalid IL or missing references)
			//IL_058a: Unknown result type (might be due to invalid IL or missing references)
			//IL_058f: Unknown result type (might be due to invalid IL or missing references)
			((EntityState)this).FixedUpdate();
			stopwatch += Time.fixedDeltaTime;
			timeElapsed += Time.fixedDeltaTime;
			if (stopwatch >= interval && ((EntityState)this).isAuthority)
			{
				float num = strongCoefficient;
				float maxDistance = flamethrowerRange;
				if (energySystem.currentOverheat < energySystem.maxOverheat && ((EntityState)this).isAuthority)
				{
					num = (isBlue ? altStrongCoefficient : strongCoefficient);
				}
				else if (energySystem.currentOverheat >= energySystem.maxOverheat && ((EntityState)this).isAuthority)
				{
					num = (isBlue ? altWeakCoefficient : weakCoefficient);
					maxDistance = flamethrowerRange * 0.66f;
				}
				Ray