Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Demolisher v0.6.2
plugins/Demolisher.dll
Decompiled 4 months ago
The result has been truncated due to the large size, download it to view full contents!
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.EntityStates; 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+f166f55ed7bd5ba244876250185c4415ed3e8eef")] [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 { [Microsoft.CodeAnalysis.Embedded] [CompilerGenerated] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) CharacterBody attackerBody = damageReport.attackerBody; if (!Object.op_Implicit((Object)(object)attackerBody) || !Object.op_Implicit((Object)(object)attackerBody.characterMotor) || !attackerBody.characterMotor.isGrounded || !Object.op_Implicit((Object)(object)damageReport.victim) || (!DamageAPI.HasModdedDamageType(damageReport.damageInfo, Assets.SharpnessDamageType) && !DamageAPI.HasModdedDamageType(damageReport.damageInfo, Assets.SoftnessDamageType) && !DamageAPI.HasModdedDamageType(damageReport.damageInfo, Assets.ChaosDamageType))) { 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 = 350; 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 OnRocketJumpApplied <3>__HandleDemolisherRocketJump; public static OnMasterSummon <4>__SetBodyStateToMain; } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static CollectContentPackProvidersDelegate <>9__106_0; internal void <Init>b__106_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 FeetEffect; public static GameObject DevilFeetEffect; public static GameObject TimestopEffect; public static GameObject CracksTrailEffect; public static GameObject PillarEffect; public static GameObject PillarExplosionEffect; public static GameObject IamRedAsFuck; public static GameObject Crosshair; 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 EffectDef SwordSharpnessExplosionEffect; public static EffectDef SwordSoftnessExplosionEffect; public static EffectDef ShieldChargeEffect; public static EffectDef SlashEffect; public static EffectDef AuraEffect; public static EffectDef LaserEffect; 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 RocketJumpDelegateDef DemolisherRocketJump; 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 float rocketJumpForceMovespeedClamp => RocketjumpingConfig.RocketJumpForceMovespeedClamp.Value; public static float rocketJumpForceMovespeedDivide => RocketjumpingConfig.RocketJumpForceMovespeedDivide.Value; public static float rocketJumpForceJumpClamp => RocketjumpingConfig.RocketJumpForceJumpClamp.Value; public static float rocketJumpForceJumpDivide => RocketjumpingConfig.RocketJumpForceJumpDivide.Value; 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_07dd: Unknown result type (might be due to invalid IL or missing references) //IL_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_0e6b: Unknown result type (might be due to invalid IL or missing references) //IL_0e71: Expected I4, but got Unknown //IL_0e94: Unknown result type (might be due to invalid IL or missing references) //IL_0e9a: Expected I4, but got Unknown //IL_0ebd: Unknown result type (might be due to invalid IL or missing references) //IL_0ec3: Expected I4, but got Unknown //IL_0ef7: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Expected I4, but got Unknown //IL_0f5e: Unknown result type (might be due to invalid IL or missing references) //IL_0f63: Unknown result type (might be due to invalid IL or missing references) //IL_0f69: Expected O, but got Unknown //IL_0f97: Unknown result type (might be due to invalid IL or missing references) //IL_0f9c: Unknown result type (might be due to invalid IL or missing references) //IL_0fa2: Expected O, but got Unknown //IL_0fd0: Unknown result type (might be due to invalid IL or missing references) //IL_0fd5: Unknown result type (might be due to invalid IL or missing references) //IL_0fdb: Expected O, but got Unknown //IL_11a4: Unknown result type (might be due to invalid IL or missing references) //IL_11a9: Unknown result type (might be due to invalid IL or missing references) //IL_11af: Expected O, but got Unknown //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: 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>(); Extensions.SetBunnyHop(component2, true); 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(); SwordSharpnessExplosionEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherSharpnessSwordExplosion.prefab").RegisterEffect(); SwordSoftnessExplosionEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherSoftnessExplosion.prefab").RegisterEffect(); ShieldChargeEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherChargeShield.prefab").RegisterEffect(); SlashEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherSlash.prefab").RegisterEffect(); LaserEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherLaser.prefab").RegisterEffect(); AuraEffect = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/DemolisherAura.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(); 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"); IamRedAsFuck = assetBundle.LoadAsset<GameObject>("Assets/Demolisher/Effects/IAmRedAsFuck.prefab"); Crosshair = assetBundle.LoadAsset<GameObject>("Assets/Demoman/DemoExtraCrosshairReworkSimplified.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); DemolisherWeapon = DemolisherLauncher.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; DemolisherRocketJump = assetBundle.LoadAsset<RocketJumpDelegateDef>("Assets/Demolisher/DelegateDefs/DemolisherRocketJump.asset"); RocketJumpDelegateDef demolisherRocketJump = DemolisherRocketJump; object obj2 = <>O.<3>__HandleDemolisherRocketJump; if (obj2 == null) { OnRocketJumpApplied val6 = HandleDemolisherRocketJump; <>O.<3>__HandleDemolisherRocketJump = val6; obj2 = (object)val6; } ((DelegateDef<OnRocketJumpApplied>)(object)demolisherRocketJump).@delegate = (OnRocketJumpApplied)obj2; SetBodyStateToMainOnSpawn = assetBundle.LoadAsset<OnMasterSummonDelegateDef>("Assets/Demolisher/DelegateDefs/SetBodyStateToMainOnSpawn.asset"); OnMasterSummonDelegateDef setBodyStateToMainOnSpawn = SetBodyStateToMainOnSpawn; object obj3 = <>O.<4>__SetBodyStateToMain; if (obj3 == null) { OnMasterSummon val7 = SetBodyStateToMain; <>O.<4>__SetBodyStateToMain = val7; obj3 = (object)val7; } ((DelegateDef<OnMasterSummon>)(object)setBodyStateToMainOnSpawn).@delegate = (OnMasterSummon)obj3; 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(ExitSlicing).RegisterEntityState(); typeof(Slice).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 obj4 = <>c.<>9__106_0; if (obj4 == null) { CollectContentPackProvidersDelegate val8 = delegate(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new Content()); }; <>c.<>9__106_0 = val8; obj4 = (object)val8; } ContentManager.collectContentPackProviders += (CollectContentPackProvidersDelegate)obj4; if (DemolisherPlugin.riskOfOptionsEnabled) { ModCompatabilities.RiskOfOptionsCompatability.Init(); } } 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.clientBuffsWhileMidair = new List<BuffDef>(2) { Assets.UseMaxAirVelocityBuff, DemolisherAirControlFromVelocityAddBuff }; } } public static void HandleDemolisherRocketJump(RocketJumpComponent rocketJumpComponent, CharacterBody characterBody, Vector3 force) { //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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_018d: 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_007b: 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) CharacterMotor characterMotor = characterBody.characterMotor; Rigidbody rigidbody = characterBody.rigidbody; if (Object.op_Implicit((Object)(object)characterMotor)) { if (characterMotor.isFlying) { float magnitude = ((Vector3)(ref characterMotor.velocity)).magnitude; float magnitude2 = ((Vector3)(ref force)).magnitude; float num = characterBody.moveSpeed * rocketJumpForceMovespeedClamp; float num2 = magnitude - magnitude2; num2 += Mathf.Lerp(magnitude2, 0f, num2 / num) + magnitude2 * characterBody.moveSpeed / rocketJumpForceMovespeedDivide; characterMotor.velocity = Vector3.ClampMagnitude(characterMotor.velocity, num2); return; } float num3 = Mathf.Abs(characterMotor.velocity.y); float num4 = characterBody.jumpPower * rocketJumpForceJumpClamp; float num5 = num3 - force.y; float num6 = Mathf.Lerp(force.y, 0f, num5 / num4); num5 += num6 + force.y * characterBody.jumpPower / rocketJumpForceJumpDivide; Vector2 val = default(Vector2); ((Vector2)(ref val))..ctor(force.x, force.z); float magnitude3 = ((Vector2)(ref val)).magnitude; Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(characterMotor.velocity.x, characterMotor.velocity.z); float magnitude4 = ((Vector2)(ref val2)).magnitude; float num7 = characterBody.moveSpeed * rocketJumpForceMovespeedClamp; float num8 = magnitude4 - magnitude3; float num9 = Mathf.Lerp(magnitude4, 0f, num8 / num7); num8 += num9 + magnitude3 * characterBody.moveSpeed / rocketJumpForceMovespeedDivide; val2 = Vector2.ClampMagnitude(val2, num8); characterMotor.velocity = new Vector3(val2.x, num5, val2.y); } else if (Object.op_Implicit((Object)(object)rigidbody)) { Vector3 velocity = rigidbody.velocity; float magnitude5 = ((Vector3)(ref velocity)).magnitude; float magnitude6 = ((Vector3)(ref force)).magnitude; float num10 = characterBody.moveSpeed * rocketJumpForceMovespeedClamp; float num11 = magnitude5 - magnitude6; num11 += Mathf.Lerp(magnitude6, 0f, num11 / num10) + magnitude6 * characterBody.moveSpeed / rocketJumpForceMovespeedDivide; rigidbody.velocity = Vector3.ClampMagnitude(rigidbody.velocity, num11); } } } 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() { SwapWeapons(); if (NetworkServer.active) { CallRpcSwapWeapons(); } else { CallCmdSwapWeapons(); } } [ClientRpc] public void RpcSwapWeapons() { if (!((NetworkBehaviour)this).hasAuthority) { 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 string exitSound; public LoopSoundDef loopSoundDef; 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 float effectCoefficient = 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 DemolisherBulletAttack bulletAttack; private Vector3 previousPosition; public virtual void Awake() { //IL_0041: 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_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_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_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_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_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) if ((Object)(object)projectileDamage == (Object)null) { projectileDamage = ((Component)this).GetComponent<ProjectileDamage>(); } if ((Object)(object)projectileController == (Object)null) { projectileController = ((Component)this).GetComponent<ProjectileController>(); } DemolisherBulletAttack demolisherBulletAttack = new DemolisherBulletAttack(); ((BulletAttack)demolisherBulletAttack).aimVector = aimVector; ((BulletAttack)demolisherBulletAttack).allowTrajectoryAimAssist = allowTrajectoryAimAssist; ((BulletAttack)demolisherBulletAttack).bulletCount = (uint)bulletCount; ((BulletAttack)demolisherBulletAttack).damage = projectileDamage.damage; ((BulletAttack)demolisherBulletAttack).damageColorIndex = projectileDamage.damageColorIndex; ((BulletAttack)demolisherBulletAttack).damageType = projectileDamage.damageType; ((BulletAttack)demolisherBulletAttack).falloffModel = falloffModel; ((BulletAttack)demolisherBulletAttack).force = projectileDamage.force; ((BulletAttack)demolisherBulletAttack).isCrit = projectileDamage.crit; ((BulletAttack)demolisherBulletAttack).maxSpread = maxSpread; ((BulletAttack)demolisherBulletAttack).minSpread = minSpread; ((BulletAttack)demolisherBulletAttack).origin = ((Component)this).transform.position; ((BulletAttack)demolisherBulletAttack).owner = projectileController.owner; ((BulletAttack)demolisherBulletAttack).radius = radius; ((BulletAttack)demolisherBulletAttack).maxDistance = maxDistance; ((BulletAttack)demolisherBulletAttack).procCoefficient = procCoefficient; ((BulletAttack)demolisherBulletAttack).sniper = sniper; ((BulletAttack)demolisherBulletAttack).smartCollision = smartCollision; ((BulletAttack)demolisherBulletAttack).weapon = ((Component)this).gameObject; ((BulletAttack)demolisherBulletAttack).trajectoryAimAssistMultiplier = trajectoryAimAssistMultiplier; ((BulletAttack)demolisherBulletAttack).spreadYawScale = spreadYawScale; ((BulletAttack)demolisherBulletAttack).spreadPitchScale = spreadPitchScale; ((BulletAttack)demolisherBulletAttack).hitEffectPrefab = hitEffectPrefab; ((BulletAttack)demolisherBulletAttack).tracerEffectPrefab = tracerEffectPrefab; ((BulletAttack)demolisherBulletAttack).hitMask = hitMask; ((BulletAttack)demolisherBulletAttack).stopperMask = stopperMask; demolisherBulletAttack.effectCoefficient = effectCoefficient; bulletAttack = demolisherBulletAttack; Extensions.SetIgnoreHitTargets((BulletAttack)(object)bulletAttack, true); } public virtual void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) previousPosition = ((Component)this).transform.position; if (Object.op_Implicit((Object)(object)loopSoundDef)) { Util.PlaySound(loopSoundDef.startSoundName, ((Component)this).gameObject); } } 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_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((BulletAttack)bulletAttack).allowTrajectoryAimAssist = allowTrajectoryAimAssist; ((BulletAttack)bulletAttack).bulletCount = (uint)bulletCount; ((BulletAttack)bulletAttack).falloffModel = falloffModel; ((BulletAttack)bulletAttack).maxSpread = maxSpread; ((BulletAttack)bulletAttack).minSpread = minSpread; ((BulletAttack)bulletAttack).sniper = sniper; ((BulletAttack)bulletAttack).smartCollision = smartCollision; ((BulletAttack)bulletAttack).trajectoryAimAssistMultiplier = trajectoryAimAssistMultiplier; ((BulletAttack)bulletAttack).spreadPitchScale = spreadPitchScale; ((BulletAttack)bulletAttack).spreadYawScale = spreadYawScale; ((BulletAttack)bulletAttack).procCoefficient = procCoefficient; ((BulletAttack)bulletAttack).procCoefficient = effectCoefficient; ((BulletAttack)bulletAttack).radius = radius; ((BulletAttack)bulletAttack).maxDistance = maxDistance; ((BulletAttack)bulletAttack).origin = ((Component)this).transform.position; ((BulletAttack)bulletAttack).damage = projectileDamage.damage; ((BulletAttack)bulletAttack).damageColorIndex = projectileDamage.damageColorIndex; ((BulletAttack)bulletAttack).damageType = projectileDamage.damageType; ((BulletAttack)bulletAttack).force = projectileDamage.force; ((BulletAttack)bulletAttack).isCrit = projectileDamage.crit; ((BulletAttack)bulletAttack).owner = projectileController.owner; if (localRotation) { ((BulletAttack)bulletAttack).aimVector = ((Component)this).transform.rotation * aimVector; } else { ((BulletAttack)bulletAttack).aimVector = aimVector; } updateStopwatch = 0f; } public virtual void FireBulletAttack() { if (NetworkServer.active) { ((BulletAttack)bulletAttack).Fire(); } fireStopwatch = 0f; } public virtual void Reset() { Extensions.ResetIgnoredHealthComponents((BulletAttack)(object)bulletAttack); resetStopwatch = 0f; } public virtual void IncrementTimers(float deltaTime) { resetStopwatch += deltaTime; fireStopwatch += deltaTime; updateStopwatch += deltaTime; } public virtual void OnDestroy() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)loopSoundDef)) { Util.PlaySound(loopSoundDef.stopSoundName, ((Component)this).gameObject); } if (!string.IsNullOrEmpty(exitSound)) { PointSoundManager.EmitSoundLocal((AkEventIdArg)exitSound, previousPosition); } } public virtual void FixedUpdate() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) previousPosition = ((Component)this).transform.position; 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 DemolisherSwordPillarBodyMover demolisherSwordPillarBodyMover; 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; private bool modified; private Stack<Vector3> moveVectors = new Stack<Vector3>(); private int count; private bool reversed; private float attackSpeed; public override void Awake() { base.Awake(); if ((Object)(object)characterController == (Object)null) { characterController = ((Component)this).GetComponent<CharacterController>(); } } public override void Start() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) base.Start(); 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) { continue; } attackSpeed = ((BaseState)fireTallSword).attackSpeedStat; if (Object.op_Implicit((Object)(object)fireTallSword.currentMeleeWeaponDef)) { attackSpeed *= fireTallSword.currentMeleeWeaponDef.attackSpeedMultiplier; } meleeWeapon = fireTallSword.currentMeleeWeaponDef; if (Object.op_Implicit((Object)(object)demolisherSwordPillarBodyMover) && Object.op_Implicit((Object)(object)demolisherSwordPillarBodyMover.vehicleSeat) && ((EntityState)fireTallSword).isAuthority && Object.op_Implicit((Object)(object)((EntityState)fireTallSword).characterBody) && Object.op_Implicit((Object)(object)((EntityState)fireTallSword).inputBank) && ((EntityState)fireTallSword).inputBank.skill1.down) { if (NetworkServer.active) { demolisherSwordPillarBodyMover.vehicleSeat.SetPassenger(((EntityState)fireTallSword).gameObject); } else { NetMessageExtensions.Send((INetMessage)(object)new VehicleSeatSetPassengerAuthority(((NetworkBehaviour)demolisherSwordPillarBodyMover.vehicleSeat).netIdentity, ((EntityState)fireTallSword).characterBody.networkIdentity), (NetworkDestination)2); } } if (Object.op_Implicit((Object)(object)meleeWeapon)) { fireTallSword.stateTaken = true; inputBank = ((EntityState)fireTallSword).inputBank; OneTimeMeleeModification(meleeWeapon); break; } } } public void OnEnable() { GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; } private void GlobalEventManager_onServerDamageDealt(DamageReport obj) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)demolisherSwordPillarBodyMover) && obj.damageInfo != null && Object.op_Implicit((Object)(object)obj.victimBody) && Object.op_Implicit((Object)(object)obj.damageInfo.inflictor) && (Object)(object)obj.damageInfo.inflictor == (Object)(object)((Component)this).gameObject && !demolisherSwordPillarBodyMover.hitCharacterBodies.Contains(obj.victimBody)) { demolisherSwordPillarBodyMover.AddHitBody(obj.victimBody, obj.victimBody.transform.position - ((Component)this).transform.position); } } public void OnDisable() { GlobalEventManager.onServerDamageDealt -= GlobalEventManager_onServerDamageDealt; } public void OneTimeMeleeModification(DemolisherBulletAttackWeaponDef demolisherBulletAttackWeaponDef) { object attack = this; demolisherBulletAttackWeaponDef.OneTimeModification(this, ref attack); } public override void UpdateBulletAttack() { base.UpdateBulletAttack(); object attack = bulletAttack; if ((Object)(object)meleeWeapon != (Object)null) { meleeWeapon.ModifyAttack(this, ref attack); } } public override void IncrementTimers(float deltaTime) { base.IncrementTimers(deltaTime); timer += deltaTime; } public override void FixedUpdate() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) base.FixedUpdate(); if (NetworkServer.active) { ((Component)this).transform.forward = Vector3.RotateTowards(((Component)this).transform.forward, Direction(), steering / 57.3f, 0f); if (!reversed && timer >= lifetime / attackSpeed / 2f) { Reverse(); } Vector3 val; if (reversed) { val = ((moveVectors.Count > 0) ? moveVectors.Pop() : ((Component)this).transform.position); } else { float num = velocityOverLifetime.Evaluate(timer / attackSpeed) * attackSpeed; val = (((Component)this).transform.forward * num + Physics.gravity * gravity) * Time.fixedDeltaTime; } if (reversed) { ((Component)this).transform.position = val; } else { characterController.Move(val); AddPath(); } if (timer >= lifetime / attackSpeed) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public void AddPath() { //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_0013: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; moveVectors.Push(position); } public void Reverse() { reversed = true; ((Component)this).gameObject.layer = LayerIndex.noCollision.intVal; } public Vector3 Direction() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_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_0044: 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 ((Component)this).transform.forward; } 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 DemolisherSwordPillarBodyMover : NetworkBehaviour { public struct HitBody { public Vector3 relativePosition; public CharacterBody characterBody; public EntityStateMachine[] entityStateMachines; } public VehicleSeat vehicleSeat; public Stack<HitBody> hitBodies = new Stack<HitBody>(); public Stack<CharacterBody> hitCharacterBodies = new Stack<CharacterBody>(); private static int kRpcRpcAddHitBody; [Server] public void AddHitBody(CharacterBody characterBody, Vector3 vector3) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogWarning((object)"[Server] function 'System.Void Demolisher.DemolisherSwordPillarBodyMover::AddHitBody(RoR2.CharacterBody,UnityEngine.Vector3)' called on client"); return; } if (Object.op_Implicit((Object)(object)characterBody.currentVehicle) && NetworkServer.active) { characterBody.currentVehicle.EjectPassenger(); } if (characterBody.hasEffectiveAuthority) { FinalAddHitBody(characterBody, vector3); } else { CallRpcAddHitBody(characterBody.networkIdentity, vector3); } } [ClientRpc] public void RpcAddHitBody(NetworkIdentity networkIdentity, Vector3 vector3) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)networkIdentity) && Util.HasEffectiveAuthority(networkIdentity)) { CharacterBody component = ((Component)networkIdentity).gameObject.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { FinalAddHitBody(component, vector3); } } } public void FinalAddHitBody(CharacterBody characterBody, Vector3 vector3) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown HitBody hitBody = default(HitBody); hitBody.characterBody = characterBody; hitBody.relativePosition = vector3; hitBody.entityStateMachines = ((Component)characterBody).gameObject.GetComponents<EntityStateMachine>(); HitBody hitBody2 = hitBody; hitBodies.Push(hitBody2); hitCharacterBodies.Push(characterBody); if (hitBody2.entityStateMachines != null) { EntityStateMachine[] entityStateMachines = hitBody2.entityStateMachines; foreach (EntityStateMachine val in entityStateMachines) { if (val != null) { val.SetNextState((EntityState)new Idle()); } } } HandleHitBody(hitBody2); } public void HandleHitBody(HitBody hitBody) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) CharacterBody characterBody = hitBody.characterBody; if (Object.op_Implicit((Object)(object)characterBody) && characterBody.hasEffectiveAuthority) { Vector3 val = ((Component)this).transform.position + hitBody.relativePosition; if (Object.op_Implicit((Object)(object)characterBody.characterMotor)) { ((BaseCharacterController)characterBody.characterMotor).Motor.SetPosition(val, true); characterBody.characterMotor.velocity = Vector3.zero; } else if (Object.op_Implicit((Object)(object)characterBody.rigidbody)) { characterBody.rigidbody.position = val; characterBody.rigidbody.velocity = Vector3.zero; } else { characterBody.transform.position = val; } } } public void OnEnable() { if (Object.op_Implicit((Object)(object)vehicleSeat)) { vehicleSeat.onPassengerEnter += VehicleSeat_onPassengerEnter; } } public void OnDestroy() { foreach (HitBody hitBody in hitBodies) { if (!Object.op_Implicit((Object)(object)hitBody.characterBody) || !Object.op_Implicit((Object)(object)hitBody.characterBody.healthComponent) || !hitBody.characterBody.healthComponent.alive || hitBody.entityStateMachines == null) { continue; } EntityStateMachine[] entityStateMachines = hitBody.entityStateMachines; foreach (EntityStateMachine val in entityStateMachines) { if (val != null) { val.SetNextStateToMain(); } } } } private void VehicleSeat_onPassengerEnter(GameObject obj) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)obj)) { return; } CharacterBody component = obj.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component)) { Vector3 localPosition = component.corePosition - component.footPosition; if (Object.op_Implicit((Object)(object)vehicleSeat.exitPosition)) { vehicleSeat.exitPosition.localPosition = localPosition; } if (Object.op_Implicit((Object)(object)vehicleSeat.seatPosition)) { vehicleSeat.seatPosition.localPosition = localPosition; } } } public void FixedUpdate() { foreach (HitBody hitBody in hitBodies) { HandleHitBody(hitBody); } } public void OnDisable() { if (Object.op_Implicit((Object)(object)vehicleSeat)) { vehicleSeat.onPassengerEnter -= VehicleSeat_onPassengerEnter; } } private void UNetVersion() { } protected static void InvokeRpcRpcAddHitBody(NetworkBehaviour obj, NetworkReader reader) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcAddHitBody called on server."); } else { ((DemolisherSwordPillarBodyMover)(object)obj).RpcAddHitBody(reader.ReadNetworkIdentity(), reader.ReadVector3()); } } public void CallRpcAddHitBody(NetworkIdentity networkIdentity, Vector3 vector3) { //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) //IL_0056: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { Debug.LogError((object)"RPC Function RpcAddHitBody called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcAddHitBody); val.Write(((Component)this).GetComponent<NetworkIdentity>().netId); val.Write(networkIdentity); val.Write(vector3); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcAddHitBody"); } static DemolisherSwordPillarBodyMover() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kRpcRpcAddHitBody = 1977598276; NetworkBehaviour.RegisterRpcDelegate(typeof(DemolisherSwordPillarBodyMover), kRpcRpcAddHitBody, new CmdDelegate(InvokeRpcRpcAddHitBody)); NetworkCRC.RegisterBehaviour("DemolisherSwordPillarBodyMover", 0); } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class DemolisherSwordPillarGhost : MonoBehaviour { public Transform swordPillarTransform; public ProjectileGhostController projectileGhostController; private DemolisherSwordPillarProjectile _demolisherSwordPillarProjectile; public GameObject expirationEffectPrefab; 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 = (BulletAttack)(object)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() { //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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_0051: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)swordPillarTransform)) { if (Object.op_Implicit((Object)(object)expirationEffectPrefab)) { EffectData val = new EffectData { origin = ((Component)this).transform.position, rotation = swordPillarTransform.rotation }; Extensions.SetScale(val, (Vector3?)swordPillarTransform.localScale); EffectManager.SpawnEffect(expirationEffectPrefab, val, false); } ((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 Start() { if (Object.op_Implicit((Object)(object)effectComponent) && effectComponent.effectData != null) { Init(effectComponent.effectData.genericFloat); } } 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) {