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 AccurateEnemies; using BepInEx; using BepInEx.Bootstrap; using Direseeker; using DireseekerMod.Components; using DireseekerMod.Modules; using DireseekerMod.States; using DireseekerMod.States.Missions.DireseekerEncounter; using DireseekerMod.States.Sun; using EntityStates; using EntityStates.LemurianBruiserMonster; using EntityStates.TitanMonster; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using RoR2; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2BepInExPack.GameAssetPaths; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using Zio.FileSystems; [assembly: AssemblyInformationalVersion("1.0.0+b5d804edd6932bf715798b80aeb79cbb6be06437")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: CompilationRelaxations(8)] [assembly: AssemblyProduct("Direseeker")] [assembly: AssemblyConfiguration("Debug")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyCompany("Direseeker")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyTitle("Direseeker")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public class DireseekerSunNetworkController : NetworkBehaviour { private static int kRpcRpcPosition; [ClientRpc] public void RpcPosition(GameObject networkedGameObject) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) Transform parent = ((Component)networkedGameObject.GetComponent().modelTransform).GetComponent().FindChild("Chest"); ((Component)this).transform.SetParent(parent); ((Component)this).transform.position = ((Component)this).transform.parent.position + Vector3.up * DireseekerSunController.sunHeight; } private void UNetVersion() { } protected static void InvokeRpcRpcPosition(NetworkBehaviour obj, NetworkReader reader) { if (!NetworkClient.active) { Debug.LogError((object)"RPC RpcPosition called on server."); } else { ((DireseekerSunNetworkController)(object)obj).RpcPosition(reader.ReadGameObject()); } } public void CallRpcPosition(GameObject networkedGameObject) { //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 RpcPosition called on client."); return; } NetworkWriter val = new NetworkWriter(); val.Write((short)0); val.Write((short)2); val.WritePackedUInt32((uint)kRpcRpcPosition); val.Write(((Component)this).GetComponent().netId); val.Write(networkedGameObject); ((NetworkBehaviour)this).SendRPCInternal(val, 0, "RpcPosition"); } static DireseekerSunNetworkController() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown kRpcRpcPosition = 34549306; NetworkBehaviour.RegisterRpcDelegate(typeof(DireseekerSunNetworkController), kRpcRpcPosition, new CmdDelegate(InvokeRpcRpcPosition)); NetworkCRC.RegisterBehaviour("DireseekerSunNetworkController", 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(TeamFilter))] public class DireseekerSunController : MonoBehaviour { private TeamFilter teamFilter; private GameObject ownerObj; private CharacterBody ownerBody; public BuffDef buffDef; public GameObject buffApplyEffect; public static float sunHeight; [SerializeField] public LoopSoundDef activeLoopDef; [SerializeField] public LoopSoundDef damageLoopDef; [SerializeField] public string stopSoundName; private float cycleInterval; private FixedTimeStamp previousCycle = FixedTimeStamp.negativeInfinity; private int cycleIndex; private List cycleTargets = new List(); private BullseyeSearch bullseyeSearch = new BullseyeSearch(); private bool isLocalPlayerDamaged; private bool crit; private void Awake() { teamFilter = ((Component)this).GetComponent(); } private void Start() { ownerObj = (Object.op_Implicit((Object)(object)((Component)this).GetComponent()) ? ((Component)this).GetComponent().ownerObject : ((Component)this).GetComponent().owner); ownerBody = ownerObj.GetComponent(); cycleInterval = 0.5f / ownerBody.attackSpeed; crit = ownerBody.RollCrit(); if (Object.op_Implicit((Object)(object)activeLoopDef)) { Util.PlaySound(activeLoopDef.startSoundName, ((Component)this).gameObject); } } private void OnDisable() { OnDestroy(); } private void OnDestroy() { if (Object.op_Implicit((Object)(object)activeLoopDef)) { Util.PlaySound(activeLoopDef.stopSoundName, ((Component)this).gameObject); } if (Object.op_Implicit((Object)(object)damageLoopDef)) { Util.PlaySound(damageLoopDef.stopSoundName, ((Component)this).gameObject); } if (stopSoundName != null) { Util.PlaySound(stopSoundName, ((Component)this).gameObject); } AkSoundEngine.StopPlayingID(3203163036u); } private void LateUpdate() { //IL_0028: 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_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((Component)this).transform.parent != (Object)null) { ((Component)this).transform.position = ((Component)this).transform.parent.position + Vector3.up * sunHeight; } } private void FixedUpdate() { //IL_0091: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { ServerFixedUpdate(); } if (!Object.op_Implicit((Object)(object)damageLoopDef)) { return; } bool flag = isLocalPlayerDamaged; isLocalPlayerDamaged = false; RaycastHit val2 = default(RaycastHit); foreach (HurtBox cycleTarget in cycleTargets) { CharacterBody val = null; if (Object.op_Implicit((Object)(object)cycleTarget) && Object.op_Implicit((Object)(object)cycleTarget.healthComponent)) { val = cycleTarget.healthComponent.body; } if (Object.op_Implicit((Object)(object)val) && (val.bodyFlags & 0x200) != 0 && val.hasEffectiveAuthority) { Vector3 position = ((Component)this).transform.position; Vector3 corePosition = val.corePosition; if (!Physics.Linecast(position, corePosition, ref val2, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { isLocalPlayerDamaged = true; } } } if (isLocalPlayerDamaged && !flag) { Util.PlaySound(damageLoopDef.startSoundName, ((Component)this).gameObject); } else if (!isLocalPlayerDamaged && flag) { Util.PlaySound(damageLoopDef.stopSoundName, ((Component)this).gameObject); } } private void ServerFixedUpdate() { //IL_0048: 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_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Invalid comparison between Unknown and I4 //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0139: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Expected O, but got Unknown //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Clamp01(((FixedTimeStamp)(ref previousCycle)).timeSince / cycleInterval); int num2 = ((num == 1f) ? cycleTargets.Count : Mathf.FloorToInt((float)cycleTargets.Count * num)); Vector3 position = ((Component)this).transform.position; Ray val2 = default(Ray); RaycastHit val3 = default(RaycastHit); while (cycleIndex < num2) { HurtBox val = cycleTargets[cycleIndex]; if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)val.healthComponent)) { CharacterBody body = val.healthComponent.body; if (Object.op_Implicit((Object)(object)ownerBody)) { bool flag = body.teamComponent.teamIndex == ownerBody.teamComponent.teamIndex; bool flag2 = flag && (!((Object)(object)body == (Object)(object)ownerBody) || body.GetBuffCount(Buffs.Overheat) <= 3); bool flag3 = (body.bodyFlags & 0x200) == 0 || (int)body.teamComponent.teamIndex != 1; if (flag2 && flag3) { Vector3 corePosition = body.corePosition; ((Ray)(ref val2))..ctor(position, corePosition - position); if (!Physics.Linecast(position, corePosition, ref val3, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { float num3 = Mathf.Max(1f, ((RaycastHit)(ref val3)).distance); body.AddTimedBuff(buffDef, 1f / num3); if (Object.op_Implicit((Object)(object)buffApplyEffect)) { EffectData val4 = new EffectData { origin = corePosition, rotation = Util.QuaternionSafeLookRotation(-((Ray)(ref val2)).direction), scale = body.bestFitRadius }; val4.SetHurtBoxReference(val); EffectManager.SpawnEffect(buffApplyEffect, val4, true); } int buffCount = body.GetBuffCount(buffDef); if (buffCount >= 2) { InflictDotInfo val5 = default(InflictDotInfo); val5.dotIndex = (DotIndex)1; val5.attackerObject = ownerObj; val5.victimObject = ((Component)body).gameObject; if (Object.op_Implicit((Object)(object)ownerBody) && Object.op_Implicit((Object)(object)ownerBody.inventory)) { TeamDef teamDef = TeamCatalog.GetTeamDef(ownerBody.teamComponent.teamIndex); float num4 = 1f; if (teamDef != null && teamDef.friendlyFireScaling > 0f) { num4 *= teamDef.friendlyFireScaling; } float num5 = ((!flag || !crit) ? 1 : 2); if ((body.teamComponent.teamIndex == ownerBody.teamComponent.teamIndex) & ((Object)(object)body != (Object)(object)ownerBody)) { num4 *= 8f; } val5.totalDamage = 0.01f * ownerBody.damage * (float)buffCount * num4 * num5; val5.damageMultiplier = 1f * num4; StrengthenBurnUtils.CheckDotForUpgrade(ownerBody.inventory, ref val5); } if (val5.totalDamage > 0f) { DotController.InflictDot(ref val5); } } } } } } cycleIndex++; } if (((FixedTimeStamp)(ref previousCycle)).timeSince >= cycleInterval) { previousCycle = FixedTimeStamp.now; cycleIndex = 0; cycleTargets.Clear(); SearchForTargets(cycleTargets); } } private void SearchForTargets(List dest) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) bullseyeSearch.searchOrigin = ((Component)this).transform.position; bullseyeSearch.minAngleFilter = 0f; bullseyeSearch.maxAngleFilter = 180f; bullseyeSearch.maxDistanceFilter = 180f; bullseyeSearch.filterByDistinctEntity = true; bullseyeSearch.sortMode = (SortMode)1; bullseyeSearch.viewer = null; bullseyeSearch.RefreshCandidates(); dest.AddRange(bullseyeSearch.GetResults()); } } namespace Direseeker { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.rob.Direseeker", "Direseeker", "2.0.711")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class DireseekerPlugin : BaseUnityPlugin { public static bool AccurateEnemiesLoaded = false; public static bool AccurateEnemiesCompat = true; public static PluginInfo pluginInfo; public void Awake() { AccurateEnemiesLoaded = Chainloader.PluginInfos.ContainsKey("com.Moffein.AccurateEnemies"); pluginInfo = ((BaseUnityPlugin)this).Info; Assets.PopulateAssets(); Tokens.RegisterLanguageTokens(); Prefabs.CreatePrefab(); States.RegisterStates(); Skills.RegisterSkills(); Projectiles.CreateProjectiles(); SpawnCards.CreateSpawnCards(); Assets.UpdateAssets(); new Hooks().ApplyHooks(); } } } namespace DireseekerMod.States { public class ChargeUltraFireball : BaseState { public static float baseDuration = 2f; private float duration; private GameObject chargeInstance; public override void OnEnter() { //IL_00a5: 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) ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); Transform modelTransform = ((EntityState)this).GetModelTransform(); Util.PlayAttackSpeedSound("sfx_direseeker_charge", ((EntityState)this).gameObject, base.attackSpeedStat); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild("MuzzleMouth"); if (Object.op_Implicit((Object)(object)val) && Object.op_Implicit((Object)(object)ChargeMegaFireball.chargeEffectPrefab)) { chargeInstance = Object.Instantiate(ChargeMegaFireball.chargeEffectPrefab, val.position, val.rotation); chargeInstance.transform.parent = val; ScaleParticleSystemDuration component2 = chargeInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.newDuration = duration; } } } } if (Object.op_Implicit((Object)(object)modelAnimator)) { ((EntityState)this).PlayCrossfade("Gesture, Additive", "ChargeMegaFireball", "ChargeMegaFireball.playbackRate", duration, 0.1f); } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeInstance)) { EntityState.Destroy((Object)(object)chargeInstance); } } public override void Update() { ((EntityState)this).Update(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { FireUltraFireball nextState = new FireUltraFireball(); ((EntityState)this).outer.SetNextState((EntityState)(object)nextState); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } public class Enrage : BaseState { private static Material onFireMat = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/matOnFire.mat").WaitForCompletion(); public static float baseEntryDuration = 1.5f; public static float baseExitDuration = 6f; private float stopwatch; private float entryDuration; private float exitDuration; private bool hasEnraged; private bool heck; private bool stoppedSound = false; private ChildLocator childLocator; private DireseekerController direController; public override void OnEnter() { ((BaseState)this).OnEnter(); stopwatch = 0f; entryDuration = baseEntryDuration / base.attackSpeedStat; exitDuration = baseExitDuration / base.attackSpeedStat; childLocator = ((EntityState)this).GetModelChildLocator(); direController = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)direController)) { direController.StartRageMode(); } if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(Buffs.ArmorBoost); } ((EntityState)this).PlayAnimation("Gesture, Override", "PrepFlamebreath", "PrepFlamebreath.playbackRate", entryDuration, 0f); Util.PlaySound("sfx_direseeker_woosh", ((EntityState)this).gameObject); } private void GrantItems() { if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.master.inventory)) { ((EntityState)this).characterBody.master.inventory.GiveItem(Items.AdaptiveArmor, 1); ((EntityState)this).characterBody.master.inventory.GiveItem(Items.Hoof, 3); ((EntityState)this).characterBody.master.inventory.GiveItem(Items.Syringe, 3); } } public override void OnExit() { ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.1f); ((EntityState)this).OnExit(); } private void SpawnSun() { if (NetworkServer.active) { GameObject val = Object.Instantiate(Assets.sunPrefab); val.GetComponent().ownerObject = ((EntityState)this).gameObject; NetworkServer.Spawn(val); val.GetComponent().CallRpcPosition(((EntityState)this).gameObject); } } public override void FixedUpdate() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); stopwatch += ((EntityState)this).GetDeltaTime(); if (stopwatch >= entryDuration && !hasEnraged) { hasEnraged = true; ((EntityState)this).characterBody.baseRegen = -20f; GrantItems(); if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator)) { ((EntityState)this).skillLocator.utility.SetSkillOverride((object)this, Skills.epicFlamePillarSkillDef, (SkillOverridePriority)3); } SpawnSun(); Util.PlaySound("sfx_direseeker_roar", ((EntityState)this).gameObject); GameObject val = Object.Instantiate(Assets.roarEffect); Transform val2 = ((BaseState)this).FindModelChild("MuzzleMouth"); val.transform.position = val2.position; val.transform.rotation = val2.rotation; val.transform.parent = val2; Object.Destroy((Object)(object)val, 30f); BlastAttack val3 = new BlastAttack(); val3.attacker = ((EntityState)this).gameObject; val3.inflictor = ((EntityState)this).gameObject; val3.teamIndex = (TeamIndex)0; val3.procCoefficient = 0f; val3.radius = 120f; val3.baseForce = 8000f; val3.bonusForce = Vector3.up * 200f; val3.baseDamage = 0f; val3.falloffModel = (FalloffModel)1; val3.damageColorIndex = (DamageColorIndex)0; val3.attackerFiltering = (AttackerFiltering)2; val3.damageType = DamageTypeCombo.op_Implicit((DamageType)32); val3.position = ((EntityState)this).transform.position; val3.Fire(); stoppedSound = true; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { CharacterModel component = ((Component)modelTransform).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { if (component.temporaryOverlays == null) { component.temporaryOverlays = new List(); } TemporaryOverlayInstance val4 = TemporaryOverlayManager.AddOverlay(((Component)component).gameObject); val4.duration = 1000f; val4.animateShaderAlpha = true; val4.alphaCurve = AnimationCurve.EaseInOut(0f, 10f, 1f, 10f); val4.destroyComponentOnEnd = false; val4.originalMaterial = onFireMat; val4.inspectorCharacterModel = component; val4.Start(); } } ((EntityState)this).PlayAnimation("Gesture, Override", "Flamebreath", "Flamebreath.playbackRate", exitDuration, 0f); } if (stopwatch >= entryDuration + 0.75f * exitDuration && !heck) { heck = true; ((EntityState)this).PlayCrossfade("Gesture, Override", "ExitFlamebreath", "ExitFlamebreath.playbackRate", 0.75f * exitDuration, 0.1f); if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Buffs.ArmorBoost); } ((EntityState)this).characterBody.baseArmor = -100f; ((EntityState)this).characterBody.RecalculateStats(); } if (stopwatch >= entryDuration + exitDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class FireUltraFireball : BaseState { public static int projectileCount = 15; public static float totalYawSpread = 25f; public static float baseDuration = 1.5f; public static float baseFireDuration = 0.25f; public static float damageCoefficient = 1.4f; public static float projectileSpeed = 80f; public static float force = 1200f; private float duration; private float fireDuration; private int projectilesFired; private DireseekerController direController; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / base.attackSpeedStat; fireDuration = baseFireDuration / base.attackSpeedStat; direController = ((EntityState)this).GetComponent(); if (Object.op_Implicit((Object)(object)direController)) { direController.FlameBurst(); } ((EntityState)this).PlayAnimation("Gesture, Additive", "FireMegaFireball", "FireMegaFireball.playbackRate", duration, 0f); Util.PlaySound("sfx_direseeker_fire", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special) && ((EntityState)this).inputBank.skill4.down) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); } string text = "MuzzleMouth"; if (((EntityState)this).isAuthority) { int num = Mathf.FloorToInt(((EntityState)this).fixedAge / fireDuration * (float)projectileCount); if (projectilesFired <= num && projectilesFired < projectileCount) { if (Object.op_Implicit((Object)(object)FireMegaFireball.muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(FireMegaFireball.muzzleflashEffectPrefab, ((EntityState)this).gameObject, text, false); } Ray val = ((BaseState)this).GetAimRay(); float num2 = projectileSpeed; if (DireseekerPlugin.AccurateEnemiesLoaded && DireseekerPlugin.AccurateEnemiesCompat) { val = PredictAimRay(val, num2); } Vector3 point = ((Ray)(ref val)).GetPoint(100f); RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(val, ref val2, 100f, LayerMask.op_Implicit(CommonMasks.bullet), (QueryTriggerInteraction)0)) { point = ((RaycastHit)(ref val2)).point; } Vector3 position = ((BaseState)this).FindModelChild(text).position; ((Ray)(ref val))..ctor(position, point - position); float num3 = (float)Mathf.FloorToInt((float)projectilesFired - (float)(projectileCount - 1) / 2f) / (float)(projectileCount - 1) * totalYawSpread; Vector3 val3 = Util.ApplySpread(((Ray)(ref val)).direction, 0f, 0f, 1f, 1f, num3, 0f); ProjectileManager.instance.FireProjectile(Projectiles.fireballPrefab, position, Util.QuaternionSafeLookRotation(val3), ((EntityState)this).gameObject, base.damageStat * damageCoefficient, force, ((BaseState)this).RollCrit(), (DamageColorIndex)0, (GameObject)null, num2, (DamageTypeCombo?)null); projectilesFired++; } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private Ray PredictAimRay(Ray aimRay, float speedOverride) { //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && !((EntityState)this).characterBody.isPlayerControlled && (AccurateEnemiesPlugin.alwaysAllowBosses || !AccurateEnemiesPlugin.eliteOnly || ((EntityState)this).characterBody.isElite)) { HurtBox masterAITargetHurtbox = Util.GetMasterAITargetHurtbox(((EntityState)this).characterBody.master); Ray result; if (speedOverride > 0f) { speedOverride = AccurateEnemiesPlugin.GetProjectileSimpleModifiers(speedOverride); result = Util.PredictAimray(aimRay, ((BaseState)this).GetTeam(), AccurateEnemiesPlugin.basePredictionAngle, speedOverride, masterAITargetHurtbox); } else { result = Util.PredictAimrayPS(aimRay, ((BaseState)this).GetTeam(), AccurateEnemiesPlugin.basePredictionAngle, Projectiles.fireballPrefab, masterAITargetHurtbox); } return result; } return aimRay; } } public class FlamePillar : BaseState { private enum SubState { Prep, FirePillar, Exit } private class Predictor { private enum ExtrapolationType { None, Linear, Polar } private Transform bodyTransform; private Transform targetTransform; private Vector3 targetPosition0; private Vector3 targetPosition1; private Vector3 targetPosition2; private int collectedPositions; public bool hasTargetTransform => Object.op_Implicit((Object)(object)targetTransform); public bool isPredictionReady => collectedPositions > 2; public Predictor(Transform bodyTransform) { this.bodyTransform = bodyTransform; } private void PushTargetPosition(Vector3 newTargetPosition) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) targetPosition2 = targetPosition1; targetPosition1 = targetPosition0; targetPosition0 = newTargetPosition; collectedPositions++; } public void SetTargetTransform(Transform newTargetTransform) { //IL_000c: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) targetTransform = newTargetTransform; targetPosition2 = (targetPosition1 = (targetPosition0 = newTargetTransform.position)); collectedPositions = 1; } public void Update() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)targetTransform)) { PushTargetPosition(targetTransform.position); } } public bool GetPredictedTargetPosition(float time, out Vector3 predictedPosition) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) Vector3 val = targetPosition1 - targetPosition2; Vector3 val2 = targetPosition0 - targetPosition1; val.y = 0f; val2.y = 0f; ExtrapolationType extrapolationType; if (val == Vector3.zero || val2 == Vector3.zero) { extrapolationType = ExtrapolationType.None; } else { Vector3 normalized = ((Vector3)(ref val)).normalized; Vector3 normalized2 = ((Vector3)(ref val2)).normalized; extrapolationType = ((Vector3.Dot(normalized, normalized2) > 0.98f) ? ExtrapolationType.Linear : ExtrapolationType.Polar); } float num = 1f / Time.fixedDeltaTime; predictedPosition = targetPosition0; switch (extrapolationType) { case ExtrapolationType.Polar: { Vector3 position = bodyTransform.position; Vector3 val3 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition2 - position)); Vector3 val4 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition1 - position)); Vector3 val5 = Vector2.op_Implicit(Util.Vector3XZToVector2XY(targetPosition0 - position)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; float num2 = Vector2.SignedAngle(Vector2.op_Implicit(val3), Vector2.op_Implicit(val4)) * num; float num3 = Vector2.SignedAngle(Vector2.op_Implicit(val4), Vector2.op_Implicit(val5)) * num; float num4 = (magnitude2 - magnitude) * num; float num5 = (magnitude3 - magnitude2) * num; float num6 = (num2 + num3) * 0.5f; float num7 = (num4 + num5) * 0.5f; float num8 = magnitude3 + num7 * time; if (num8 < 0f) { num8 = 0f; } Vector2 val6 = Util.RotateVector2(Vector2.op_Implicit(val5), num6 * time); val6 *= num8 * magnitude3; predictedPosition = position; predictedPosition.x += val6.x; predictedPosition.z += val6.y; break; } case ExtrapolationType.Linear: predictedPosition = targetPosition0 + val2 * (time * num); break; } RaycastHit val7 = default(RaycastHit); if (Physics.Raycast(new Ray(predictedPosition + Vector3.up * 1f, Vector3.down), ref val7, 200f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { predictedPosition = ((RaycastHit)(ref val7)).point; return true; } return false; } } private static Material onFireMat = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/matOnFire.mat").WaitForCompletion(); private static GameObject genericDelayBlast = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/GenericDelayBlast.prefab").WaitForCompletion(); private static GameObject magmaOrb = Addressables.LoadAssetAsync((object)"RoR2/Base/MagmaWorm/MagmaOrbExplosion.prefab").WaitForCompletion(); public static float entryDuration = 1.5f; public static float fireDuration = 0.1f; public static float exitDuration = 0.15f; public static float maxDistance = 128f; public static float trackingDuration = 0.85f; public static float pillarDamageCoefficient = 6f; public static float pillarForce = 1000f; public static float pillarVerticalForce = 500f; public static float pillarRadius = 5f; public static float pillarDelay = 1.3f; private bool hasShownPrediction; private bool predictionOk; protected Vector3 predictedTargetPosition; private AimAnimator aimAnimator; private GameObject chargeInstance; private float stopwatch; private SubState subState; private Predictor predictor; private static GameObject predictionEffect => Assets.flamePillarPredictionEffect; public override void OnEnter() { //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Expected O, but got Unknown //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); stopwatch = 0f; if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator)) { ChildLocator component = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent(); aimAnimator = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent(); if (Object.op_Implicit((Object)(object)aimAnimator)) { ((Behaviour)aimAnimator).enabled = true; } if (Object.op_Implicit((Object)(object)component)) { Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { CharacterModel component2 = ((Component)modelTransform).gameObject.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { if (component2.temporaryOverlays == null) { component2.temporaryOverlays = new List(); } TemporaryOverlayInstance val = TemporaryOverlayManager.AddOverlay(((Component)component2).gameObject); val.duration = 3f; val.animateShaderAlpha = true; val.alphaCurve = AnimationCurve.EaseInOut(0f, 1f, 1f, 0f); val.destroyComponentOnEnd = true; val.originalMaterial = onFireMat; val.inspectorCharacterModel = component2; val.Start(); } } Transform val2 = component.FindChild("MuzzleMouth"); if (Object.op_Implicit((Object)(object)val2) && Object.op_Implicit((Object)(object)ChargeMegaFireball.chargeEffectPrefab)) { chargeInstance = Object.Instantiate(ChargeMegaFireball.chargeEffectPrefab, val2.position, val2.rotation); chargeInstance.transform.parent = val2; ScaleParticleSystemDuration component3 = chargeInstance.GetComponent(); if (Object.op_Implicit((Object)(object)component3)) { component3.newDuration = 0.5f; } } } } ((EntityState)this).PlayAnimation("Gesture, Override", "PrepFlamebreath", "PrepFlamebreath.playbackRate", entryDuration, 0f); subState = SubState.Prep; Util.PlaySound("sfx_direseeker_woosh", ((EntityState)this).gameObject); if (NetworkServer.active) { BullseyeSearch val3 = new BullseyeSearch(); val3.teamMaskFilter = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)((EntityState)this).teamComponent)) { ((TeamMask)(ref val3.teamMaskFilter)).RemoveTeam(((EntityState)this).teamComponent.teamIndex); } val3.maxDistanceFilter = maxDistance; val3.maxAngleFilter = 90f; Ray aimRay = ((BaseState)this).GetAimRay(); val3.searchOrigin = ((Ray)(ref aimRay)).origin; val3.searchDirection = ((Ray)(ref aimRay)).direction; val3.filterByLoS = false; val3.sortMode = (SortMode)2; val3.RefreshCandidates(); HurtBox val4 = val3.GetResults().FirstOrDefault(); if (Object.op_Implicit((Object)(object)val4)) { predictor = new Predictor(((EntityState)this).transform); predictor.SetTargetTransform(((Component)val4).transform); } } } public override void OnExit() { ((EntityState)this).OnExit(); if (Object.op_Implicit((Object)(object)chargeInstance)) { EntityState.Destroy((Object)(object)chargeInstance); } ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.1f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special) && ((EntityState)this).inputBank.skill4.down) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); } stopwatch += ((EntityState)this).GetDeltaTime(); switch (subState) { case SubState.Prep: if (predictor != null) { predictor.Update(); } if (stopwatch <= trackingDuration) { if (predictor != null) { predictionOk = predictor.GetPredictedTargetPosition(pillarDelay, out predictedTargetPosition); } } else if (!hasShownPrediction) { hasShownPrediction = true; PlacePredictedAttack(); } if (stopwatch >= entryDuration) { predictor = null; subState = SubState.FirePillar; stopwatch = 0f; ((EntityState)this).PlayAnimation("Gesture, Override", "Flamebreath", "Flamebreath.playbackRate", entryDuration, 0f); if (Object.op_Implicit((Object)(object)chargeInstance)) { EntityState.Destroy((Object)(object)chargeInstance); } } break; case SubState.FirePillar: if (stopwatch >= fireDuration) { subState = SubState.Exit; stopwatch = 0f; } break; case SubState.Exit: if (stopwatch >= exitDuration) { ((EntityState)this).PlayCrossfade("Gesture, Override", "ExitFlamebreath", "ExitFlamebreath.playbackRate", fireDuration, 0.1f); if (((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } break; } } protected virtual void PlacePredictedAttack() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) PlaceSingleDelayBlast(predictedTargetPosition, 0f); } protected void PlaceSingleDelayBlast(Vector3 position, float delay) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) EffectManager.SpawnEffect(predictionEffect, new EffectData { origin = position, scale = pillarRadius, rotation = Quaternion.identity }, true); GameObject val = Object.Instantiate(genericDelayBlast, position, Quaternion.identity); DelayBlast component = val.GetComponent(); component.position = position; component.baseDamage = base.damageStat * pillarDamageCoefficient; component.baseForce = pillarForce; component.bonusForce = pillarVerticalForce * Vector3.up; component.attacker = ((EntityState)this).gameObject; component.radius = pillarRadius; component.crit = ((BaseState)this).RollCrit(); component.maxTimer = entryDuration - trackingDuration + delay; component.falloffModel = (FalloffModel)0; component.explosionEffect = magmaOrb; component.maxTimer = pillarDelay; component.damageType.damageSource = (DamageSource)4; val.GetComponent().teamIndex = TeamComponent.GetObjectTeam(component.attacker); } } public class FlamePillars : FlamePillar { protected override void PlacePredictedAttack() { //IL_000c: 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_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) RaycastHit val4 = default(RaycastHit); for (int i = 0; i < 2; i++) { int num = 0; Vector3 val = predictedTargetPosition; Vector3 val2 = Quaternion.Euler(0f, Random.Range(0f, 360f), 0f) * Vector3.forward; for (int j = -(2 * FireGoldFist.fistCount / 2); j < 2 * FireGoldFist.fistCount / 2; j++) { Vector3 val3 = val + val2 * FireGoldFist.distanceBetweenFists * (float)j; float num2 = 60f; if (Physics.Raycast(new Ray(val3 + Vector3.up * (num2 / 2f), Vector3.down), ref val4, num2, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { val3 = ((RaycastHit)(ref val4)).point; } PlaceSingleDelayBlast(val3, FireGoldFist.delayBetweenFists * (float)num); num++; } } } } public class Flamethrower : BaseState { private float lastUpdateTime; public static GameObject flamethrowerEffectPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/Lemurian/FlamebreathEffect.prefab").WaitForCompletion(); public static float baseEntryDuration = 0.5f; public static float baseExitDuration = 0.75f; public static float baseFlamethrowerDuration = 2.25f; private float tickDamageCoefficient; private float flamethrowerStopwatch; private float stopwatch; private float entryDuration; private float exitDuration; private float flamethrowerDuration; private bool hasBegunFlamethrower; private ChildLocator childLocator; private Transform flamethrowerEffectInstance; private Transform secondaryFlamethrowerEffectInstance; private Transform muzzleTransform; private bool isCrit; private const float flamethrowerEffectBaseDistance = 16f; public override void OnEnter() { ((BaseState)this).OnEnter(); lastUpdateTime = Time.time; stopwatch = 0f; entryDuration = baseEntryDuration / base.attackSpeedStat; exitDuration = baseExitDuration / base.attackSpeedStat; flamethrowerDuration = baseFlamethrowerDuration; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { ((EntityState)this).characterBody.SetAimTimer(entryDuration + flamethrowerDuration + 1f); } if (Object.op_Implicit((Object)(object)modelTransform)) { childLocator = ((Component)modelTransform).GetComponent(); ((Behaviour)((Component)modelTransform).GetComponent()).enabled = true; } float num = flamethrowerDuration * Flamebreath.tickFrequency; tickDamageCoefficient = Flamebreath.totalDamageCoefficient / num; if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { isCrit = Util.CheckRoll(base.critStat, ((EntityState)this).characterBody.master); } ((EntityState)this).PlayAnimation("Gesture, Override", "PrepFlamebreath", "PrepFlamebreath.playbackRate", entryDuration, 0f); } public override void OnExit() { Util.PlaySound(Flamebreath.endAttackSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Gesture, Override", "BufferEmpty", 0.1f); if (Object.op_Implicit((Object)(object)flamethrowerEffectInstance)) { EntityState.Destroy((Object)(object)((Component)flamethrowerEffectInstance).gameObject); } if (Object.op_Implicit((Object)(object)secondaryFlamethrowerEffectInstance)) { EntityState.Destroy((Object)(object)((Component)secondaryFlamethrowerEffectInstance).gameObject); } ((EntityState)this).OnExit(); } private void FireFlame(string muzzleString) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00f9: 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_010a: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)muzzleTransform)) { BulletAttack val = new BulletAttack { owner = ((EntityState)this).gameObject, weapon = ((EntityState)this).gameObject, origin = muzzleTransform.position, aimVector = muzzleTransform.forward, minSpread = 0f, maxSpread = Flamebreath.maxSpread, damage = tickDamageCoefficient * base.damageStat, force = Flamebreath.force, muzzleName = muzzleString, hitEffectPrefab = Flamebreath.impactEffectPrefab, isCrit = isCrit, radius = Flamebreath.radius * 3f, falloffModel = (FalloffModel)0, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask, procCoefficient = Flamebreath.procCoefficientPerTick, maxDistance = Flamebreath.maxDistance, smartCollision = true, damageType = DamageTypeCombo.op_Implicit((DamageType)8192) }; val.damageType.damageSource = (DamageSource)2; val.Fire(); } } public override void FixedUpdate() { //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); float num = Time.time - lastUpdateTime; if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special) && ((EntityState)this).inputBank.skill4.down) { ((EntityState)this).skillLocator.special.ExecuteIfReady(); } lastUpdateTime = Time.time; stopwatch += num; if (stopwatch >= entryDuration && stopwatch < entryDuration + flamethrowerDuration && !hasBegunFlamethrower) { hasBegunFlamethrower = true; Util.PlaySound(Flamebreath.startAttackSoundString, ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Gesture, Override", "Flamebreath", "Flamebreath.playbackRate", flamethrowerDuration, 0f); if (Object.op_Implicit((Object)(object)childLocator)) { muzzleTransform = childLocator.FindChild("MuzzleMouth"); if (Object.op_Implicit((Object)(object)Flamebreath.flamethrowerEffectPrefab)) { flamethrowerEffectInstance = Object.Instantiate(Flamebreath.flamethrowerEffectPrefab, muzzleTransform).transform; ((Component)flamethrowerEffectInstance).transform.localPosition = Vector3.zero; ((Component)flamethrowerEffectInstance).GetComponent().newDuration = flamethrowerDuration; } if (Object.op_Implicit((Object)(object)flamethrowerEffectPrefab)) { secondaryFlamethrowerEffectInstance = Object.Instantiate(flamethrowerEffectPrefab, muzzleTransform).transform; Transform transform = ((Component)secondaryFlamethrowerEffectInstance).transform; transform.localScale *= 1.25f; ((Component)secondaryFlamethrowerEffectInstance).transform.localPosition = Vector3.zero; ((Component)secondaryFlamethrowerEffectInstance).GetComponent().newDuration = flamethrowerDuration; } } } if (stopwatch >= entryDuration + flamethrowerDuration && hasBegunFlamethrower) { hasBegunFlamethrower = false; ((EntityState)this).PlayCrossfade("Gesture, Override", "ExitFlamebreath", "ExitFlamebreath.playbackRate", exitDuration, 0.1f); } if (hasBegunFlamethrower) { flamethrowerStopwatch += num; if (flamethrowerStopwatch > 1f / Flamebreath.tickFrequency) { flamethrowerStopwatch -= 1f / Flamebreath.tickFrequency; FireFlame("MuzzleCenter"); } } else if (Object.op_Implicit((Object)(object)flamethrowerEffectInstance)) { EntityState.Destroy((Object)(object)((Component)flamethrowerEffectInstance).gameObject); } if (stopwatch >= flamethrowerDuration + entryDuration + exitDuration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class SpawnState : EntityState { private float lastUpdateTime; public static float duration = 2.5f; private float effectStopwatch; public override void OnEnter() { ((EntityState)this).OnEnter(); lastUpdateTime = Time.time; ((EntityState)this).GetModelAnimator(); Util.PlaySound(SpawnState.spawnSoundString, ((EntityState)this).gameObject); Util.PlaySound("sfx_direseeker_spawn", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("Body", "Spawn", "Spawn.playbackRate", duration, 0f); EffectManager.SimpleMuzzleFlash(SpawnState.spawnEffectPrefab, ((EntityState)this).gameObject, "SpawnEffectOrigin", false); effectStopwatch = 0.7f; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); float num = Time.time - lastUpdateTime; lastUpdateTime = Time.time; effectStopwatch -= num; if ((effectStopwatch <= 0f) & (((EntityState)this).fixedAge < 0.5f * duration)) { PlaySpawnEffect(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { base.outer.SetNextStateToMain(); } } private void PlaySpawnEffect() { //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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected O, but got Unknown effectStopwatch = 0.1f; for (int i = 0; i <= 5; i++) { Vector3 origin = ((EntityState)this).characterBody.footPosition + Random.insideUnitSphere * 22f; origin.y = ((EntityState)this).characterBody.footPosition.y; EffectManager.SpawnEffect(SpawnState.spawnEffectPrefab, new EffectData { origin = origin, scale = 4f }, true); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)9; } } } namespace DireseekerMod.States.Sun { public abstract class SunBase : BaseState { protected DireseekerSunController sunController { get; private set; } protected Transform vfxRoot { get; private set; } protected virtual bool shouldEnableSunController => false; public virtual bool shouldSpawnEffect => true; protected abstract float desiredVfxScale { get; } public override void OnEnter() { ((BaseState)this).OnEnter(); sunController = ((EntityState)this).GetComponent(); ((Behaviour)sunController).enabled = shouldEnableSunController; vfxRoot = ((EntityState)this).transform.Find("VfxRoot"); SetVfxScale(desiredVfxScale); } public override void Update() { ((EntityState)this).Update(); SetVfxScale(desiredVfxScale); } private void SetVfxScale(float newScale) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) newScale = Mathf.Max(newScale, 0.01f); if (Object.op_Implicit((Object)(object)vfxRoot) && ((Component)vfxRoot).transform.localScale.x != newScale) { ((Component)vfxRoot).transform.localScale = new Vector3(newScale, newScale, newScale); } } } public class SunDeath : SunBase { public static float baseDuration; private float duration; public override bool shouldSpawnEffect => false; protected override float desiredVfxScale => 1f - Mathf.Clamp01(((EntityState)this).age / duration); public override void OnEnter() { base.OnEnter(); duration = baseDuration; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge >= duration) { NetworkServer.Destroy(((EntityState)this).gameObject); } } } public class SunMain : SunBase { private GenericOwnership ownership; protected override bool shouldEnableSunController => true; public override bool shouldSpawnEffect => false; protected override float desiredVfxScale => 1f; public override void OnEnter() { base.OnEnter(); ownership = ((EntityState)this).GetComponent(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !Object.op_Implicit((Object)(object)ownership.ownerObject)) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SunDeath()); } } } public class SunSpawn : SunBase { public static float baseDuration = 0.6f; private float duration; protected override float desiredVfxScale => Mathf.Clamp01(((EntityState)this).age / duration); public override void OnEnter() { base.OnEnter(); duration = baseDuration; } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextState((EntityState)(object)new SunMain()); } } } } namespace DireseekerMod.States.Missions.DireseekerEncounter { public class Listening : EntityState { public static float delayBeforeBeginningEncounter = 3f; public static int buttonsPressedToTriggerEncounter = 4; private ScriptedCombatEncounter scriptedCombatEncounter; private List buttonList = new List(); private const float delayBeforeRegisteringButtons = 2f; private bool hasRegisteredButtons; private int previousPressedButtonCount; private bool beginEncounterCountdown; private float encounterCountdown; public override void OnEnter() { ((EntityState)this).OnEnter(); scriptedCombatEncounter = ((EntityState)this).GetComponent(); } public override void FixedUpdate() { //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown //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_0108: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); if (!NetworkServer.active) { return; } if (((EntityState)this).fixedAge >= 2f) { RegisterButtons(); } if (!hasRegisteredButtons) { return; } int num = 0; for (int i = 0; i < buttonList.Count; i++) { if (buttonList[i].isPressedServer) { num++; } } int num2 = buttonsPressedToTriggerEncounter - 1; if (previousPressedButtonCount < num2 && num >= num2) { Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "DIRESEEKER_SPAWN_WARNING" }); } if (num >= buttonsPressedToTriggerEncounter && !beginEncounterCountdown) { encounterCountdown = delayBeforeBeginningEncounter; beginEncounterCountdown = true; Chat.SendBroadcastChat((ChatMessageBase)new SimpleChatMessage { baseToken = "DIRESEEKER_SPAWN_BEGIN" }); } if (beginEncounterCountdown) { encounterCountdown -= Time.fixedDeltaTime; if (encounterCountdown <= 0f) { scriptedCombatEncounter.BeginEncounter(); base.outer.SetNextState((EntityState)new Idle()); } } previousPressedButtonCount = num; } private void RegisterButtons() { if (!hasRegisteredButtons) { DireseekerButtonController[] array = Object.FindObjectsOfType(); foreach (DireseekerButtonController item in array) { buttonList.Add(item); } hasRegisteredButtons = true; } } } } namespace DireseekerMod.Modules { public static class Assets { public static GameObject roarEffect; public static GameObject sunPrefab; public static AssetBundle mainAssetBundle; public static AssetBundle altAssetBundle; public static Texture bossPortrait; public static Texture charPortrait; public static GameObject flamePillarPredictionEffect; public static GameObject direseekerEncounter; public static GameObject direseekerButton; public static void PopulateAssets() { //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0507: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_06c2: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_063f: Unknown result type (might be due to invalid IL or missing references) //IL_0644: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_0621: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_05fa: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Direseeker.direseeker"); mainAssetBundle = AssetBundle.LoadFromStream(stream); } if ((Object)(object)altAssetBundle == (Object)null) { using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Direseeker.direseeker2"); altAssetBundle = AssetBundle.LoadFromStream(stream2); } using (Stream stream3 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Direseeker.direseeker_bank2.bnk")) { byte[] array = new byte[stream3.Length]; stream3.Read(array, 0, array.Length); SoundBanks.Add(array); } bossPortrait = (Texture)(object)altAssetBundle.LoadAsset("texDireseekerIcon").texture; charPortrait = (Texture)(object)mainAssetBundle.LoadAsset("texDireseekerPlayerIcon").texture; direseekerEncounter = mainAssetBundle.LoadAsset("BossEncounter"); direseekerEncounter.AddComponent(); PrefabAPI.RegisterNetworkPrefab(direseekerEncounter); direseekerButton = mainAssetBundle.LoadAsset("DireseekerButton"); Shader shader = Addressables.LoadAssetAsync((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion(); Material material = ((Renderer)direseekerButton.GetComponentInChildren()).material; material.shader = shader; direseekerButton.AddComponent(); direseekerButton.AddComponent(); PrefabAPI.RegisterNetworkPrefab(direseekerButton); roarEffect = altAssetBundle.LoadAsset("DireseekerRoar"); ((Renderer)((Component)roarEffect.transform.Find("Nova")).GetComponent()).material = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/matTeamAreaIndicatorFullMonster.mat").WaitForCompletion(); ((Renderer)((Component)roarEffect.transform.Find("Distortion")).GetComponent()).material = Addressables.LoadAssetAsync((object)"RoR2/Base/Common/VFX/matDistortion.mat").WaitForCompletion(); GameObject gameObject = ((Component)roarEffect.transform.Find("PP")).gameObject; gameObject.layer = 20; PostProcessVolume val = gameObject.AddComponent(); val.sharedProfile = Addressables.LoadAssetAsync((object)"RoR2/GlobalContent/ppLocalBlur.asset").WaitForCompletion(); val.blendDistance = 120f; val.priority = 6f; val.weight = 1f; val.isGlobal = false; PostProcessDuration val2 = gameObject.AddComponent(); val2.ppVolume = val; val2.ppWeightCurve = Addressables.LoadAssetAsync((object)"RoR2/Base/ImpBoss/ImpBossBlink.prefab").WaitForCompletion().GetComponentInChildren() .ppWeightCurve; val2.maxDuration = 5f; val2.destroyOnEnd = true; SphereCollider val3 = gameObject.AddComponent(); ((Collider)val3).contactOffset = 0.01f; ((Collider)val3).isTrigger = true; val3.radius = 120f; flamePillarPredictionEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/DLC2/Items/MeteorAttackOnHighDamage/RunicMeteorStrikePredictionEffect.prefab").WaitForCompletion(), "DireseekerPredictionEffect", true); flamePillarPredictionEffect.GetComponent().duration = FlamePillar.pillarDelay; AnimateShaderAlpha[] componentsInChildren = flamePillarPredictionEffect.GetComponentsInChildren(true); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].timeMax = FlamePillar.pillarDelay; } ObjectScaleCurve[] componentsInChildren2 = flamePillarPredictionEffect.GetComponentsInChildren(true); for (int j = 0; j < componentsInChildren2.Length; j++) { componentsInChildren2[j].timeMax = FlamePillar.pillarDelay; } ContentAddition.AddEffect(flamePillarPredictionEffect); sunPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Grandparent/GrandParentSun.prefab").WaitForCompletion(), "DireseekerSun", true); DireseekerSunController direseekerSunController = sunPrefab.AddComponent(); GrandParentSunController component = sunPrefab.GetComponent(); direseekerSunController.buffApplyEffect = component.buffApplyEffect; direseekerSunController.buffDef = component.buffDef; direseekerSunController.activeLoopDef = component.activeLoopDef; direseekerSunController.damageLoopDef = component.damageLoopDef; direseekerSunController.stopSoundName = component.stopSoundName; Object.DestroyImmediate((Object)(object)component); sunPrefab.AddComponent(); Object.DestroyImmediate((Object)(object)sunPrefab.GetComponent()); sunPrefab.AddComponent(); EntityStateMachine component2 = sunPrefab.GetComponent(); ((Object)component2).name = "Body"; component2.initialStateType = new SerializableEntityStateType(typeof(SunSpawn)); sunPrefab.GetComponent().stateMachines[0] = component2; sunPrefab.transform.localScale = Vector3.one * 1f; Light component3 = ((Component)sunPrefab.transform.Find("VfxRoot/LightSpinner/LightSpinner/Point Light")).GetComponent(); component3.intensity *= 0.1f; ((Component)sunPrefab.transform.Find("VfxRoot/LightSpinner/LightSpinner/Point Light")).GetComponent().range = 200f; Transform transform = ((Component)sunPrefab.transform.Find("VfxRoot/LightSpinner")).transform; transform.localPosition += Vector3.up * 5f; ((Component)sunPrefab.transform.Find("VfxRoot/Mesh")).gameObject.SetActive(false); Transform val4 = sunPrefab.transform.Find("VfxRoot/Particles"); ParticleSystem[] componentsInChildren3 = ((Component)val4).GetComponentsInChildren(true); foreach (ParticleSystem val5 in componentsInChildren3) { Debug.LogWarning((object)val5); if (((Object)val5).name == "Donut") { continue; } MainModule main = val5.main; MinMaxGradient startColor = ((MainModule)(ref main)).startColor; if (((MinMaxGradient)(ref startColor)).gradient != null) { int num = 0; while (true) { int num2 = num; startColor = ((MainModule)(ref main)).startColor; if (num2 < ((MinMaxGradient)(ref startColor)).gradient.alphaKeys.Length) { startColor = ((MainModule)(ref main)).startColor; GradientAlphaKey val6 = ((MinMaxGradient)(ref startColor)).gradient.alphaKeys[num]; val6.alpha *= 0.2f; startColor = ((MainModule)(ref main)).startColor; ((MinMaxGradient)(ref startColor)).gradient.alphaKeys[num] = val6; num++; continue; } break; } } else { MinMaxGradient startColor2 = ((MainModule)(ref main)).startColor; Color color = ((MinMaxGradient)(ref startColor2)).color; color.a *= 0.2f; ((MinMaxGradient)(ref startColor2)).color = color; ((MainModule)(ref main)).startColor = startColor2; } } Object.DestroyImmediate((Object)(object)((Component)sunPrefab.transform.Find("VfxRoot/Mesh/SunMesh/MoonMesh")).gameObject); ParticleSystem component4 = ((Component)sunPrefab.transform.Find("VfxRoot/Particles/Sparks")).GetComponent(); EmissionModule emission = component4.emission; ((EmissionModule)(ref emission)).enabled = false; ParticleSystem component5 = ((Component)sunPrefab.transform.Find("VfxRoot/Particles/Goo, Drip")).GetComponent(); EmissionModule emission2 = component5.emission; ((EmissionModule)(ref emission2)).enabled = false; } public static void UpdateAssets() { //IL_0062: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) GameObject gameObject = ((Component)direseekerEncounter.transform.GetChild(0)).gameObject; gameObject.AddComponent(); PrefabAPI.RegisterNetworkPrefab(gameObject); ScriptedCombatEncounter val = gameObject.AddComponent(); direseekerEncounter.transform.GetChild(0).GetChild(1).Translate(0f, 1f, 0f); val.spawns = (SpawnInfo[])(object)new SpawnInfo[1] { new SpawnInfo { explicitSpawnPosition = direseekerEncounter.transform.GetChild(0).GetChild(0), spawnCard = (SpawnCard)(object)SpawnCards.bossSpawnCard } }; val.randomizeSeed = false; val.teamIndex = (TeamIndex)2; val.spawnOnStart = false; val.grantUniqueBonusScaling = true; BossGroup val2 = gameObject.AddComponent(); val2.bossDropChance = 1f; val2.dropPosition = direseekerEncounter.transform.GetChild(0).GetChild(1); val2.forceTier3Reward = true; val2.scaleRewardsByPlayerCount = true; val2.shouldDisplayHealthBarOnHud = true; CombatSquad val3 = gameObject.AddComponent(); EntityStateMachine val4 = gameObject.AddComponent(); val4.initialStateType = new SerializableEntityStateType(typeof(Listening)); val4.mainStateType = new SerializableEntityStateType(typeof(Listening)); } private static GameObject LoadEffect(string resourceName, string soundName) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) GameObject val = mainAssetBundle.LoadAsset(resourceName); val.AddComponent().duration = 12f; val.AddComponent(); val.AddComponent().vfxPriority = (VFXPriority)2; EffectComponent val2 = val.AddComponent(); val2.applyScale = false; val2.effectIndex = (EffectIndex)(-1); val2.parentToReferencedTransform = true; val2.positionAtReferencedTransform = true; val2.soundName = soundName; ContentAddition.AddEffect(val); return val; } } public class Hooks { public Vector3[] buttonPosition; public Vector3[] buttonRotation; private void InitButtonPositions() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) buttonPosition = (Vector3[])(object)new Vector3[7] { new Vector3(2f, -140.5f, -439f), new Vector3(110f, -179.2f, -150f), new Vector3(203f, -75f, -195.5f), new Vector3(51f, -86f, -200.6f), new Vector3(-154f, -153f, -103.6f), new Vector3(-0.5f, -135.5f, -12.5f), new Vector3(-37.5f, -127f, -287.8f) }; buttonRotation = (Vector3[])(object)new Vector3[7] { new Vector3(0f, 60f, 5f), new Vector3(0f, 45f, 0f), new Vector3(290f, 340f, 0f), new Vector3(270f, 0f, 0f), new Vector3(270f, 0f, 0f), new Vector3(0f, 0f, 0f), new Vector3(0f, 90f, 110f) }; } public void ApplyHooks() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown InitButtonPositions(); SceneDirector.Start += (hook_Start)delegate(orig_Start orig, SceneDirector self) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "dampcavesimple") { Object.Destroy((Object)(object)((Component)GameObject.Find("HOLDER: Newt Statues and Preplaced Chests").transform.Find("GoldChest")).gameObject); for (int i = 0; i < buttonPosition.Length; i++) { GameObject val = Object.Instantiate(Assets.direseekerButton); val.transform.position = buttonPosition[i]; val.transform.rotation = Quaternion.Euler(buttonRotation[i]); NetworkServer.Spawn(val); } GameObject val2 = Object.Instantiate(Assets.direseekerEncounter); NetworkServer.Spawn(val2); } } orig.Invoke(self); }; } } public static class Prefabs { public static GameObject direseekerBodyPrefab; public static GameObject masterPrefab; public static void CreatePrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Unknown result type (might be due to invalid IL or missing references) //IL_0394: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04ac: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Expected O, but got Unknown //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_0528: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_0636: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Unknown result type (might be due to invalid IL or missing references) //IL_0680: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) direseekerBodyPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/LemurianBruiserBody.prefab").WaitForCompletion(), "DireseekerBody", true); Rigidbody component = direseekerBodyPrefab.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.mass = 900f; } Object.Destroy((Object)(object)direseekerBodyPrefab.GetComponent()); CharacterBody component2 = direseekerBodyPrefab.GetComponent(); ((Object)component2).name = "DireseekerBossBody"; component2.baseNameToken = "DIRESEEKER_BOSS_BODY_NAME"; component2.subtitleNameToken = "DIRESEEKER_BOSS_BODY_SUBTITLE"; component2.baseMoveSpeed = 11f; component2.baseMaxHealth = 2800f; component2.levelMaxHealth = component2.baseMaxHealth * 0.3f; component2.baseDamage = 20f; component2.levelDamage = component2.baseDamage * 0.2f; component2.isChampion = true; component2.portraitIcon = Assets.bossPortrait; component2.bodyFlags = (BodyFlags)(component2.bodyFlags | 0x80000); direseekerBodyPrefab.GetComponent().deathSound = "sfx_direseeker_death"; Transform modelBaseTransform = direseekerBodyPrefab.GetComponent().modelBaseTransform; modelBaseTransform.localScale *= 1.5f; direseekerBodyPrefab.GetComponent().modelBaseTransform.localPosition = Vector3.up * -5.5f; KinematicCharacterMotor[] componentsInChildren = direseekerBodyPrefab.GetComponentsInChildren(); foreach (KinematicCharacterMotor val in componentsInChildren) { val.SetCapsuleDimensions(val.Capsule.radius * 1.5f, val.Capsule.height * 1.5f, 1.5f); } GameObject val2 = PrefabAPI.InstantiateClone(Assets.mainAssetBundle.LoadAsset("DireHorn"), "DireseekerHorn", false); GameObject val3 = PrefabAPI.InstantiateClone(Assets.mainAssetBundle.LoadAsset("DireHornBroken"), "DireseekerHornBroken", false); GameObject val4 = PrefabAPI.InstantiateClone(Assets.mainAssetBundle.LoadAsset("DireseekerRageFlame"), "DireseekerRageFlame", false); GameObject val5 = PrefabAPI.InstantiateClone(Assets.mainAssetBundle.LoadAsset("DireseekerBurstFlame"), "DireseekerBurstFlame", false); ChildLocator componentInChildren = direseekerBodyPrefab.GetComponentInChildren(); val2.transform.SetParent(componentInChildren.FindChild("Head")); val2.transform.localPosition = new Vector3(-2.5f, 1f, -0.5f); val2.transform.localRotation = Quaternion.Euler(new Vector3(45f, 0f, 90f)); val2.transform.localScale = new Vector3(100f, 100f, 100f); Shader shader = Addressables.LoadAssetAsync((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion(); Material material = ((Renderer)val2.GetComponentInChildren()).material; material.shader = shader; val3.transform.SetParent(componentInChildren.FindChild("Head")); val3.transform.localPosition = new Vector3(2.5f, 1f, -0.5f); val3.transform.localRotation = Quaternion.Euler(new Vector3(45f, 0f, 90f)); val3.transform.localScale = new Vector3(100f, -100f, 100f); val4.transform.SetParent(componentInChildren.FindChild("Head")); val4.transform.localPosition = new Vector3(0f, 1f, 0f); val4.transform.localRotation = Quaternion.Euler(new Vector3(270f, 180f, 0f)); val4.transform.localScale = new Vector3(4f, 4f, 4f); val5.transform.SetParent(componentInChildren.FindChild("Head")); val5.transform.localPosition = new Vector3(0f, 1f, 0f); val5.transform.localRotation = Quaternion.Euler(new Vector3(270f, 180f, 0f)); val5.transform.localScale = new Vector3(6f, 6f, 6f); DireseekerController direseekerController = direseekerBodyPrefab.AddComponent(); direseekerController.burstFlame = val5.GetComponent(); direseekerController.rageFlame = val4.GetComponent(); direseekerController.rageFlame.Stop(); CharacterModel componentInChildren2 = direseekerBodyPrefab.GetComponentInChildren(); ((Object)((Component)componentInChildren2).gameObject).name = "mdlDireseeker"; Material val6 = new Material(Addressables.LoadAssetAsync((object)RoR2_Base_Lemurian.matLemurianBruiser_mat).WaitForCompletion()); ((Object)val6).name = "matDireseekerMesh"; val6.SetTexture("_MainTex", Assets.mainAssetBundle.LoadAsset("matDireseeker").GetTexture("_MainTex")); val6.SetTexture("_EmTex", Assets.mainAssetBundle.LoadAsset("matDireseeker").GetTexture("_EmissionMap")); val6.SetFloat("_EmPower", 50f); SkinDef val7 = Addressables.LoadAssetAsync((object)RoR2_Base_LemurianBruiser.skinLemurianBruiserBodyDefault_asset).WaitForCompletion(); SkinDef val8 = Object.Instantiate(val7); SkinDefParams val9 = Addressables.LoadAssetAsync((object)RoR2_Base_LemurianBruiser_skinLemurianBruiserBodyDefault.params_asset).WaitForCompletion(); val8.skinDefParams = Object.Instantiate(val9); val8.skinDefParamsAddress = new AssetReferenceT(""); val8.rootObject = ((Component)componentInChildren2).gameObject; Renderer component3 = ((Component)((Component)componentInChildren2).transform.Find("LemurianBruiserMesh")).GetComponent(); RendererInfo[] rendererInfos = (RendererInfo[])(object)new RendererInfo[3] { new RendererInfo { renderer = component3, defaultMaterial = val6, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }, new RendererInfo { renderer = (Renderer)(object)val2.GetComponentInChildren(), defaultMaterial = material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = true }, new RendererInfo { renderer = (Renderer)(object)val3.GetComponentInChildren(), defaultMaterial = material, defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = true } }; val8.skinDefParams.rendererInfos = rendererInfos; val8.skinDefParams.meshReplacements[0].renderer = component3; ((Component)componentInChildren2).gameObject.GetComponent().skins[0] = val8; masterPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/LemurianBruiserMaster.prefab").WaitForCompletion(), "DireseekerBossMaster", true); CharacterMaster component4 = masterPrefab.GetComponent(); component4.bodyPrefab = direseekerBodyPrefab; component4.isBoss = true; CreateAI(); ContentAddition.AddBody(direseekerBodyPrefab); ContentAddition.AddMaster(masterPrefab); } private static void CreateAI() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) AISkillDriver[] componentsInChildren = masterPrefab.GetComponentsInChildren(); foreach (AISkillDriver val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } AISkillDriver val2 = masterPrefab.AddComponent(); val2.customName = "Enrage"; val2.requireSkillReady = true; val2.movementType = (MovementType)0; val2.moveTargetType = (TargetType)0; val2.selectionRequiresTargetLoS = false; val2.activationRequiresAimConfirmation = false; val2.activationRequiresTargetLoS = false; val2.maxDistance = float.PositiveInfinity; val2.minDistance = 0f; val2.aimType = (AimType)1; val2.ignoreNodeGraph = false; val2.moveInputScale = 1f; val2.driverUpdateTimerOverride = -1f; val2.buttonPressType = (ButtonPressType)0; val2.minTargetHealthFraction = float.NegativeInfinity; val2.maxTargetHealthFraction = float.PositiveInfinity; val2.minUserHealthFraction = float.NegativeInfinity; val2.maxUserHealthFraction = 0.4f; val2.skillSlot = (SkillSlot)3; AISkillDriver val3 = masterPrefab.AddComponent(); val3.customName = "FlamePillar"; val3.requireSkillReady = true; val3.movementType = (MovementType)1; val3.moveTargetType = (TargetType)0; val3.selectionRequiresTargetLoS = true; val3.activationRequiresAimConfirmation = true; val3.activationRequiresTargetLoS = false; val3.maxDistance = 120f; val3.minDistance = 5f; val3.aimType = (AimType)1; val3.ignoreNodeGraph = false; val3.moveInputScale = 1f; val3.driverUpdateTimerOverride = -1f; val3.buttonPressType = (ButtonPressType)0; val3.minTargetHealthFraction = float.NegativeInfinity; val3.maxTargetHealthFraction = float.PositiveInfinity; val3.minUserHealthFraction = float.NegativeInfinity; val3.maxUserHealthFraction = 0.8f; val3.skillSlot = (SkillSlot)2; AISkillDriver val4 = masterPrefab.AddComponent(); val4.customName = "Flamethrower"; val4.requireSkillReady = true; val4.movementType = (MovementType)1; val4.moveTargetType = (TargetType)0; val4.selectionRequiresTargetLoS = true; val4.activationRequiresAimConfirmation = true; val4.activationRequiresTargetLoS = false; val4.maxDistance = 20f; val4.minDistance = 0f; val4.aimType = (AimType)1; val4.ignoreNodeGraph = false; val4.moveInputScale = 1f; val4.driverUpdateTimerOverride = -1f; val4.buttonPressType = (ButtonPressType)0; val4.minTargetHealthFraction = float.NegativeInfinity; val4.maxTargetHealthFraction = float.PositiveInfinity; val4.minUserHealthFraction = float.NegativeInfinity; val4.maxUserHealthFraction = float.PositiveInfinity; val4.skillSlot = (SkillSlot)1; AISkillDriver val5 = masterPrefab.AddComponent(); val5.customName = "RunAndShoot"; val5.requireSkillReady = true; val5.movementType = (MovementType)1; val5.moveTargetType = (TargetType)0; val5.selectionRequiresTargetLoS = true; val5.activationRequiresAimConfirmation = true; val5.activationRequiresTargetLoS = false; val5.maxDistance = 50f; val5.minDistance = 0f; val5.aimType = (AimType)1; val5.ignoreNodeGraph = false; val5.moveInputScale = 1f; val5.driverUpdateTimerOverride = 2f; val5.buttonPressType = (ButtonPressType)0; val5.minTargetHealthFraction = float.NegativeInfinity; val5.maxTargetHealthFraction = float.PositiveInfinity; val5.minUserHealthFraction = float.NegativeInfinity; val5.maxUserHealthFraction = float.PositiveInfinity; val5.skillSlot = (SkillSlot)0; AISkillDriver val6 = masterPrefab.AddComponent(); val6.customName = "StopAndShoot"; val6.requireSkillReady = true; val6.movementType = (MovementType)0; val6.moveTargetType = (TargetType)0; val6.selectionRequiresTargetLoS = true; val6.activationRequiresAimConfirmation = true; val6.activationRequiresTargetLoS = false; val6.maxDistance = 100f; val6.minDistance = 50f; val6.aimType = (AimType)1; val6.ignoreNodeGraph = false; val6.moveInputScale = 1f; val6.driverUpdateTimerOverride = 2f; val6.buttonPressType = (ButtonPressType)0; val6.minTargetHealthFraction = float.NegativeInfinity; val6.maxTargetHealthFraction = float.PositiveInfinity; val6.minUserHealthFraction = float.NegativeInfinity; val6.maxUserHealthFraction = float.PositiveInfinity; val6.skillSlot = (SkillSlot)0; AISkillDriver val7 = masterPrefab.AddComponent(); val7.customName = "Chase"; val7.movementType = (MovementType)1; val7.moveTargetType = (TargetType)0; val7.activationRequiresAimConfirmation = false; val7.activationRequiresTargetLoS = false; val7.maxDistance = float.PositiveInfinity; val7.minDistance = 0f; val7.aimType = (AimType)1; val7.ignoreNodeGraph = false; val7.moveInputScale = 1f; val7.driverUpdateTimerOverride = -1f; val7.buttonPressType = (ButtonPressType)0; val7.minTargetHealthFraction = float.NegativeInfinity; val7.maxTargetHealthFraction = float.PositiveInfinity; val7.minUserHealthFraction = float.NegativeInfinity; val7.maxUserHealthFraction = float.PositiveInfinity; val7.skillSlot = (SkillSlot)(-1); } } public static class Projectiles { public static GameObject fireballPrefab; public static GameObject fireballGroundPrefab; public static GameObject fireTrailPrefab; public static GameObject fireSegmentPrefab; public static void CreateProjectiles() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) fireballPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Junk/ArchWisp/ArchWispCannon.prefab").WaitForCompletion(), "DireseekerBossFireball", true); fireballGroundPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Junk/ArchWisp/ArchWispGroundCannon.prefab").WaitForCompletion(), "DireseekerBossGroundFireball", true); ProjectileController component = fireballPrefab.GetComponent(); component.ghostPrefab = Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/LemurianBigFireball.prefab").WaitForCompletion().GetComponent() .ghostPrefab; component.startSound = "Play_lemurianBruiser_m1_shoot"; GameObject impactEffect = Addressables.LoadAssetAsync((object)"RoR2/Base/LemurianBruiser/LemurianBigFireball.prefab").WaitForCompletion().GetComponent() .impactEffect; ProjectileImpactExplosion component2 = fireballPrefab.GetComponent(); ((ProjectileExplosion)component2).childrenProjectilePrefab = fireballGroundPrefab; ((Component)component2).GetComponent().impactEffect = impactEffect; ((ProjectileExplosion)component2).falloffModel = (FalloffModel)2; ((ProjectileExplosion)component2).blastDamageCoefficient = 1f; ((ProjectileExplosion)component2).blastProcCoefficient = 1f; ProjectileDamage component3 = fireballPrefab.GetComponent(); component3.damageType.damageSource = (DamageSource)1; ProjectileDamage component4 = fireballGroundPrefab.GetComponent(); component4.damageType.damageSource = (DamageSource)1; fireballGroundPrefab.GetComponent().ghostPrefab = Addressables.LoadAssetAsync((object)RoR2_Base_MagmaWorm.MagmaOrbGhost_prefab).WaitForCompletion(); fireballGroundPrefab.GetComponent().impactEffect = impactEffect; fireTrailPrefab = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync((object)"RoR2/Base/Common/FireTrail.prefab").WaitForCompletion(), "DireseekerBossFireTrail", true); fireTrailPrefab.AddComponent(); fireballGroundPrefab.GetComponent().trailPrefab = fireTrailPrefab; ContentAddition.AddProjectile(fireballPrefab); ContentAddition.AddProjectile(fireballGroundPrefab); } } public static class Skills { public static SkillDef epicFlamePillarSkillDef; public static void RegisterSkills() { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_036e: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Expected O, but got Unknown //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_045b: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Expected O, but got Unknown //IL_0502: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) GameObject direseekerBodyPrefab = Prefabs.direseekerBodyPrefab; GenericSkill[] componentsInChildren = direseekerBodyPrefab.GetComponentsInChildren(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } SkillLocator componentInChildren = direseekerBodyPrefab.GetComponentInChildren(); SkillDef val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(ChargeUltraFireball)); val2.activationStateMachineName = "Weapon"; val2.baseMaxStock = 3; val2.baseRechargeInterval = 16f; val2.beginSkillCooldownOnSkillEnd = true; val2.canceledFromSprinting = false; val2.fullRestockOnAssign = true; val2.interruptPriority = (InterruptPriority)0; val2.resetCooldownTimerOnUse = false; val2.isCombatSkill = true; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = false; val2.rechargeStock = 1; val2.requiredStock = 1; val2.stockToConsume = 1; ContentAddition.AddSkillDef(val2); componentInChildren.primary = direseekerBodyPrefab.AddComponent(); SkillFamily val3 = ScriptableObject.CreateInstance(); val3.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue((object)componentInChildren.primary, "_skillFamily", val3); SkillFamily skillFamily = componentInChildren.primary.skillFamily; Variant[] variants = skillFamily.variants; Variant val4 = new Variant { skillDef = val2 }; ((Variant)(ref val4)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants[0] = val4; ContentAddition.AddSkillFamily(val3); val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(Flamethrower)); val2.activationStateMachineName = "Body"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 0f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.fullRestockOnAssign = true; val2.interruptPriority = (InterruptPriority)0; val2.resetCooldownTimerOnUse = false; val2.isCombatSkill = true; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.stockToConsume = 0; ContentAddition.AddSkillDef(val2); componentInChildren.secondary = direseekerBodyPrefab.AddComponent(); val3 = ScriptableObject.CreateInstance(); val3.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue((object)componentInChildren.secondary, "_skillFamily", val3); skillFamily = componentInChildren.secondary.skillFamily; Variant[] variants2 = skillFamily.variants; val4 = new Variant { skillDef = val2 }; ((Variant)(ref val4)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants2[0] = val4; ContentAddition.AddSkillFamily(val3); epicFlamePillarSkillDef = ScriptableObject.CreateInstance(); epicFlamePillarSkillDef.activationState = new SerializableEntityStateType(typeof(FlamePillars)); epicFlamePillarSkillDef.activationStateMachineName = "Body"; epicFlamePillarSkillDef.baseMaxStock = 3; epicFlamePillarSkillDef.baseRechargeInterval = 3f; epicFlamePillarSkillDef.beginSkillCooldownOnSkillEnd = false; epicFlamePillarSkillDef.canceledFromSprinting = false; epicFlamePillarSkillDef.fullRestockOnAssign = true; epicFlamePillarSkillDef.interruptPriority = (InterruptPriority)0; epicFlamePillarSkillDef.resetCooldownTimerOnUse = true; epicFlamePillarSkillDef.isCombatSkill = true; epicFlamePillarSkillDef.mustKeyPress = false; epicFlamePillarSkillDef.cancelSprintingOnActivation = true; epicFlamePillarSkillDef.rechargeStock = 3; epicFlamePillarSkillDef.requiredStock = 1; epicFlamePillarSkillDef.stockToConsume = 1; ContentAddition.AddSkillDef(val2); componentInChildren.utility = direseekerBodyPrefab.AddComponent(); val3 = ScriptableObject.CreateInstance(); val3.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue((object)componentInChildren.utility, "_skillFamily", val3); skillFamily = componentInChildren.utility.skillFamily; Variant[] variants3 = skillFamily.variants; val4 = new Variant { skillDef = val2 }; ((Variant)(ref val4)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants3[0] = val4; ContentAddition.AddSkillFamily(val3); val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(FlamePillars)); val2.activationStateMachineName = "Body"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 12f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.fullRestockOnAssign = true; val2.interruptPriority = (InterruptPriority)0; val2.resetCooldownTimerOnUse = false; val2.isCombatSkill = true; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 1; val2.requiredStock = 1; val2.stockToConsume = 1; val2 = ScriptableObject.CreateInstance(); val2.activationState = new SerializableEntityStateType(typeof(Enrage)); val2.activationStateMachineName = "Body"; val2.baseMaxStock = 1; val2.baseRechargeInterval = 0f; val2.beginSkillCooldownOnSkillEnd = false; val2.canceledFromSprinting = false; val2.fullRestockOnAssign = true; val2.interruptPriority = (InterruptPriority)2; val2.resetCooldownTimerOnUse = false; val2.isCombatSkill = true; val2.mustKeyPress = false; val2.cancelSprintingOnActivation = true; val2.rechargeStock = 0; val2.requiredStock = 1; val2.stockToConsume = 1; ContentAddition.AddSkillDef(val2); componentInChildren.special = direseekerBodyPrefab.AddComponent(); val3 = ScriptableObject.CreateInstance(); val3.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue((object)componentInChildren.special, "_skillFamily", val3); skillFamily = componentInChildren.special.skillFamily; Variant[] variants4 = skillFamily.variants; val4 = new Variant { skillDef = val2 }; ((Variant)(ref val4)).viewableNode = new Node(val2.skillNameToken, false, (Node)null); variants4[0] = val4; ContentAddition.AddSkillFamily(val3); } } public static class SpawnCards { public static CharacterSpawnCard bossSpawnCard; public static void CreateSpawnCards() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown bossSpawnCard = ScriptableObject.CreateInstance(); ((Object)bossSpawnCard).name = "cscDireseekerBoss"; ((SpawnCard)bossSpawnCard).prefab = Prefabs.masterPrefab; ((SpawnCard)bossSpawnCard).sendOverNetwork = true; ((SpawnCard)bossSpawnCard).hullSize = (HullClassification)2; ((SpawnCard)bossSpawnCard).nodeGraphType = (GraphType)0; ((SpawnCard)bossSpawnCard).requiredFlags = (NodeFlags)0; ((SpawnCard)bossSpawnCard).forbiddenFlags = (NodeFlags)2; ((SpawnCard)bossSpawnCard).directorCreditCost = 800; ((SpawnCard)bossSpawnCard).occupyPosition = false; bossSpawnCard.loadout = new SerializableLoadout(); bossSpawnCard.noElites = true; bossSpawnCard.forbiddenAsBoss = false; } } public static class States { public static void RegisterStates() { //IL_0009: 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_0039: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) GameObject direseekerBodyPrefab = Prefabs.direseekerBodyPrefab; bool flag = default(bool); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); ContentAddition.AddEntityState(ref flag); EntityStateMachine componentInChildren = direseekerBodyPrefab.GetComponentInChildren(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.initialStateType = new SerializableEntityStateType(typeof(SpawnState)); } } } public static class Tokens { public static SubFileSystem fileSystem; internal static string languageRoot => Path.Combine(assemblyDir, "language"); internal static string assemblyDir => Path.GetDirectoryName(DireseekerPlugin.pluginInfo.Location); public static void RegisterLanguageTokens() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Language.SetFolders += new hook_SetFolders(fixme); } private static void fixme(orig_SetFolders orig, Language self, IEnumerable newFolders) { if (Directory.Exists(languageRoot)) { IEnumerable second = Directory.EnumerateDirectories(Path.Combine(languageRoot), self.name); orig.Invoke(self, newFolders.Union(second)); } else { orig.Invoke(self, newFolders); } } } } namespace DireseekerMod.Components { public class DireseekerButtonController : NetworkBehaviour { [SyncVar] public bool isPressedServer = false; public bool isPressedLocal = false; private bool enableOverlapSphere; private float overlapSphereRadius; private float overlapSphereStopwatch; private float overlapSphereFrequency; private Animator animator; public bool NetworkisPressedServer { get { return isPressedServer; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar(value, ref isPressedServer, 1u); } } private void Awake() { animator = ((Component)this).GetComponent(); if (NetworkServer.active) { NetworkisPressedServer = false; } isPressedLocal = false; overlapSphereRadius = 1.5f; overlapSphereFrequency = 5f; enableOverlapSphere = true; } private void FixedUpdate() { if (NetworkServer.active) { FixedUpdateServer(); } if (!isPressedLocal && isPressedServer) { Pressed(); } } private void FixedUpdateServer() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if (isPressedServer || !enableOverlapSphere) { return; } float num = 1f / overlapSphereFrequency; overlapSphereStopwatch += Time.fixedDeltaTime; if (overlapSphereStopwatch >= num) { overlapSphereStopwatch -= num; if (HGPhysics.DoesOverlapSphere(((Component)this).transform.position, overlapSphereRadius, LayerMask.op_Implicit(CommonMasks.characterBodiesOrDefault) | LayerMask.op_Implicit(CommonMasks.fakeActorLayers), (QueryTriggerInteraction)0)) { NetworkisPressedServer = true; } } } private void Pressed() { isPressedLocal = true; enableOverlapSphere = false; if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("pressed", true); } Util.PlaySound("Play_item_proc_bandolierSpawn", ((Component)this).gameObject); } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(isPressedServer); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(isPressedServer); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { isPressedServer = reader.ReadBoolean(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { isPressedServer = reader.ReadBoolean(); } } } public class DireseekerController : MonoBehaviour { public ParticleSystem burstFlame; public ParticleSystem rageFlame; private CharacterBody characterBody; private HealthComponent healthComponent; private bool rage = false; private float bombaStopwatch; private void Awake() { characterBody = ((Component)this).GetComponent(); healthComponent = ((Component)this).GetComponent(); } private void FixedUpdate() { bombaStopwatch -= Time.fixedDeltaTime; if (rage && bombaStopwatch <= 0f) { bombaStopwatch = 0.5f; AttemptShitMeatball(); } } private void AttemptShitMeatball() { if (Object.op_Implicit((Object)(object)characterBody) && Object.op_Implicit((Object)(object)healthComponent) && healthComponent.alive) { Util.PlaySound("sfx_direseeker_magma", ((Component)this).gameObject); if (characterBody.hasEffectiveAuthority) { ShitMeatball(); } } } private void ShitMeatball() { //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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_0113: Unknown result type (might be due to invalid IL or missing references) Vector3 corePosition = characterBody.corePosition; int num = Random.Range(4, 8); for (int i = 0; i < num; i++) { float speedOverride = Random.Range(2f, 16f); Vector3 val = corePosition + Vector3.up * Random.Range(-8f, 2f) + 7f * Random.insideUnitSphere - corePosition; ProjectileManager instance = ProjectileManager.instance; FireProjectileInfo val2 = new FireProjectileInfo { crit = Util.CheckRoll(characterBody.crit, 0f, (CharacterMaster)null), damage = 1.2f * characterBody.damage, damageColorIndex = (DamageColorIndex)0, force = 1000f, owner = ((Component)this).gameObject, position = corePosition, procChainMask = default(ProcChainMask), projectilePrefab = Projectiles.fireballPrefab, rotation = Util.QuaternionSafeLookRotation(val) }; ((FireProjectileInfo)(ref val2)).speedOverride = speedOverride; val2.useFuseOverride = false; val2.useSpeedOverride = true; instance.FireProjectile(val2); } } public void StartRageMode() { rage = true; if (Object.op_Implicit((Object)(object)rageFlame)) { rageFlame.Play(); } } public void FlameBurst() { if (Object.op_Implicit((Object)(object)burstFlame)) { burstFlame.Play(); } } } }