Decompiled source of Demolisher v0.4.6

plugins/Demolisher.dll

Decompiled 2 days ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using BrynzaAPI;
using EmotesAPI;
using EntityStates;
using EntityStates.VoidRaidCrab;
using Grumpy;
using HG.BlendableTypes;
using HG.Reflection;
using HarmonyLib;
using IL.RoR2;
using IL.RoR2.UI;
using KinematicCharacterController;
using Microsoft.CodeAnalysis;
using Mono.Cecil;
using Mono.Cecil.Cil;
using MonoMod.Cil;
using On.RoR2;
using On.RoR2.UI;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.HudOverlay;
using RoR2.Navigation;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.UI;
using TMPro;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering.PostProcessing;
using UnityEngine.UI;

[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyInformationalVersion("1.0.0+ca54aedb4f91d8fcdb71e9014e15aea51b8279c9")]
[assembly: AssemblyProduct("Demolisher")]
[assembly: AssemblyTitle("Demolisher")]
[assembly: AssemblyCompany("Demolisher")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace Demolisher
{
	[RegisterAchievement("DemolisherSpeedrun", "DemolisherFlyUnlock", null, 3u, null)]
	public class DemolisherSpeedrunAchievement : BaseAchievement
	{
		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return Assets.DemolisherBodyIndex;
		}

		public override void OnBodyRequirementMet()
		{
			((BaseAchievement)this).OnBodyRequirementMet();
			Hooks.onGroundHitOnTime = (Action<Collider>)Delegate.Combine(Hooks.onGroundHitOnTime, new Action<Collider>(CheckGround));
		}

		public void CheckGround(Collider collider)
		{
			TeleporterInteraction val = (Object.op_Implicit((Object)(object)((Component)collider).transform.parent) ? ((Component)((Component)collider).transform.parent).GetComponent<TeleporterInteraction>() : null);
			if ((Object)(object)val != (Object)null)
			{
				((BaseAchievement)this).Grant();
			}
		}

		public override void OnBodyRequirementBroken()
		{
			Hooks.onGroundHitOnTime = (Action<Collider>)Delegate.Remove(Hooks.onGroundHitOnTime, new Action<Collider>(CheckGround));
			((BaseAchievement)this).OnBodyRequirementBroken();
		}
	}
	[RegisterAchievement("DemolisherWorldKill", "DemolisherHookLauncherUnlock", null, 3u, typeof(OutOfBoundsBossKillServer))]
	public class DemolisherWorldKillAchievement : BaseAchievement
	{
		public class OutOfBoundsBossKillServer : BaseServerAchievement
		{
			public override void OnInstall()
			{
				((BaseServerAchievement)this).OnInstall();
				GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeath;
			}

			public override void OnUninstall()
			{
				GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeath;
				((BaseServerAchievement)this).OnUninstall();
			}

			public void OnCharacterDeath(DamageReport damageReport)
			{
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0032: Unknown result type (might be due to invalid IL or missing references)
				if ((((Enum)damageReport.damageInfo.damageType.damageType).HasFlag((Enum)(object)(DamageType)int.MinValue) || ((Enum)damageReport.damageInfo.damageType.damageTypeExtended).HasFlag((Enum)(object)(DamageTypeExtended)int.MinValue)) && Object.op_Implicit((Object)(object)damageReport.victim))
				{
					CharacterBody body = damageReport.victim.body;
					if (Object.op_Implicit((Object)(object)body) && body.isBoss)
					{
						((BaseServerAchievement)this).Grant();
					}
				}
			}
		}

		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return Assets.DemolisherBodyIndex;
		}

		public override void OnBodyRequirementMet()
		{
			((BaseAchievement)this).OnBodyRequirementMet();
			((BaseAchievement)this).SetServerTracked(true);
		}

		public override void OnBodyRequirementBroken()
		{
			((BaseAchievement)this).SetServerTracked(false);
			((BaseAchievement)this).OnBodyRequirementBroken();
		}
	}
	[RegisterAchievement("DemolisherFlyingEnemyKill", "DemolisherSlicingUnlock", null, 3u, typeof(FlyingEnemyKillServer))]
	public class DemolisherFlyingEnemyKillAchievement : BaseAchievement
	{
		public class FlyingEnemyKillServer : BaseServerAchievement
		{
			public int count;

			public override void OnInstall()
			{
				((BaseServerAchievement)this).OnInstall();
				GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeath;
			}

			public override void OnUninstall()
			{
				GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeath;
				((BaseServerAchievement)this).OnUninstall();
			}

			public void OnCharacterDeath(DamageReport damageReport)
			{
				//IL_0007: 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_002b: Unknown result type (might be due to invalid IL or missing references)
				if ((!DamageAPI.HasModdedDamageType(damageReport.damageInfo, Assets.SharpnessDamageType) && !DamageAPI.HasModdedDamageType(damageReport.damageInfo, Assets.SoftnessDamageType) && !DamageAPI.HasModdedDamageType(damageReport.damageInfo, Assets.ChaosDamageType)) || !Object.op_Implicit((Object)(object)damageReport.victim))
				{
					return;
				}
				CharacterBody body = damageReport.victim.body;
				if (Object.op_Implicit((Object)(object)body) && body.isFlying)
				{
					count++;
					if (count >= DemolisherFlyingEnemyKillAchievement.count)
					{
						((BaseServerAchievement)this).Grant();
					}
				}
			}
		}

		public static int count = 500;

		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return Assets.DemolisherBodyIndex;
		}

		public override void OnBodyRequirementMet()
		{
			((BaseAchievement)this).OnBodyRequirementMet();
			((BaseAchievement)this).SetServerTracked(true);
		}

		public override void OnBodyRequirementBroken()
		{
			((BaseAchievement)this).SetServerTracked(false);
			((BaseAchievement)this).OnBodyRequirementBroken();
		}
	}
	[RegisterAchievement("DemolisherRangedFarKill", "DemolisherCollapseUnlock", null, 3u, typeof(RangedFarKillServer))]
	public class DemolisherRangedFarKillAchievement : BaseAchievement
	{
		public class RangedFarKillServer : BaseServerAchievement
		{
			public override void OnInstall()
			{
				((BaseServerAchievement)this).OnInstall();
				GlobalEventManager.onCharacterDeathGlobal += OnCharacterDeath;
			}

			public override void OnUninstall()
			{
				GlobalEventManager.onCharacterDeathGlobal -= OnCharacterDeath;
				((BaseServerAchievement)this).OnUninstall();
			}

			public void OnCharacterDeath(DamageReport damageReport)
			{
				//IL_007c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0082: Unknown result type (might be due to invalid IL or missing references)
				//IL_0087: Unknown result type (might be due to invalid IL or missing references)
				//IL_008c: Unknown result type (might be due to invalid IL or missing references)
				if (!Object.op_Implicit((Object)(object)damageReport.attackerBody) || !Object.op_Implicit((Object)(object)damageReport.damageInfo.inflictor) || !Object.op_Implicit((Object)(object)damageReport.victim))
				{
					return;
				}
				CharacterBody body = damageReport.victim.body;
				if (!Object.op_Implicit((Object)(object)body))
				{
					return;
				}
				ProjectileRemoteDetonation component = damageReport.damageInfo.inflictor.GetComponent<ProjectileRemoteDetonation>();
				if (Object.op_Implicit((Object)(object)component))
				{
					Vector3 val = damageReport.attackerBody.footPosition - body.footPosition;
					if (!(((Vector3)(ref val)).sqrMagnitude < requiredDistance * requiredDistance))
					{
						((BaseServerAchievement)this).Grant();
					}
				}
			}
		}

		public static float requiredDistance = 128f;

		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return Assets.DemolisherBodyIndex;
		}

		public override void OnBodyRequirementMet()
		{
			((BaseAchievement)this).OnBodyRequirementMet();
			((BaseAchievement)this).SetServerTracked(true);
		}

		public override void OnBodyRequirementBroken()
		{
			((BaseAchievement)this).SetServerTracked(false);
			((BaseAchievement)this).OnBodyRequirementBroken();
		}
	}
	[RegisterAchievement("DemolisherChargeDistance", "DemolisherChaindashUnlock", null, 3u, null)]
	public class DemolisherChargeDistanceAchievement : BaseAchievement
	{
		public static float requiredDistance = 64f;

		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return Assets.DemolisherBodyIndex;
		}

		public override void OnBodyRequirementMet()
		{
			((BaseAchievement)this).OnBodyRequirementMet();
			ShieldCharge.onChargeEndGiveSqrTraveledDistance = (Action<float>)Delegate.Combine(ShieldCharge.onChargeEndGiveSqrTraveledDistance, new Action<float>(CheckDistance));
		}

		private void CheckDistance(float obj)
		{
			if (obj >= requiredDistance * requiredDistance)
			{
				((BaseAchievement)this).Grant();
			}
		}

		public override void OnBodyRequirementBroken()
		{
			ShieldCharge.onChargeEndGiveSqrTraveledDistance = (Action<float>)Delegate.Remove(ShieldCharge.onChargeEndGiveSqrTraveledDistance, new Action<float>(CheckDistance));
			((BaseAchievement)this).OnBodyRequirementBroken();
		}
	}
	[RegisterAchievement("DemolisherMastery", "DemolisherMasteryUnlock", null, 3u, null)]
	public class DemolisherMasteryAchievement : BasePerSurvivorClearGameMonsoonAchievement
	{
		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return Assets.DemolisherBodyIndex;
		}
	}
	[RegisterAchievement("DemolisherFuelArrayCellWin", "DemolisherFuelArrayCellWinUnlock", null, 3u, null)]
	public class DemolisherFuelArrayCellWinAchievement : BaseAchievement
	{
		public override BodyIndex LookUpRequiredBodyIndex()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return Assets.DemolisherBodyIndex;
		}

		public override void OnBodyRequirementMet()
		{
			((BaseAchievement)this).OnBodyRequirementMet();
			Run.onClientGameOverGlobal += OnClientGameOverGlobal;
		}

		public override void OnBodyRequirementBroken()
		{
			Run.onClientGameOverGlobal -= OnClientGameOverGlobal;
			((BaseAchievement)this).OnBodyRequirementBroken();
		}

		private void OnClientGameOverGlobal(Run run, RunReport runReport)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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)
			if (!Object.op_Implicit((Object)(object)runReport.gameEnding) || !runReport.gameEnding.isWin)
			{
				return;
			}
			DifficultyDef difficultyDef = DifficultyCatalog.GetDifficultyDef(runReport.ruleBook.FindDifficulty());
			if (!(runReport.gameEnding.cachedName == "MainEnding") || difficultyDef == null || !difficultyDef.countsAsHardMode)
			{
				return;
			}
			PlayerInfo[] playerInfos = runReport.playerInfos;
			foreach (PlayerInfo val in playerInfos)
			{
				CharacterMaster master = val.master;
				if (!Object.op_Implicit((Object)(object)master) || !((NetworkBehaviour)master).hasAuthority)
				{
					continue;
				}
				Inventory inventory = master.inventory;
				if (!Object.op_Implicit((Object)(object)inventory))
				{
					continue;
				}
				EquipmentState[][] equipmentStateSlots = inventory._equipmentStateSlots;
				foreach (EquipmentState[] array in equipmentStateSlots)
				{
					EquipmentState[] array2 = array;
					foreach (EquipmentState val2 in array2)
					{
						if (val2.equipmentIndex == Equipment.QuestVolatileBattery.equipmentIndex)
						{
							((BaseAchievement)this).Grant();
						}
					}
				}
			}
		}
	}
	public static class Assets
	{
		[CompilerGenerated]
		private static class <>O
		{
			public static Action<GameObject> <0>__ModifyRocketJump;

			public static Action<SkillDef> <1>__AutoSetBonusStockFromBody;

			public static OnRocketJumpApplied <2>__AddFeetSmoke;

			public static OnMasterSummon <3>__SetBodyStateToMain;
		}

		[Serializable]
		[CompilerGenerated]
		private sealed class <>c
		{
			public static readonly <>c <>9 = new <>c();

			public static CollectContentPackProvidersDelegate <>9__102_0;

			internal void <Init>b__102_0(AddContentPackProviderDelegate addContentPackProvider)
			{
				addContentPackProvider.Invoke((IContentPackProvider)(object)new Content());
			}
		}

		public static AssetBundle assetBundle;

		public static GameObject DemolisherBody;

		public static CharacterBody DemolisherCharacterBody;

		public static GameObject DemolisherMaster;

		public static GameObject DemolisherEmote;

		public static GameObject DemolisherElevator;

		public static SurvivorDef Demolisher;

		public static GameObject Slash;

		public static GameObject FeetEffect;

		public static GameObject DevilFeetEffect;

		public static GameObject TimestopEffect;

		public static GameObject CracksTrailEffect;

		public static GameObject PillarEffect;

		public static GameObject PillarExplosionEffect;

		public static GameObject LaserEffect;

		public static GameObject IamRedAsFuck;

		public static GameObject Crosshair;

		public static GameObject Aura;

		public static Sprite CrosshairRangedSprite;

		public static Sprite CrosshairMeleeSprite;

		public static EffectDef DemolisherTracer;

		public static EffectDef CollapseExplosion;

		public static EffectDef ChainsExplosion;

		public static EffectDef ParryEffect;

		public static EffectDef Explosion;

		public static EffectDef DoubleDonk;

		public static EffectDef Rings;

		public static EffectDef Trail;

		public static EffectDef WhirlwindEffect;

		public static GameObject LemurianFireBallGhost;

		public static GameObject GrenadeProjectile;

		public static GameObject StickyProjectile;

		public static GameObject HookProjectile;

		public static GameObject SwordPillarProjectile;

		public static GameObject DemolisherProjectile;

		public static GameObject BombProjectile;

		public static SteppedSkillDef MediumMelee;

		public static SkillDef ShieldBash;

		public static SkillDef ChainDash;

		public static UnlockableDef ChainDashUnlock;

		public static DemolisherWeaponSkillDef Sharpness;

		public static DemolisherBulletAttackWeaponDef SharpnessWeapon;

		public static DemolisherWeaponSkillDef Softness;

		public static DemolisherBulletAttackWeaponDef SoftnessWeapon;

		public static DemolisherWeaponSkillDef Chaos;

		public static DemolisherBulletAttackWeaponDef ChaosWeapon;

		public static PassiveItemSkillDef Boots;

		public static DemolisherWeaponSkillDef GrenadeLauncher;

		public static DemolisherProjectileWeaponDef GrenadeWeapon;

		public static DemolisherWeaponSkillDef BombLauncher;

		public static DemolisherProjectileWeaponDef BombWeapon;

		public static DemolisherWeaponSkillDef HookLauncher;

		public static UnlockableDef HookLauncherUnlock;

		public static DemolisherProjectileWeaponDef HookWeapon;

		public static DemolisherWeaponSkillDef StickyLauncher;

		public static DemolisherProjectileWeaponDef StickyWeapon;

		public static DemolisherWeaponSkillDef DemolisherLauncher;

		public static DemolisherProjectileWeaponDef DemolisherWeapon;

		public static SkillDef SwordPillar;

		public static SkillDef Parry;

		public static SkillDef Detonate;

		public static SkillDef Whirlwind;

		public static SkillDef Slicing;

		public static UnlockableDef SlicingUnlock;

		public static SkillDef Collapse;

		public static UnlockableDef CollapseUnlock;

		public static SkillDef Fly;

		public static UnlockableDef FlyUnlock;

		public static SkillDef Laser;

		public static SkillFamily Passive;

		public static SkillFamily MeleeWeapon;

		public static SkillFamily MeleePrimary;

		public static SkillFamily MeleeSecondary;

		public static SkillFamily MeleeUtility;

		public static SkillFamily MeleeSpecial;

		public static SkillFamily RangedPrimary;

		public static SkillFamily RangedSecondary;

		public static SkillFamily RangedUtility;

		public static SkillFamily RangedSpecial;

		public static UnlockableDef MasteryUnlock;

		public static UnlockableDef GrandMasteryUnlock;

		public static SkinDef Default;

		public static SkinDef Nuclear;

		public static BuffDef SharpnessCooldown;

		public static BuffDef SharpnessCritAddition;

		public static BuffDef ChaosCooldown;

		public static BuffDef BombHit;

		public static BuffDef InstantMeleeSwing;

		public static BuffDef IgnoreBoots;

		public static BuffDef DemolisherAirControlFromVelocityAddBuff;

		public static ItemDef BootsPassive;

		public static ModdedDamageType SharpnessDamageType = DamageAPI.ReserveDamageType();

		public static ModdedDamageType SoftnessDamageType = DamageAPI.ReserveDamageType();

		public static ModdedDamageType ChaosDamageType = DamageAPI.ReserveDamageType();

		public static ModdedDamageType BombDamageType = DamageAPI.ReserveDamageType();

		public static RocketJumpDelegateDef AddFeetEffect;

		public static OnMasterSummonDelegateDef SetBodyStateToMainOnSpawn;

		public static SkinSkillVariantsDef skinSkillVariantsDef;

		public static SkinSkillVariantsDef skinNuclearSkillVariantsDef;

		public static PostProcessProfile TimestopPP;

		public static NetworkSoundEventDef ShieldBashSound;

		public static BodyIndex DemolisherBodyIndex;

		public static void Init()
		{
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0739: Unknown result type (might be due to invalid IL or missing references)
			//IL_073e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e03: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e09: Expected I4, but got Unknown
			//IL_0e2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e32: Expected I4, but got Unknown
			//IL_0e55: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e5b: Expected I4, but got Unknown
			//IL_0e8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e95: Expected I4, but got Unknown
			//IL_0ee5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eea: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ef0: Expected O, but got Unknown
			//IL_0f1e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f23: Unknown result type (might be due to invalid IL or missing references)
			//IL_0f29: Expected O, but got Unknown
			//IL_10d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_10d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_10dd: Expected O, but got Unknown
			//IL_04c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cd: Unknown result type (might be due to invalid IL or missing references)
			assetBundle = AssetBundle.LoadFromFileAsync(Path.Combine(Path.GetDirectoryName(DemolisherPlugin.PInfo.Location), "assetbundles", "demolisherassets")).assetBundle;
			SoundBanks.Add(Path.Combine(Path.GetDirectoryName(DemolisherPlugin.PInfo.Location), "soundbanks", "Demoman.bnk"));
			Material[] array = assetBundle.LoadAllAssets<Material>();
			foreach (Material val in array)
			{
				if (((Object)val).name == "matTrapOntop")
				{
					Shader shader = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC2/Chef/matChef_AlwaysOnTop.mat").WaitForCompletion().shader;
					val.shader = shader;
					val.renderQueue = 4000;
				}
				else
				{
					if (!((Object)val.shader).name.StartsWith("StubbedRoR2"))
					{
						continue;
					}
					string text = ((Object)val.shader).name.Replace("StubbedRoR2", "RoR2") + ".shader";
					Shader val2 = Addressables.LoadAssetAsync<Shader>((object)text).WaitForCompletion();
					if (Object.op_Implicit((Object)(object)val2))
					{
						val.shader = val2;
						if (((Object)val).name == "DemoProjectile")
						{
							val.renderQueue = 4001;
						}
					}
				}
			}
			VoicelineDef[] array2 = assetBundle.LoadAllAssets<VoicelineDef>();
			foreach (VoicelineDef voicelineDef in array2)
			{
				voicelineDef.Register();
			}
			DemolisherBody = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Character/DemolisherBody.prefab").RegisterCharacterBody();
			DemolisherMaster = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Character/DemolisherMonsterMaster.prefab").RegisterCharacterMaster();
			DemolisherElevator = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Elevator/DemolisherElevator.prefab").RegisterNetworkPrefab();
			InstantiatePrefabBehavior component = DemolisherElevator.GetComponent<InstantiatePrefabBehavior>();
			component.prefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/QuestVolatileBattery/QuestVolatileBatteryWorldPickup.prefab").WaitForCompletion();
			DemolisherEmote = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Character/DemolisherEmotes.prefab");
			if (DemolisherPlugin.emotesEnabled)
			{
				ModCompatabilities.EmoteCompatability.Init();
			}
			GenericSkill[] components = DemolisherBody.GetComponents<GenericSkill>();
			GenericSkill[] array3 = components;
			foreach (GenericSkill val3 in array3)
			{
				if (val3.skillName.Contains("Melee"))
				{
					Extensions.SetSection(val3, "Melee");
				}
				if (val3.skillName.Contains("Ranged"))
				{
					Extensions.SetSection(val3, "Ranged");
				}
				if (val3.skillName.Contains("Weapon"))
				{
					val3.loadoutTitleToken = "DEMOLISHER_SKILL_WEAPON";
				}
				if (val3.skillName.Contains("Primary"))
				{
					val3.loadoutTitleToken = "LOADOUT_SKILL_PRIMARY";
				}
				if (val3.skillName.Contains("Secondary"))
				{
					val3.loadoutTitleToken = "LOADOUT_SKILL_SECONDARY";
				}
				if (val3.skillName.Contains("Utility"))
				{
					val3.loadoutTitleToken = "LOADOUT_SKILL_UTILITY";
				}
				if (val3.skillName.Contains("Special"))
				{
					val3.loadoutTitleToken = "LOADOUT_SKILL_SPECIAL";
				}
			}
			DemolisherCharacterBody = DemolisherBody.GetComponent<CharacterBody>();
			CharacterBodyAPI.AddModdedBodyFlag(DemolisherCharacterBody, Assets.SprintAllTime);
			DemolisherCharacterBody.preferredPodPrefab = DemolisherElevator;
			DemolisherCharacterBody._defaultCrosshairPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/SimpleDotCrosshair");
			CharacterMotor component2 = ((Component)DemolisherCharacterBody).GetComponent<CharacterMotor>();
			GameObject gameObject = ((Component)DemolisherBody.GetComponent<ModelLocator>().modelTransform).gameObject;
			gameObject.GetComponent<FootstepHandler>().footstepDustPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/GenericFootstepDust");
			ModelSkinController component3 = gameObject.GetComponent<ModelSkinController>();
			if (Object.op_Implicit((Object)(object)component3))
			{
				SkinDef[] skins = component3.skins;
				foreach (SkinDef val4 in skins)
				{
					SkinDefParams skinDefParams = val4.skinDefParams;
					for (int m = 0; m < skinDefParams.rendererInfos.Length; m++)
					{
						ref RendererInfo reference = ref skinDefParams.rendererInfos[m];
						if (((Object)reference.renderer).name.Contains("Devil"))
						{
							Extensions.SetDontFadeWhenNearCamera(ref reference, true);
						}
						if (Object.op_Implicit((Object)(object)reference.defaultMaterial) && ((Object)reference.defaultMaterial).name.Contains("Addressable"))
						{
							string text2 = ((Object)reference.defaultMaterial).name.Replace("Addressable", "") + ".mat";
							while (text2.Contains("%"))
							{
								text2 = text2.Replace("%", "/");
							}
							Material defaultMaterial = Addressables.LoadAssetAsync<Material>((object)text2).WaitForCompletion();
							reference.defaultMaterial = defaultMaterial;
						}
					}
				}
			}
			Demolisher = assetBundle.LoadAsset<SurvivorDef>("Assets/Demolisher/Character/Demolisher.asset").RegisterSurvivorDef<SurvivorDef>((Action<SurvivorDef>)null);
			Explosion = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherExplosion.prefab").RegisterEffect();
			DoubleDonk = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherDoubleDonk.prefab").RegisterEffect();
			CollapseExplosion = assetBundle.LoadAsset<GameObject>("Assets/Demoman/DemoNukeExplosion.prefab").RegisterEffect();
			ChainsExplosion = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherChainsExplosion.prefab").RegisterEffect();
			ParryEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherParry.prefab").RegisterEffect();
			Rings = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherRings.prefab").RegisterEffect();
			Trail = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherTrailEffect.prefab").RegisterEffect();
			DemolisherTracer = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherTracer.prefab").RegisterEffect();
			WhirlwindEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherWhirlwind.prefab").RegisterEffect();
			DemolisherAirControlFromVelocityAddBuff = assetBundle.LoadAsset<BuffDef>("Assets/Demolisher/Buffs/DemolisherAirControlFromVelocityAddBuff.asset").RegisterBuffDef<BuffDef>((Action<BuffDef>)null);
			GrenadeProjectile = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Projectiles/DemolisherGrenadeProjectile.prefab").RegisterProjectile(ModifyRocketJump);
			StickyProjectile = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Projectiles/DemolisherStickyProjectile.prefab").RegisterProjectile(ModifyRocketJump);
			HookProjectile = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Projectiles/DemolisherHookProjectile.prefab").RegisterProjectile();
			SwordPillarProjectile = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Projectiles/DemolisherSwordPillar.prefab").RegisterProjectile();
			DemolisherProjectile = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Projectiles/DemolisherDemolisherProjectile.prefab").RegisterProjectile(ModifyRocketJump);
			BombProjectile = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Projectiles/DemolisherBombProjectile.prefab").RegisterProjectile(ModifyRocketJump);
			LemurianFireBallGhost = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lemurian/FireballGhost.prefab").WaitForCompletion();
			MediumMelee = assetBundle.LoadAsset<SteppedSkillDef>("Assets/Demolisher/SkillDefs/MeleePrimary/DemolisherMediumMelee.asset").RegisterSkillDef<SteppedSkillDef>((Action<SteppedSkillDef>)null);
			ShieldBash = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/MeleeUtility/DemolisherShieldBash.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
			ChainDash = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/MeleeUtility/DemolisherChainDash.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
			Sharpness = assetBundle.LoadAsset<DemolisherWeaponSkillDef>("Assets/Demolisher/SkillDefs/MeleeWeapon/DemolisherSharpness.asset").RegisterSkillDef();
			Softness = assetBundle.LoadAsset<DemolisherWeaponSkillDef>("Assets/Demolisher/SkillDefs/MeleeWeapon/DemolisherSoftness.asset").RegisterSkillDef();
			Chaos = assetBundle.LoadAsset<DemolisherWeaponSkillDef>("Assets/Demolisher/SkillDefs/MeleeWeapon/DemolisherChaos.asset").RegisterSkillDef();
			Boots = assetBundle.LoadAsset<PassiveItemSkillDef>("Assets/Demolisher/SkillDefs/Passive/DemolisherHellSupport.asset").RegisterSkillDef<PassiveItemSkillDef>((Action<PassiveItemSkillDef>)null);
			GrenadeLauncher = assetBundle.LoadAsset<DemolisherWeaponSkillDef>("Assets/Demolisher/SkillDefs/RangedSecondary/DemolisherGrenadeLauncher.asset").RegisterSkillDef();
			GrenadeLauncher.ModifySkill("Play_grenade_launcher_worldreload", ((SkillDef)GrenadeLauncher).rechargeStock);
			BombLauncher = assetBundle.LoadAsset<DemolisherWeaponSkillDef>("Assets/Demolisher/SkillDefs/RangedSecondary/DemolisherBombLauncher.asset").RegisterSkillDef();
			BombLauncher.ModifySkill("Play_grenade_launcher_worldreload", ((SkillDef)BombLauncher).rechargeStock);
			HookLauncher = assetBundle.LoadAsset<DemolisherWeaponSkillDef>("Assets/Demolisher/SkillDefs/RangedSecondary/DemolisherHookLauncher.asset").RegisterSkillDef();
			HookLauncher.ModifySkill("Play_grenade_launcher_worldreload", ((SkillDef)HookLauncher).rechargeStock);
			SwordPillar = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/MeleeSecondary/DemolisherSwordPillar.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
			Parry = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/MeleeSecondary/DemolisherParry.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
			StickyLauncher = assetBundle.LoadAsset<DemolisherWeaponSkillDef>("Assets/Demolisher/SkillDefs/RangedPrimary/DemolisherStickyLauncher.asset").RegisterSkillDef();
			StickyLauncher.ModifySkill("Play_stickybomblauncher_worldreload", ((SkillDef)StickyLauncher).rechargeStock);
			DemolisherLauncher = assetBundle.LoadAsset<DemolisherWeaponSkillDef>("Assets/Demolisher/SkillDefs/RangedSecondary/DemolisherDemolisherLauncher.asset").RegisterSkillDef();
			DemolisherLauncher.ModifySkill("Play_stickybomblauncher_worldreload", ((SkillDef)DemolisherLauncher).rechargeStock);
			Detonate = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/RangedUtility/DemolisherDetonate.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
			Whirlwind = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/MeleeSpecial/DemolisherWhirlwind.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)AutoSetBonusStockFromBody);
			Slicing = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/MeleeSpecial/DemolisherSlicing.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
			Collapse = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/RangedSpecial/DemolisherCollapse.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
			Fly = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/MeleeSpecial/DemolisherFly.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)null);
			Laser = assetBundle.LoadAsset<SkillDef>("Assets/Demolisher/SkillDefs/RangedSpecial/DemolisherLaser.asset").RegisterSkillDef<SkillDef>((Action<SkillDef>)AutoSetBonusStockFromBody);
			Passive = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherPassive.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			MeleeWeapon = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherMeleeWeapon.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			MeleePrimary = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherMeleePrimary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			MeleeUtility = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherMeleeUtility.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			RangedPrimary = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherRangedPrimary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			RangedUtility = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherRangedUtility.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			RangedSecondary = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherRangedSecondary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			MeleeSecondary = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherMeleeSecondary.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			RangedSpecial = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherRangedSpecial.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			MeleeSpecial = assetBundle.LoadAsset<SkillFamily>("Assets/Demolisher/SkillFamilies/DemolisherMeleeSpecial.asset").RegisterSkillFamily<SkillFamily>((Action<SkillFamily>)null);
			SharpnessCritAddition = assetBundle.LoadAsset<BuffDef>("Assets/Demolisher/Buffs/SharpnessCritAddition.asset").RegisterBuffDef<BuffDef>((Action<BuffDef>)null);
			SharpnessCooldown = assetBundle.LoadAsset<BuffDef>("Assets/Demolisher/Buffs/SharpnessCooldown.asset").RegisterBuffDef<BuffDef>((Action<BuffDef>)null);
			ChaosCooldown = assetBundle.LoadAsset<BuffDef>("Assets/Demolisher/Buffs/ChaosCooldown.asset").RegisterBuffDef<BuffDef>((Action<BuffDef>)null);
			BombHit = assetBundle.LoadAsset<BuffDef>("Assets/Demolisher/Buffs/BombHit.asset").RegisterBuffDef<BuffDef>((Action<BuffDef>)null);
			InstantMeleeSwing = assetBundle.LoadAsset<BuffDef>("Assets/Demolisher/Buffs/InstantMeleeSwing.asset").RegisterBuffDef<BuffDef>((Action<BuffDef>)null);
			IgnoreBoots = assetBundle.LoadAsset<BuffDef>("Assets/Demolisher/Buffs/IgnoreBoots.asset").RegisterBuffDef<BuffDef>((Action<BuffDef>)null);
			BootsPassive = assetBundle.LoadAsset<ItemDef>("Assets/Demolisher/Items/BootsPassive.asset").RegisterItemDef<ItemDef>((Action<ItemDef>)null);
			ChainDashUnlock = assetBundle.LoadAsset<UnlockableDef>("Assets/Demolisher/Unlocks/DemolisherChaindashUnlock.asset").RegisterUnlockableDef<UnlockableDef>((Action<UnlockableDef>)null);
			CollapseUnlock = assetBundle.LoadAsset<UnlockableDef>("Assets/Demolisher/Unlocks/DemolisherCollapseUnlock.asset").RegisterUnlockableDef<UnlockableDef>((Action<UnlockableDef>)null);
			FlyUnlock = assetBundle.LoadAsset<UnlockableDef>("Assets/Demolisher/Unlocks/DemolisherFlyUnlock.asset").RegisterUnlockableDef<UnlockableDef>((Action<UnlockableDef>)null);
			HookLauncherUnlock = assetBundle.LoadAsset<UnlockableDef>("Assets/Demolisher/Unlocks/DemolisherHookLauncherUnlock.asset").RegisterUnlockableDef<UnlockableDef>((Action<UnlockableDef>)null);
			SlicingUnlock = assetBundle.LoadAsset<UnlockableDef>("Assets/Demolisher/Unlocks/DemolisherSlicingUnlock.asset").RegisterUnlockableDef<UnlockableDef>((Action<UnlockableDef>)null);
			MasteryUnlock = assetBundle.LoadAsset<UnlockableDef>("Assets/Demolisher/Unlocks/DemolisherMasteryUnlock.asset").RegisterUnlockableDef<UnlockableDef>((Action<UnlockableDef>)null);
			GrandMasteryUnlock = assetBundle.LoadAsset<UnlockableDef>("Assets/Demolisher/Unlocks/DemolisherFuelArrayCellWinUnlock.asset").RegisterUnlockableDef<UnlockableDef>((Action<UnlockableDef>)null);
			Default = assetBundle.LoadAsset<SkinDef>("Assets/Demolisher/Character/DemolisherDefault.asset");
			Nuclear = assetBundle.LoadAsset<SkinDef>("Assets/Demolisher/Character/DemolisherNuclear.asset");
			TimestopEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherTimestopEffect.prefab");
			skinSkillVariantsDef = assetBundle.LoadAsset<SkinSkillVariantsDef>("Assets/Demolisher/Character/DemolisherDefaultSkillVariants.asset");
			skinSkillVariantsDef.Register();
			skinNuclearSkillVariantsDef = assetBundle.LoadAsset<SkinSkillVariantsDef>("Assets/Demolisher/Character/DemolisherNuclearSkillVariants.asset");
			skinNuclearSkillVariantsDef.Register();
			Slash = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherSlash.prefab");
			FeetEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherFeetSmoke.prefab");
			CracksTrailEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherCracks.prefab");
			PillarEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherPillar.prefab");
			PillarExplosionEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherPillarExplosion.prefab");
			LaserEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherLaser.prefab");
			IamRedAsFuck = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/IAmRedAsFuck.prefab");
			Crosshair = assetBundle.LoadAsset<GameObject>("Assets/Demoman/DemoExtraCrosshairReworkSimplified.prefab");
			Aura = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherAura.prefab");
			CrosshairMeleeSprite = assetBundle.LoadAsset<Sprite>("Assets/Demoman/UI/DemoSwordIndicatorThinHalf2.png");
			CrosshairRangedSprite = assetBundle.LoadAsset<Sprite>("Assets/Demoman/UI/DemoStickyIndicatorThinHalf2.png");
			CharacterBodyAPI.SetCustomSprintIcon(DemolisherCharacterBody, Parry.icon);
			SharpnessWeapon = Sharpness.RegisterWeapon<DemolisherWeaponSkillDef, DemolisherBulletAttackWeaponDef>(null, null);
			SharpnessWeapon.moddedDamageTypes = (ModdedDamageType[])(object)new ModdedDamageType[1] { (ModdedDamageType)(int)SharpnessDamageType };
			SoftnessWeapon = Softness.RegisterWeapon<DemolisherWeaponSkillDef, DemolisherBulletAttackWeaponDef>(null, null);
			SoftnessWeapon.moddedDamageTypes = (ModdedDamageType[])(object)new ModdedDamageType[1] { (ModdedDamageType)(int)SoftnessDamageType };
			ChaosWeapon = Chaos.RegisterWeapon<DemolisherWeaponSkillDef, DemolisherBulletAttackWeaponDef>(null, null);
			ChaosWeapon.moddedDamageTypes = (ModdedDamageType[])(object)new ModdedDamageType[1] { (ModdedDamageType)(int)ChaosDamageType };
			GrenadeWeapon = GrenadeLauncher.RegisterWeapon<DemolisherWeaponSkillDef, DemolisherProjectileWeaponDef>(null, null);
			BombWeapon = BombLauncher.RegisterWeapon<DemolisherWeaponSkillDef, DemolisherProjectileWeaponDef>(null, null);
			BombWeapon.moddedDamageTypes = (ModdedDamageType[])(object)new ModdedDamageType[1] { (ModdedDamageType)(int)BombDamageType };
			HookWeapon = HookLauncher.RegisterWeapon<DemolisherWeaponSkillDef, DemolisherProjectileWeaponDef>(null, null);
			StickyWeapon = StickyLauncher.RegisterWeapon<DemolisherWeaponSkillDef, DemolisherProjectileWeaponDef>(null, null);
			AddFeetEffect = assetBundle.LoadAsset<RocketJumpDelegateDef>("Assets/Demolisher/DelegateDefs/AddFeetEffect.asset");
			RocketJumpDelegateDef addFeetEffect = AddFeetEffect;
			object obj = <>O.<2>__AddFeetSmoke;
			if (obj == null)
			{
				OnRocketJumpApplied val5 = DemolisherFeetEffect.AddFeetSmoke;
				<>O.<2>__AddFeetSmoke = val5;
				obj = (object)val5;
			}
			((DelegateDef<OnRocketJumpApplied>)(object)addFeetEffect).@delegate = (OnRocketJumpApplied)obj;
			SetBodyStateToMainOnSpawn = assetBundle.LoadAsset<OnMasterSummonDelegateDef>("Assets/Demolisher/DelegateDefs/SetBodyStateToMainOnSpawn.asset");
			OnMasterSummonDelegateDef setBodyStateToMainOnSpawn = SetBodyStateToMainOnSpawn;
			object obj2 = <>O.<3>__SetBodyStateToMain;
			if (obj2 == null)
			{
				OnMasterSummon val6 = SetBodyStateToMain;
				<>O.<3>__SetBodyStateToMain = val6;
				obj2 = (object)val6;
			}
			((DelegateDef<OnMasterSummon>)(object)setBodyStateToMainOnSpawn).@delegate = (OnMasterSummon)obj2;
			typeof(DemolisherMainState).RegisterEntityState();
			typeof(FireGrenade).RegisterEntityState();
			typeof(FireGrenadeHold).RegisterEntityState();
			typeof(FireGrenadeAndHold).RegisterEntityState();
			typeof(MediumMeleeAttack).RegisterEntityState();
			typeof(MediumMeleeAttackWindUp).RegisterEntityState();
			typeof(MediumMeleeAttackWindDown).RegisterEntityState();
			typeof(ShieldCharge).RegisterEntityState();
			typeof(Detonate).RegisterEntityState();
			typeof(WhirlwindMelee).RegisterEntityState();
			typeof(Parry).RegisterEntityState();
			typeof(ChargeCollapse).RegisterEntityState();
			typeof(FireCollapse).RegisterEntityState();
			typeof(FireTallSword).RegisterEntityState();
			typeof(PrepareGroundSword).RegisterEntityState();
			typeof(GroundSlash).RegisterEntityState();
			typeof(Slicing).RegisterEntityState();
			typeof(Slam).RegisterEntityState();
			typeof(SlamFire).RegisterEntityState();
			typeof(ChainDash).RegisterEntityState();
			typeof(Fly).RegisterEntityState();
			typeof(Laser).RegisterEntityState();
			typeof(Ascend).RegisterEntityState();
			typeof(Arrived).RegisterEntityState();
			typeof(Open).RegisterEntityState();
			object obj3 = <>c.<>9__102_0;
			if (obj3 == null)
			{
				CollectContentPackProvidersDelegate val7 = delegate(AddContentPackProviderDelegate addContentPackProvider)
				{
					addContentPackProvider.Invoke((IContentPackProvider)(object)new Content());
				};
				<>c.<>9__102_0 = val7;
				obj3 = (object)val7;
			}
			ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj3;
		}

		public static void AutoSetBonusStockFromBody(SkillDef skillDef)
		{
			SkillsAPI.SetBonusStockMultiplier(skillDef, skillDef.rechargeStock);
		}

		public static void AddLemurianProjectileGhost(GameObject projectile)
		{
			ProjectileController component = projectile.GetComponent<ProjectileController>();
			if (Object.op_Implicit((Object)(object)component) && (Object)(object)component.ghostPrefab == (Object)null)
			{
				component.ghostPrefab = LemurianFireBallGhost;
			}
		}

		public static void SetBodyStateToMain(IProjectileMasterSummon projectileMasterSummon, CharacterMaster characterMaster)
		{
			if ((Object)(object)characterMaster == (Object)null)
			{
				return;
			}
			CharacterBody body = characterMaster.GetBody();
			if (!((Object)(object)body == (Object)null))
			{
				EntityStateMachine component = ((Component)body).GetComponent<EntityStateMachine>();
				if (!((Object)(object)component == (Object)null))
				{
					Extensions.SetStateToMain(component);
				}
			}
		}

		public static void ModifyRocketJump(GameObject projectile)
		{
			RocketJumpComponent component = projectile.GetComponent<RocketJumpComponent>();
			if (Object.op_Implicit((Object)(object)component))
			{
				component.buffsWhileMidair = new List<BuffDef>(2)
				{
					Assets.KeepVelocityBuff,
					DemolisherAirControlFromVelocityAddBuff
				};
			}
		}
	}
	public interface IStateSeeker
	{
		IStateTarget foundState { get; set; }

		Func<bool> onStateFound { get; }

		void FindState(CharacterBody characterBody)
		{
			GenericSkill[] allSkills = characterBody.skillLocator.allSkills;
			foreach (GenericSkill val in allSkills)
			{
				IStateTarget stateTarget = (((Object)(object)val == (Object)null || (Object)(object)val.stateMachine == (Object)null || val.stateMachine.state == null) ? null : (val.stateMachine.state as IStateTarget));
				if (stateTarget != null && !stateTarget.taken)
				{
					foundState = stateTarget;
					if (onStateFound == null || onStateFound())
					{
						foundState.taken = true;
						break;
					}
				}
			}
		}
	}
	public class DemolisherComponent : NetworkBehaviour
	{
		public static float swapSpeed;

		public static float extraCrosshairScale;

		public float test;

		public CharacterBody characterBody;

		public ModelLocator modelLocator;

		public SkillLocator skillLocator;

		public DemolisherModel demolisherModel;

		public GenericSkill meleeWeapon;

		public GenericSkill meleePrimary;

		public GenericSkill meleeSecondary;

		public GenericSkill meleeUtility;

		public GenericSkill meleeSpecial;

		public GenericSkill rangedWeapon;

		public GenericSkill rangedPrimary;

		public GenericSkill rangedSecondary;

		public GenericSkill rangedUtility;

		public GenericSkill rangedSpecial;

		[HideInInspector]
		public GenericSkill holsterPrimary;

		[HideInInspector]
		public GenericSkill holsterSecondary;

		[HideInInspector]
		public GenericSkill holsterUtility;

		[HideInInspector]
		public GenericSkill holsterSpecial;

		[HideInInspector]
		public SkillIcon altPrimarySkillIcon;

		[HideInInspector]
		public SkillIcon altSecondarySkillIcon;

		[HideInInspector]
		public SkillIcon altUtilitySkillIcon;

		[HideInInspector]
		public SkillIcon altSpecialSkillIcon;

		[HideInInspector]
		public ChildLocator childLocator;

		[HideInInspector]
		public Animator animator;

		[HideInInspector]
		public int rangedLayerIndex = -1;

		[HideInInspector]
		public float overrideGeneralMeter = 1f;

		[HideInInspector]
		public float overrideMeleeUtilityMeter = -1f;

		public Action<DemolisherComponent> onSwapped;

		private bool swapping;

		private float swappingVelocity;

		private OverlayController overlayController;

		private static int kRpcRpcSwapWeapons;

		private static int kCmdCmdSwapWeapons;

		public bool isSwapped
		{
			get
			{
				if ((Object)(object)skillLocator == (Object)null)
				{
					return false;
				}
				return (Object)(object)skillLocator.primary == (Object)(object)rangedPrimary;
			}
		}

		public void Awake()
		{
			if (Object.op_Implicit((Object)(object)modelLocator) && Object.op_Implicit((Object)(object)modelLocator.modelTransform))
			{
				animator = ((Component)modelLocator.modelTransform).GetComponent<Animator>();
				childLocator = ((Component)modelLocator.modelTransform).GetComponent<ChildLocator>();
				demolisherModel = ((Component)modelLocator.modelTransform).GetComponent<DemolisherModel>();
				rangedLayerIndex = animator.GetLayerIndex("BodyRanged");
			}
			if (isSwapped)
			{
				holsterPrimary = meleePrimary;
				holsterSecondary = meleeSecondary;
				holsterUtility = meleeUtility;
				holsterSpecial = meleeSpecial;
				if (Object.op_Implicit((Object)(object)demolisherModel))
				{
					demolisherModel.swordInvisibilityCount++;
				}
			}
			else
			{
				holsterPrimary = rangedPrimary;
				holsterSecondary = rangedSecondary;
				holsterUtility = rangedUtility;
				holsterSpecial = rangedSpecial;
				if (Object.op_Implicit((Object)(object)demolisherModel))
				{
					demolisherModel.gunInvisibilityCount++;
				}
			}
		}

		public void OnEnable()
		{
			//IL_0003: 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_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			OverlayCreationParams val = default(OverlayCreationParams);
			val.prefab = Assets.Crosshair;
			val.childLocatorEntry = "CrosshairExtras";
			OverlayCreationParams val2 = val;
			overlayController = HudOverlayManager.AddOverlay(((Component)this).gameObject, val2);
			overlayController.onInstanceAdded += OnOverlayInstanceAdded;
			overlayController.onInstanceRemove += OnOverlayInstanceRemoved;
		}

		public void OnDisable()
		{
			HudOverlayManager.RemoveOverlay(overlayController);
			overlayController = null;
		}

		private void OnOverlayInstanceRemoved(OverlayController controller, GameObject @object)
		{
		}

		private void OnOverlayInstanceAdded(OverlayController controller, GameObject @object)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			Transform transform = @object.transform;
			((transform is RectTransform) ? transform : null).localScale = new Vector3(0f - extraCrosshairScale, extraCrosshairScale, 1f);
			DemolisherCrosshair demolisherCrosshair = @object.GetComponent<DemolisherCrosshair>();
			HudElement component = @object.GetComponent<HudElement>();
			component.targetBodyObject = ((Component)this).gameObject;
			demolisherCrosshair.demolisherComponent = this;
			onSwapped = (Action<DemolisherComponent>)Delegate.Combine(onSwapped, new Action<DemolisherComponent>(ChangeCrosshairImages));
			ChangeCrosshairImages(this);
			void ChangeCrosshairImages(DemolisherComponent demolisherComponent)
			{
				if (Object.op_Implicit((Object)(object)demolisherComponent) && Object.op_Implicit((Object)(object)demolisherCrosshair))
				{
					Sprite sprite = (isSwapped ? Assets.CrosshairRangedSprite : Assets.CrosshairMeleeSprite);
					Image generalMeter = demolisherCrosshair.generalMeter;
					if (generalMeter != null)
					{
						generalMeter.sprite = sprite;
					}
					Image generalMeterBase = demolisherCrosshair.generalMeterBase;
					if (generalMeterBase != null)
					{
						generalMeterBase.sprite = sprite;
					}
					Image meleeUtilityMeter = demolisherCrosshair.meleeUtilityMeter;
					if (meleeUtilityMeter != null)
					{
						meleeUtilityMeter.sprite = sprite;
					}
					Image meleeUtilityMeterBase = demolisherCrosshair.meleeUtilityMeterBase;
					if (meleeUtilityMeterBase != null)
					{
						meleeUtilityMeterBase.sprite = sprite;
					}
				}
			}
		}

		public void SwapWeapons()
		{
			if (isSwapped)
			{
				if (Object.op_Implicit((Object)(object)skillLocator))
				{
					skillLocator.primary = meleePrimary;
					skillLocator.secondary = meleeSecondary;
					skillLocator.utility = meleeUtility;
					skillLocator.special = meleeSpecial;
				}
				holsterPrimary = rangedPrimary;
				holsterSecondary = rangedSecondary;
				holsterUtility = rangedUtility;
				holsterSpecial = rangedSpecial;
				swapping = false;
				if (Object.op_Implicit((Object)(object)demolisherModel))
				{
					demolisherModel.swordInvisibilityCount--;
					demolisherModel.gunInvisibilityCount++;
				}
				EntityState.PlayAnimationOnAnimator(animator, "Gesture, Override", "RangedToMelee", "Slash.playbackRate", 1f / characterBody.attackSpeed, 0f);
				Util.PlaySound("Play_draw_sword", ((Component)this).gameObject);
			}
			else
			{
				if (Object.op_Implicit((Object)(object)skillLocator))
				{
					skillLocator.primary = rangedPrimary;
					skillLocator.secondary = rangedSecondary;
					skillLocator.utility = rangedUtility;
					skillLocator.special = rangedSpecial;
				}
				holsterPrimary = meleePrimary;
				holsterSecondary = meleeSecondary;
				holsterUtility = meleeUtility;
				holsterSpecial = meleeSpecial;
				if (Object.op_Implicit((Object)(object)demolisherModel))
				{
					demolisherModel.swordInvisibilityCount++;
					demolisherModel.gunInvisibilityCount--;
				}
				swapping = true;
				EntityState.PlayAnimationOnAnimator(animator, "Gesture, Override", "MeleeToRanged", "Slash.playbackRate", 1f / characterBody.attackSpeed, 0f);
				Util.PlaySound("Play_grenade_launcher_worldreload", ((Component)this).gameObject);
			}
			onSwapped?.Invoke(this);
		}

		public void CallSwapWeapons()
		{
			if (NetworkServer.active)
			{
				CallRpcSwapWeapons();
			}
			else
			{
				CallCmdSwapWeapons();
			}
		}

		[ClientRpc]
		public void RpcSwapWeapons()
		{
			SwapWeapons();
		}

		[Command]
		public void CmdSwapWeapons()
		{
			CallRpcSwapWeapons();
		}

		public void ToggleWeapon(string name, bool toggle)
		{
			if (!((Object)(object)childLocator == (Object)null))
			{
				Transform val = childLocator.FindChild(name);
				if (!((Object)(object)val == (Object)null))
				{
					((Component)val).gameObject.SetActive(toggle);
				}
			}
		}

		public void Update()
		{
			if (rangedLayerIndex >= 0)
			{
				animator.SetLayerWeight(rangedLayerIndex, Mathf.SmoothDamp(animator.GetLayerWeight(rangedLayerIndex), swapping ? 1f : 0f, ref swappingVelocity, swapSpeed));
			}
		}

		static DemolisherComponent()
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Expected O, but got Unknown
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			swapSpeed = 0.1f;
			extraCrosshairScale = 1.5f;
			kCmdCmdSwapWeapons = 790294761;
			NetworkBehaviour.RegisterCommandDelegate(typeof(DemolisherComponent), kCmdCmdSwapWeapons, new CmdDelegate(InvokeCmdCmdSwapWeapons));
			kRpcRpcSwapWeapons = -1008129197;
			NetworkBehaviour.RegisterRpcDelegate(typeof(DemolisherComponent), kRpcRpcSwapWeapons, new CmdDelegate(InvokeRpcRpcSwapWeapons));
			NetworkCRC.RegisterBehaviour("DemolisherComponent", 0);
		}

		private void UNetVersion()
		{
		}

		protected static void InvokeCmdCmdSwapWeapons(NetworkBehaviour obj, NetworkReader reader)
		{
			if (!NetworkServer.active)
			{
				Debug.LogError((object)"Command CmdSwapWeapons called on client.");
			}
			else
			{
				((DemolisherComponent)(object)obj).CmdSwapWeapons();
			}
		}

		public void CallCmdSwapWeapons()
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkClient.active)
			{
				Debug.LogError((object)"Command function CmdSwapWeapons called on server.");
				return;
			}
			if (((NetworkBehaviour)this).isServer)
			{
				CmdSwapWeapons();
				return;
			}
			NetworkWriter val = new NetworkWriter();
			val.Write((short)0);
			val.Write((short)5);
			val.WritePackedUInt32((uint)kCmdCmdSwapWeapons);
			val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
			((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdSwapWeapons");
		}

		protected static void InvokeRpcRpcSwapWeapons(NetworkBehaviour obj, NetworkReader reader)
		{
			if (!NetworkClient.active)
			{
				Debug.LogError((object)"RPC RpcSwapWeapons called on server.");
			}
			else
			{
				((DemolisherComponent)(object)obj).RpcSwapWeapons();
			}
		}

		public void CallRpcSwapWeapons()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active)
			{
				Debug.LogError((object)"RPC Function RpcSwapWeapons called on client.");
				return;
			}
			NetworkWriter val = new NetworkWriter();
			val.Write((short)0);
			val.Write((short)2);
			val.WritePackedUInt32((uint)kRpcRpcSwapWeapons);
			val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
			((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcSwapWeapons");
		}

		public override bool OnSerialize(NetworkWriter writer, bool forceAll)
		{
			bool result = default(bool);
			return result;
		}

		public override void OnDeserialize(NetworkReader reader, bool initialState)
		{
		}
	}
	[RequireComponent(typeof(ProjectileController))]
	public class ProjectileRemoteDetonation : MonoBehaviour
	{
		public string identificator = "Sticky";

		private ProjectileDetonator _projectileDetonator;

		public ProjectileController projectileController;

		public ProjectileExplosion projectileExplosion;

		[HideInInspector]
		public bool detonating;

		public ProjectileDetonator projectileDetonator
		{
			get
			{
				if (Object.op_Implicit((Object)(object)_projectileDetonator))
				{
					return _projectileDetonator;
				}
				_projectileDetonator = (Object.op_Implicit((Object)(object)projectileController.owner) ? Extensions.GetOrAddComponent<ProjectileDetonator>(projectileController.owner) : null);
				return _projectileDetonator;
			}
		}

		public void OnEnable()
		{
			Add();
		}

		public void Add()
		{
			if (Object.op_Implicit((Object)(object)projectileDetonator) && (!projectileDetonator.projectiles.ContainsKey(identificator) || !projectileDetonator.projectiles[identificator].Contains(this)))
			{
				projectileDetonator.AddProjectile(this);
			}
		}

		public void Remove()
		{
			if (Object.op_Implicit((Object)(object)projectileDetonator) && (!projectileDetonator.projectiles.ContainsKey(identificator) || projectileDetonator.projectiles[identificator].Contains(this)))
			{
				projectileDetonator.RemoveProjectile(this);
			}
		}

		public void Start()
		{
			Add();
		}

		public void OnDisable()
		{
			Remove();
		}

		public void Detonate()
		{
			detonating = true;
			if (Object.op_Implicit((Object)(object)projectileExplosion))
			{
				projectileExplosion.Detonate();
			}
			else
			{
				Object.Destroy((Object)(object)((Component)this).gameObject);
			}
		}
	}
	public class ProjectileDetonator : NetworkBehaviour, ILifeBehavior
	{
		public Dictionary<string, List<ProjectileRemoteDetonation>> projectiles = new Dictionary<string, List<ProjectileRemoteDetonation>>();

		private static int kCmdCmdDetonateAll;

		public void AddProjectile(ProjectileRemoteDetonation projectileRemoteDetonation)
		{
			if (projectiles.ContainsKey(projectileRemoteDetonation.identificator))
			{
				projectiles[projectileRemoteDetonation.identificator].Add(projectileRemoteDetonation);
				return;
			}
			projectiles.Add(projectileRemoteDetonation.identificator, new List<ProjectileRemoteDetonation> { projectileRemoteDetonation });
		}

		public void RemoveProjectile(ProjectileRemoteDetonation projectileRemoteDetonation)
		{
			List<ProjectileRemoteDetonation> list = (projectiles.ContainsKey(projectileRemoteDetonation.identificator) ? projectiles[projectileRemoteDetonation.identificator] : null);
			if (list != null && list.Contains(projectileRemoteDetonation))
			{
				list.Remove(projectileRemoteDetonation);
			}
		}

		public void DetonateAll()
		{
			foreach (string key in projectiles.Keys)
			{
				DetonateAll(key);
			}
		}

		[Command]
		public void CmdDetonateAll(string identificator)
		{
			ServerDetonateAll(identificator);
		}

		public void ServerDetonateAll(string identificator)
		{
			if (!projectiles.ContainsKey(identificator))
			{
				return;
			}
			List<ProjectileRemoteDetonation> list = projectiles[identificator];
			int num = 0;
			do
			{
				num = 0;
				for (int i = 0; i < list.Count; i++)
				{
					ProjectileRemoteDetonation projectileRemoteDetonation = list[i];
					if (Object.op_Implicit((Object)(object)projectileRemoteDetonation) && !projectileRemoteDetonation.detonating)
					{
						projectileRemoteDetonation.Detonate();
						num++;
					}
				}
			}
			while (num > 0);
		}

		public void DetonateAll(string identificator)
		{
			if (NetworkServer.active)
			{
				ServerDetonateAll(identificator);
			}
			else
			{
				CallCmdDetonateAll(identificator);
			}
		}

		public void OnDeathStart()
		{
			if (NetworkServer.active)
			{
				DetonateAll();
			}
		}

		private void UNetVersion()
		{
		}

		protected static void InvokeCmdCmdDetonateAll(NetworkBehaviour obj, NetworkReader reader)
		{
			if (!NetworkServer.active)
			{
				Debug.LogError((object)"Command CmdDetonateAll called on client.");
			}
			else
			{
				((ProjectileDetonator)(object)obj).CmdDetonateAll(reader.ReadString());
			}
		}

		public void CallCmdDetonateAll(string identificator)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkClient.active)
			{
				Debug.LogError((object)"Command function CmdDetonateAll called on server.");
				return;
			}
			if (((NetworkBehaviour)this).isServer)
			{
				CmdDetonateAll(identificator);
				return;
			}
			NetworkWriter val = new NetworkWriter();
			val.Write((short)0);
			val.Write((short)5);
			val.WritePackedUInt32((uint)kCmdCmdDetonateAll);
			val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
			val.Write(identificator);
			((NetworkBehaviour)this).SendCommandInternal(val, 0, "CmdDetonateAll");
		}

		static ProjectileDetonator()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			kCmdCmdDetonateAll = -1758859230;
			NetworkBehaviour.RegisterCommandDelegate(typeof(ProjectileDetonator), kCmdCmdDetonateAll, new CmdDelegate(InvokeCmdCmdDetonateAll));
			NetworkCRC.RegisterBehaviour("ProjectileDetonator", 0);
		}

		public override bool OnSerialize(NetworkWriter writer, bool forceAll)
		{
			bool result = default(bool);
			return result;
		}

		public override void OnDeserialize(NetworkReader reader, bool initialState)
		{
		}
	}
	[RequireComponent(typeof(ProjectileDamage))]
	[RequireComponent(typeof(ProjectileController))]
	public class ProjectileBulletAttack : MonoBehaviour
	{
		public ProjectileController projectileController;

		public ProjectileDamage projectileDamage;

		public Vector3 aimVector = Vector3.up;

		public bool localRotation = false;

		public bool allowTrajectoryAimAssist = false;

		public int bulletCount = 1;

		public bool cheapMultiBullet = false;

		public FalloffModel falloffModel = (FalloffModel)0;

		public float minSpread = 0f;

		public float maxSpread = 0f;

		public float spreadYawScale = 1f;

		public float spreadPitchScale = 1f;

		public float multiBulletOdds = 0f;

		public float radius = 1f;

		public float maxDistance = 1f;

		public float procCoefficient = 1f;

		public bool sniper = false;

		public bool smartCollision = true;

		public float trajectoryAimAssistMultiplier = 0f;

		public GameObject hitEffectPrefab;

		public GameObject tracerEffectPrefab;

		public LayerMask hitMask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask;

		public LayerMask stopperMask = ((LayerIndex)(ref LayerIndex.noCollision)).mask;

		public float fireInterval = 0f;

		[HideInInspector]
		public float fireStopwatch = 0f;

		public float updateInterval = 1f;

		[HideInInspector]
		public float updateStopwatch = 0f;

		public float resetInterval = 1f;

		[HideInInspector]
		public float resetStopwatch = 0f;

		public BulletAttack bulletAttack;

		public virtual void Awake()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: 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_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: 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_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a1: Expected O, but got Unknown
			if ((Object)(object)projectileDamage == (Object)null)
			{
				projectileDamage = ((Component)this).GetComponent<ProjectileDamage>();
			}
			if ((Object)(object)projectileController == (Object)null)
			{
				projectileController = ((Component)this).GetComponent<ProjectileController>();
			}
			bulletAttack = new BulletAttack
			{
				aimVector = aimVector,
				allowTrajectoryAimAssist = allowTrajectoryAimAssist,
				bulletCount = (uint)bulletCount,
				damage = projectileDamage.damage,
				damageColorIndex = projectileDamage.damageColorIndex,
				damageType = projectileDamage.damageType,
				falloffModel = falloffModel,
				force = projectileDamage.force,
				isCrit = projectileDamage.crit,
				maxSpread = maxSpread,
				minSpread = minSpread,
				origin = ((Component)this).transform.position,
				owner = projectileController.owner,
				radius = radius,
				maxDistance = maxDistance,
				procCoefficient = procCoefficient,
				sniper = sniper,
				smartCollision = smartCollision,
				weapon = ((Component)this).gameObject,
				trajectoryAimAssistMultiplier = trajectoryAimAssistMultiplier,
				spreadYawScale = spreadYawScale,
				spreadPitchScale = spreadPitchScale,
				hitEffectPrefab = hitEffectPrefab,
				tracerEffectPrefab = tracerEffectPrefab,
				hitMask = hitMask,
				stopperMask = stopperMask
			};
			Extensions.SetIgnoreHitTargets(bulletAttack, true);
		}

		public virtual void UpdateBulletAttack()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: 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_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			bulletAttack.allowTrajectoryAimAssist = allowTrajectoryAimAssist;
			bulletAttack.bulletCount = (uint)bulletCount;
			bulletAttack.falloffModel = falloffModel;
			bulletAttack.maxSpread = maxSpread;
			bulletAttack.minSpread = minSpread;
			bulletAttack.sniper = sniper;
			bulletAttack.smartCollision = smartCollision;
			bulletAttack.trajectoryAimAssistMultiplier = trajectoryAimAssistMultiplier;
			bulletAttack.spreadPitchScale = spreadPitchScale;
			bulletAttack.spreadYawScale = spreadYawScale;
			bulletAttack.procCoefficient = procCoefficient;
			bulletAttack.radius = radius;
			bulletAttack.maxDistance = maxDistance;
			bulletAttack.origin = ((Component)this).transform.position;
			bulletAttack.damage = projectileDamage.damage;
			bulletAttack.damageColorIndex = projectileDamage.damageColorIndex;
			bulletAttack.damageType = projectileDamage.damageType;
			bulletAttack.force = projectileDamage.force;
			bulletAttack.isCrit = projectileDamage.crit;
			bulletAttack.owner = projectileController.owner;
			if (localRotation)
			{
				bulletAttack.aimVector = ((Component)this).transform.rotation * aimVector;
			}
			else
			{
				bulletAttack.aimVector = aimVector;
			}
			updateStopwatch = 0f;
		}

		public void OneTimeMeleeModification(DemolisherBulletAttackWeaponDef demolisherBulletAttackWeaponDef)
		{
			object attack = bulletAttack;
			demolisherBulletAttackWeaponDef.OneTimeModification(this, ref attack);
		}

		public virtual void FireBulletAttack()
		{
			if (NetworkServer.active)
			{
				bulletAttack.Fire();
			}
			fireStopwatch = 0f;
		}

		public virtual void Reset()
		{
			Extensions.ResetIgnoredHealthComponents(bulletAttack);
			resetStopwatch = 0f;
		}

		public virtual void IncrementTimers(float deltaTime)
		{
			resetStopwatch += deltaTime;
			fireStopwatch += deltaTime;
			updateStopwatch += deltaTime;
		}

		public virtual void FixedUpdate()
		{
			IncrementTimers(Time.fixedDeltaTime);
			if (updateStopwatch >= updateInterval)
			{
				UpdateBulletAttack();
			}
			if (fireStopwatch >= fireInterval)
			{
				FireBulletAttack();
			}
			if (resetStopwatch >= resetInterval)
			{
				Reset();
			}
		}
	}
	[RequireComponent(typeof(CharacterController))]
	public class DemolisherSwordPillarProjectile : ProjectileBulletAttack
	{
		public CharacterController characterController;

		public float lifetime = 1f;

		public float gravity = 3f;

		public AnimationCurve velocityOverLifetime = AnimationCurve.Constant(0f, 1f, 100f);

		public float steering = 90f;

		[HideInInspector]
		public float timer;

		[HideInInspector]
		public DemolisherBulletAttackWeaponDef meleeWeapon;

		[HideInInspector]
		public FireTallSword fireTallSword;

		[HideInInspector]
		public InputBankTest inputBank;

		public override void Awake()
		{
			base.Awake();
			if ((Object)(object)characterController == (Object)null)
			{
				characterController = ((Component)this).GetComponent<CharacterController>();
			}
		}

		public void Start()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			Vector3 forward = ((Component)this).transform.forward;
			forward.y = 0f;
			((Vector3)(ref forward)).Normalize();
			((Component)this).transform.forward = forward;
			if ((Object)(object)projectileController == (Object)null || (Object)(object)projectileController.owner == (Object)null)
			{
				return;
			}
			CharacterBody component = projectileController.owner.GetComponent<CharacterBody>();
			if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.skillLocator))
			{
				return;
			}
			GenericSkill[] allSkills = component.skillLocator.allSkills;
			foreach (GenericSkill val in allSkills)
			{
				fireTallSword = (((Object)(object)val == (Object)null || (Object)(object)val.stateMachine == (Object)null || val.stateMachine.state == null || !(val.stateMachine.state is FireTallSword)) ? null : (val.stateMachine.state as FireTallSword));
				if (fireTallSword != null && !fireTallSword.stateTaken)
				{
					meleeWeapon = fireTallSword.currentMeleeWeaponDef;
					if (Object.op_Implicit((Object)(object)meleeWeapon))
					{
						fireTallSword.stateTaken = true;
						inputBank = ((EntityState)fireTallSword).inputBank;
						object obj = bulletAttack;
						OneTimeMeleeModification(meleeWeapon);
						break;
					}
				}
			}
		}

		public override void UpdateBulletAttack()
		{
			base.UpdateBulletAttack();
			object attack = bulletAttack;
			if ((Object)(object)meleeWeapon != (Object)null && fireTallSword != null)
			{
				meleeWeapon.ModifyAttack(projectileController, ref attack);
			}
		}

		public override void IncrementTimers(float deltaTime)
		{
			base.IncrementTimers(deltaTime);
			timer += deltaTime;
		}

		public override void FixedUpdate()
		{
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			base.FixedUpdate();
			if (NetworkServer.active)
			{
				float num = velocityOverLifetime.Evaluate(timer / lifetime);
				((Component)this).transform.forward = Vector3.RotateTowards(((Component)this).transform.forward, Direction(), steering / 57.3f, 0f);
				Vector3 val = ((Component)this).transform.forward * num + Physics.gravity * gravity;
				characterController.Move(val * Time.fixedDeltaTime);
				if (timer >= lifetime)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
			}
		}

		public Vector3 Direction()
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			if (Object.op_Implicit((Object)(object)inputBank))
			{
				Vector3 aimDirection = inputBank.aimDirection;
				aimDirection.y = 0f;
				((Vector3)(ref aimDirection)).Normalize();
				return aimDirection;
			}
			return Vector3.zero;
		}

		public static Vector3 NearestPointOnLine(Vector3 linePnt, Vector3 lineDir, Vector3 pnt)
		{
			//IL_0009: 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_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			((Vector3)(ref lineDir)).Normalize();
			Vector3 val = pnt - linePnt;
			float num = Vector3.Dot(val, lineDir);
			return linePnt + lineDir * num;
		}
	}
	public class DemolisherSwordPillarGhost : MonoBehaviour
	{
		public Transform swordPillarTransform;

		public ProjectileGhostController projectileGhostController;

		private DemolisherSwordPillarProjectile _demolisherSwordPillarProjectile;

		public DemolisherSwordPillarProjectile demolisherSwordPillarProjectile
		{
			get
			{
				if ((Object)(object)_demolisherSwordPillarProjectile == (Object)null)
				{
					_demolisherSwordPillarProjectile = ((Object.op_Implicit((Object)(object)projectileGhostController) && Object.op_Implicit((Object)(object)projectileGhostController.authorityTransform)) ? ((Component)projectileGhostController.authorityTransform).gameObject.GetComponent<DemolisherSwordPillarProjectile>() : null);
				}
				return _demolisherSwordPillarProjectile;
			}
		}

		public void Awake()
		{
			if (Object.op_Implicit((Object)(object)swordPillarTransform))
			{
				swordPillarTransform.SetParent((Transform)null, true);
			}
		}

		public void OnEnable()
		{
			if (Object.op_Implicit((Object)(object)swordPillarTransform))
			{
				((Component)swordPillarTransform).gameObject.SetActive(true);
			}
		}

		public void LateUpdate()
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: 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_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)demolisherSwordPillarProjectile == (Object)null) && !((Object)(object)swordPillarTransform == (Object)null))
			{
				BulletAttack bulletAttack = demolisherSwordPillarProjectile.bulletAttack;
				swordPillarTransform.position = ((Component)this).transform.position;
				Vector3 forward = ((Component)this).transform.forward;
				forward.y = 0f;
				((Vector3)(ref forward)).Normalize();
				swordPillarTransform.rotation = Util.QuaternionSafeLookRotation(forward, bulletAttack.aimVector);
				float radius = bulletAttack.radius;
				swordPillarTransform.localScale = new Vector3(radius, bulletAttack.maxDistance, radius);
			}
		}

		public void OnDisable()
		{
			if (Object.op_Implicit((Object)(object)swordPillarTransform))
			{
				((Component)swordPillarTransform).gameObject.SetActive(false);
			}
		}

		public void OnDestroy()
		{
			if (Object.op_Implicit((Object)(object)swordPillarTransform))
			{
				Object.Destroy((Object)(object)((Component)swordPillarTransform).gameObject);
			}
		}
	}
	public class DemolisherSlash : MonoBehaviour
	{
		public EffectComponent effectComponent;

		public ParticleSystem[] swipeParticles;

		public void Init(float speed)
		{
			ParticleSystem[] array = swipeParticles;
			foreach (ParticleSystem val in array)
			{
				val.playbackSpeed = speed;
			}
		}
	}
	public class DemolisherWhirlwind : MonoBehaviour
	{
		public EffectComponent effectComponent;

		public ParticleSystem[] particles;

		public void Start()
		{
			if (Object.op_Implicit((Object)(object)effectComponent) && effectComponent.effectData != null)
			{
				float playbackSpeed = 1f / effectComponent.effectData.genericFloat;
				ParticleSystem[] array = particles;
				foreach (ParticleSystem val in array)
				{
					val.playbackSpeed = playbackSpeed;
				}
			}
		}
	}
	[RequireComponent(typeof(ProjectileStickOnImpact))]
	[RequireComponent(typeof(ProjectileController))]
	public class DemolisherHook : NetworkBehaviour, IStateSeeker
	{
		public float hookPower = 2f;

		public float hookAimPower = 64f;

		public float hookPower2 = 16f;

		public float hookDistance = 16f;

		public float hookDistance2 = 64f;

		public float smoothTime = 1f;

		public ProjectileController projectileController;

		public ProjectileStickOnImpact projectileStickOnImpact;

		public Transform startTransform;

		[HideInInspector]
		public CharacterBody ownerBody;

		[HideInInspector]
		public InputBankTest ownerInputBank;

		[SyncVar]
		[HideInInspector]
		public bool sticked;

		[HideInInspector]
		public CharacterBody hitBody;

		[SyncVar]
		[HideInInspector]
		public float hitRange;

		[HideInInspector]
		public EntityStateMachine entityStateMachine;

		[HideInInspector]
		public Vector3 previousVelocity;

		private float age;

		private IStateTarget _foundState;

		private static int kRpcRpcOnStick;

		public IStateSeeker stateSeeker => this;

		public IStateTarget foundState
		{
			get
			{
				return _foundState;
			}
			set
			{
				_foundState = value;
			}
		}

		public Func<bool> onStateFound => SetEntityStateMachine;

		public bool Networksticked
		{
			get
			{
				return sticked;
			}
			[param: In]
			set
			{
				((NetworkBehaviour)this).SetSyncVar<bool>(value, ref sticked, 1u);
			}
		}

		public float NetworkhitRange
		{
			get
			{
				return hitRange;
			}
			[param: In]
			set
			{
				((NetworkBehaviour)this).SetSyncVar<float>(value, ref hitRange, 2u);
			}
		}

		public void Awake()
		{
			if ((Object)(object)projectileController == (Object)null)
			{
				projectileController = ((Component)this).gameObject.GetComponent<ProjectileController>();
			}
			if ((Object)(object)projectileStickOnImpact == (Object)null)
			{
				projectileStickOnImpact = ((Component)this).gameObject.GetComponent<ProjectileStickOnImpact>();
			}
		}

		public void Start()
		{
			ownerBody = ((Object.op_Implicit((Object)(object)projectileController) && Object.op_Implicit((Object)(object)projectileController.owner)) ? projectileController.owner.GetComponent<CharacterBody>() : null);
			if (Object.op_Implicit((Object)(object)ownerBody))
			{
				ownerInputBank = ownerBody.inputBank;
				if (Object.op_Implicit((Object)(object)ownerInputBank) && Object.op_Implicit((Object)(object)ownerBody.skillLocator))
				{
					stateSeeker.FindState(ownerBody);
				}
			}
		}

		public bool SetEntityStateMachine()
		{
			entityStateMachine = foundState.entityState.outer;
			CharacterBody characterBody = foundState.entityState.characterBody;
			if (Object.op_Implicit((Object)(object)characterBody))
			{
				Transform obj = startTransform;
				if (obj != null)
				{
					obj.SetParent(characterBody.aimOriginTransform ?? characterBody.coreTransform, false);
				}
			}
			return true;
		}

		public void FixedUpdate()
		{
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fe: 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_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Unknown result type (might be due to invalid IL or missing references)
			//IL_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: 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_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: 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_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e5: 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_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			age += Time.fixedDeltaTime;
			if (NetworkServer.active)
			{
				if (Object.op_Implicit((Object)(object)ownerInputBank) && Object.op_Implicit((Object)(object)entityStateMachine) && entityStateMachine.state != foundState)
				{
					Object.Destroy((Object)(object)((Component)this).gameObject);
				}
				if (Object.op_Implicit((Object)(object)projectileStickOnImpact))
				{
					bool flag = Object.op_Implicit((Object)(object)projectileStickOnImpact.stuckTransform);
					if (flag != sticked)
					{
						Networksticked = flag;
					}
				}
			}
			if (sticked)
			{
				Ray val = default(Ray);
				((Ray)(ref val)).direction = ownerBody.transform.eulerAngles;
				((Ray)(ref val)).origin = ownerBody.corePosition;
				Ray val2 = val;
				if (Object.op_Implicit((Object)(object)ownerInputBank))
				{
					val2 = ownerInputBank.GetAimRay();
				}
				if (Object.op_Implicit((Object)(object)hitBody))
				{
					Vector3 vector = (((Ray)(ref val2)).origin + ((Ray)(ref val2)).direction * (hookDistance + hitBody.radius) - hitBody.corePosition) * hookPower2;
					HandleMovement(hitBody, vector);
					return;
				}
				Vector3 val3 = ((Component)this).transform.position - ownerBody.corePosition;
				float num = Mathf.Max(((Vector3)(ref val3)).magnitude - hookDistance2, 0f);
				((Vector3)(ref val3)).Normalize();
				Vector3 vector2 = val3 * hookPower * num + ((Ray)(ref val2)).direction * hookAimPower;
				HandleMovement(ownerBody, vector2);
			}
		}

		public void HandleMovement(CharacterBody characterBody, Vector3 vector3)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: 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_0065: Unknown result type (might be due to invalid IL or missing references)
			if (Util.HasEffectiveAuthority(characterBody.networkIdentity))
			{
				vector3 = Vector3.Lerp(previousVelocity, vector3, age / smoothTime);
				if (Object.op_Implicit((Object)(object)characterBody.characterMotor))
				{
					characterBody.characterMotor.velocity = vector3;
				}
				else if (Object.op_Implicit((Object)(object)characterBody.rigidbody))
				{
					characterBody.rigidbody.velocity = vector3;
				}
			}
		}

		public void OnStick()
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: 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_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: 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_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)projectileStickOnImpact == (Object)null))
			{
				hitBody = projectileStickOnImpact.stuckBody;
				float networkhitRange;
				if (!Object.op_Implicit((Object)(object)ownerBody))
				{
					networkhitRange = 0f;
				}
				else
				{
					Vector3 val = ((Component)this).transform.position - ownerBody.corePosition;
					networkhitRange = ((Vector3)(ref val)).magnitude;
				}
				NetworkhitRange = networkhitRange;
				Networksticked = true;
				previousVelocity = ((!Object.op_Implicit((Object)(object)hitBody)) ? ((!Object.op_Implicit((Object)(object)ownerBody)) ? Vector3.zero : (Object.op_Implicit((Object)(object)ownerBody.characterMotor) ? ownerBody.characterMotor.velocity : (Object.op_Implicit((Object)(object)ownerBody.rigidbody) ? ownerBody.rigidbody.velocity : Vector3.zero))) : (Object.op_Implicit((Object)(object)hitBody.characterMotor) ? hitBody.characterMotor.velocity : (Object.op_Implicit((Object)(object)hitBody.rigidbody) ? hitBody.rigidbody.velocity : Vector3.zero)));
				if (Object.op_Implicit((Object)(object)hitBody))
				{
					CallRpcOnStick(hitBody.networkIdentity);
				}
			}
		}

		[ClientRpc]
		public void RpcOnStick(NetworkIdentity networkIdentity)
		{
			if (!NetworkServer.active)
			{
				hitBody = ((Component)networkIdentity).gameObject.GetComponent<CharacterBody>();
			}
		}

		private void UNetVersion()
		{
		}

		protected static void InvokeRpcRpcOnStick(NetworkBehaviour obj, NetworkReader reader)
		{
			if (!NetworkClient.active)
			{
				Debug.LogError((object)"RPC RpcOnStick called on server.");
			}
			else
			{
				((DemolisherHook)(object)obj).RpcOnStick(reader.ReadNetworkIdentity());
			}
		}

		public void CallRpcOnStick(NetworkIdentity networkIdentity)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			if (!NetworkServer.active)
			{
				Debug.LogError((object)"RPC Function RpcOnStick called on client.");
				return;
			}
			NetworkWriter val = new NetworkWriter();
			val.Write((short)0);
			val.Write((short)2);
			val.WritePackedUInt32((uint)kRpcRpcOnStick);
			val.Write(((Component)this).GetComponent<NetworkIdentity>().netId);
			val.Write(networkIdentity);
			((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcOnStick");
		}

		static DemolisherHook()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			kRpcRpcOnStick = -537868138;
			NetworkBehaviour.RegisterRpcDelegate(typeof(DemolisherHook), kRpcRpcOnStick, new CmdDelegate(InvokeRpcRpcOnStick));
			NetworkCRC.RegisterBehaviour("DemolisherHook", 0);
		}

		public override bool OnSerialize(NetworkWriter writer, bool forceAll)
		{
			if (forceAll)
			{
				writer.Write(sticked);
				writer.Write(hitRange);
				return true;
			}
			bool flag = false;
			if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0)
			{
				if (!flag)
				{
					writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
					flag = true;
				}
				writer.Write(sticked);
			}
			if ((((NetworkBehaviour)this).syncVarDirtyBits & 2u) != 0)
			{
				if (!flag)
				{
					writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
					flag = true;
				}
				writer.Write(hitRange);
			}
			if (!flag)
			{
				writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits);
			}
			return flag;
		}

		public override void OnDeserialize(NetworkReader reader, bool initialState)
		{
			if (initialState)
			{
				sticked = reader.ReadBoolean();
				hitRange = reader.ReadSingle();
				return;
			}
			int num = (int)reader.ReadPackedUInt32();
			if (((uint)num & (true ? 1u : 0u)) != 0)
			{
				sticked = reader.ReadBoolean();
			}
			if (((uint)num & 2u) != 0)
			{
				hitRange = reader.ReadSingle();
			}
		}
	}
	[RequireComponent(typeof(Rigidbody))]
	[RequireComponent(typeof(ProjectileDamage))]
	[RequireComponent(typeof(ProjectileController))]
	public class DemolisherBomb : MonoBehaviour, IProjectileImpactBehavior
	{
		public float damageCoefficient = 1f;

		public bool useProejctileDamage = true;

		public float procCoefficient = 1f;

		public float force = 1f;

		public float upForce = 0.5f;

		public float lifetimeMultiplier = 1f;

		public Vector3 velocityOnHit = Vector3.up * 3f;

		public Rigidbody rigidbody;

		public ProjectileController projectileController;

		public ProjectileDamage projectileDamage;

		[HideInInspector]
		public List<CharacterBody> hitBodies = new List<CharacterBody>();

		[HideInInspector]
		public bool hit;

		[HideInInspector]
		public CharacterBody ownerBody;

		public Vector3 forceVector
		{
			get
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000c: Unknown result type (might be due to invalid IL or missing references)
				//IL_001b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0020: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				Vector3 velocity = rigidbody.velocity;
				velocity.y = 0f;
				return ((Vector3)(ref velocity)).normalized;
			}
		}

		public void Awake()
		{
			if ((Object)(object)rigidbody == (Object)null)
			{
				rigidbody = ((Component)this).GetComponent<Rigidbody>();
			}
			if ((Object)(object)projectileController == (Object)null)
			{
				projectileController = ((Component)this).GetComponent<ProjectileController>();
			}
			if ((Object)(object)projectileDamage == (Object)null)
			{
				projectileDamage = ((Component)this).GetComponent<ProjectileDamage>();
			}
		}

		public void OnProjectileImpact(ProjectileImpactInfo impactInfo)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: 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_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_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f1: 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_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Expected O, but got Unknown
			if (!NetworkServer.active || hit)
			{
				return;
			}
			hit = true;
			HurtBox component = ((Component)impactInfo.collider).GetComponent<HurtBox>();
			CharacterBody val = ((Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.healthComponent)) ? component.healthComponent.body : ((Component)impactInfo.collider).GetComponent<CharacterBody>());
			if ((Object)(object)val == (Object)null)
			{
				return;
			}
			if (!hitBodies.Contains(val))
			{
				hitBodies.Add(val);
			}
			val.AddTimedBuff(Assets.BombHit, 1f);
			if (Object.op_Implicit((Object)(object)projectileDamage))
			{
				DamageInfo val2 = new DamageInfo
				{
					attacker = projectileController.owner,
					canRejectForce = true,
					crit = projectileDamage.crit,
					damage = (useProejctileDamage ? (projectileDamage.damage * damageCoefficient) : (val.damage * damageCoefficient)),
					damageColorIndex = (DamageColorIndex)0,
					damageType = DamageTypeCombo.Generic,
					inflictor = ((Component)this).gameObject,
					position = impactInfo.estimatedPointOfImpact,
					procCoefficient = procCoefficient
				};
				HealthComponent healthComponent = val.healthComponent;
				if (healthComponent != null)
				{
					healthComponent.TakeDamageProcess(val2);
				}
			}
			PhysForceInfo val3 = default(PhysForceInfo);
			val3._flags = 7;
			val3.force = forceVector * force + Physics.gravity * upForce * -1f;
			PhysForceInfo val4 = val3;
			CharacterMotor characterMotor = val.characterMotor;
			if (Object.op_Implicit((Object)(object)characterMotor))
			{
				if (characterMotor != null)
				{
					characterMotor.ApplyForceImpulse(ref val4);
				}
			}
			else if (Object.op_Implicit((Object)(object)val.rigidbody))
			{
				RigidBodyExtensions.AddForceWithInfo(val.rigidbody, val4);
			}
			rigidbody.velocity = velocityOnHit;
		}
	}
	public class DemolisherFeetEffect : MonoBehaviour
	{
		public static OnRocketJumpApplied onRocketJumpApplied = new OnRocketJumpApplied(AddFeetSmoke);

		public ParticleSystem particleSystem;

		public void OnLanded(ref HitGroundInfo hitGroundInfo)
		{
			particleSystem.Stop(true, (ParticleSystemStopBehavior)1);
			((Component)this).transform.SetParent((Transform)null, true);
		}

		public static void AddFeetSmoke(RocketJumpComponent rocketJumpComponent, CharacterBody characterBody, Vector3 vector3)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			NetMessageExtensions.Send((INetMessage)(object)new FeetEffectNetMessage(((NetworkBehaviour)characterBody).netId), (NetworkDestination)1);
		}
	}
	public class DemolisherFeetEffectsHolder : MonoBehaviour, IOnGroundHit
	{
		public List<DemolisherFeetEffect> demolisherFeetEffects = new List<DemolisherFeetEffect>();

		public void OnGroundHit(CharacterMotor characterMotor, HitGroundInfo hitGroundInfo)
		{
			for (int i = 0; i < demolisherFeetEffects.Count; i++)
			{
				DemolisherFeetEffect demolisherFeetEffect = demolisherFeetEffects[i];
				if (!Object.op_Implicit((Object)(object)demolisherFeetEffect))
				{
					return;
				}
				demolisherFeetEffect.OnLanded(ref hitGroundInfo);
			}
			Object.Destroy((Object)(object)this);
		}
	}
	[RequireComponent(typeof(ProjectileController))]
	public class DemolisherProjectileExplosion