using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Jotunn.Utils; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("AichoGuardian")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("AichoGuardian")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("D28110A9-E229-4700-AD4D-DCD37486A82B")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace EikthyrTracker; [BepInPlugin("com.tumod.eikthyrtracker", "EikthyrTracker", "3.7.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class EikthyrTrackerPlugin : BaseUnityPlugin { public const string PluginGUID = "com.tumod.eikthyrtracker"; public const string PluginName = "EikthyrTracker"; public const string PluginVersion = "3.7.0"; internal static ManualLogSource Log; private Harmony _harmony; internal static float ChargeWindupDelay = 0.5f; internal static float ChargeFireDelay = 2.5f; private void Awake() { //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)"[EikthyrTracker] cargando..."); ConfigEntry cfgWindup = ((BaseUnityPlugin)this).Config.Bind("LightningCharge", "ChargeWindupDelay", 0.5f, "Segundos que Eikthyr permanece quieto antes de que empiecen los orbes."); ConfigEntry cfgFire = ((BaseUnityPlugin)this).Config.Bind("LightningCharge", "ChargeFireDelay", 2.5f, "Segundos de wind-up después de los orbes antes de lanzar los proyectiles."); ChargeWindupDelay = cfgWindup.Value; ChargeFireDelay = cfgFire.Value; cfgWindup.SettingChanged += delegate { ChargeWindupDelay = cfgWindup.Value; }; cfgFire.SettingChanged += delegate { ChargeFireDelay = cfgFire.Value; }; _harmony = new Harmony("com.tumod.eikthyrtracker"); _harmony.PatchAll(Assembly.GetExecutingAssembly()); Log.LogInfo((object)"[EikthyrTracker] Harmony cargado correctamente."); } private void OnDestroy() { Harmony harmony = _harmony; if (harmony != null) { harmony.UnpatchSelf(); } } internal static bool IsEikthyr(Character c) { if (!Object.op_Implicit((Object)(object)c)) { return false; } return Utils.GetPrefabName(((Component)c).gameObject) == "Eikthyr"; } } [HarmonyPatch(typeof(ZNet), "Start")] public static class Patch_ZNet_Start_RPCInit { private static void Postfix() { if (ZRoutedRpc.instance == null) { EikthyrTrackerPlugin.Log.LogWarning((object)"[EikthyrTracker] ZRoutedRpc no disponible en ZNet.Start."); return; } RPC.RegisterRPCs(); ManualLogSource log = EikthyrTrackerPlugin.Log; ZNet instance = ZNet.instance; log.LogInfo((object)$"[EikthyrTracker] RPCs registrados | isServer={((instance != null) ? new bool?(instance.IsServer()) : null)}"); } } public static class MinionSpawner { private const string BoarPrefab = "Boar"; private const string MinionName = "Ciervo de Eikthyr"; private const int MinionCount = 4; private const float SpawnRadius = 6f; public static void SpawnBoars(Vector3 center) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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_0085: 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) ZNetScene instance = ZNetScene.instance; GameObject val = ((instance != null) ? instance.GetPrefab("Boar") : null); if ((Object)(object)val == (Object)null) { EikthyrTrackerPlugin.Log.LogError((object)"[EikthyrTracker] Prefab 'Boar' no encontrado en ZNetScene."); return; } Vector3 val2 = default(Vector3); for (int i = 0; i < 4; i++) { float num = (float)i * 90f * ((float)Math.PI / 180f); ((Vector3)(ref val2))..ctor(Mathf.Cos(num) * 6f, 0f, Mathf.Sin(num) * 6f); Vector3 val3 = center + val2; if ((Object)(object)ZoneSystem.instance != (Object)null) { ZoneSystem.instance.GetSolidHeight(val3, ref val3.y, 1000); } GameObject val4 = Object.Instantiate(val, val3, Quaternion.Euler(0f, Random.Range(0f, 360f), 0f)); Character component = val4.GetComponent(); if ((Object)(object)component != (Object)null) { component.m_name = "Ciervo de Eikthyr"; } ZNetView component2 = val4.GetComponent(); if ((Object)(object)component2 != (Object)null && component2.IsValid()) { component2.GetZDO().Set("override_name", "Ciervo de Eikthyr"); } EikthyrTrackerPlugin.Log.LogInfo((object)string.Format("[EikthyrTracker] \ud83d\udc17 Spawneado '{0}' en {1}", "Ciervo de Eikthyr", val3)); } } } public static class AttackClients { [CompilerGenerated] private sealed class <>c__DisplayClass9_0 { public Vector3 bossPos; internal int b__0(Vector3 a, Vector3 b) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_0011: Unknown result type (might be due to invalid IL or missing references) return Vector3.Distance(b, bossPos).CompareTo(Vector3.Distance(a, bossPos)); } } [CompilerGenerated] private sealed class d__8 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float windupDelay; public Vector3 bossPos; public MonoBehaviour runner; public float fireDelay; private GameObject 5__2; private GameObject 5__3; private int 5__4; private int 5__5; private float 5__6; private int 5__7; private int 5__8; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Expected O, but got Unknown //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Expected O, but got Unknown //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Expected O, but got Unknown //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_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_0099: 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_00bf: 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_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_00ea: 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_00fb: 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_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Expected O, but got Unknown //IL_0364: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(windupDelay); <>1__state = 1; return true; case 1: { <>1__state = -1; ZNetScene instance2 = ZNetScene.instance; GameObject val7 = ((instance2 != null) ? instance2.GetPrefab("fx_lightning") : null); 5__2 = null; if ((Object)(object)val7 != (Object)null) { 5__2 = Object.Instantiate(val7, bossPos + Vector3.up * 1f, Quaternion.identity); ParticleSystem[] componentsInChildren5 = 5__2.GetComponentsInChildren(); foreach (ParticleSystem val8 in componentsInChildren5) { MainModule main2 = val8.main; ((MainModule)(ref main2)).maxParticles = 500; MinMaxCurve val9 = ((MainModule)(ref main2)).startSize; ((MainModule)(ref main2)).startSize = new MinMaxCurve(((MinMaxCurve)(ref val9)).constant * 2f); EmissionModule emission = val8.emission; val9 = ((EmissionModule)(ref emission)).rateOverTime; ((EmissionModule)(ref emission)).rateOverTime = new MinMaxCurve(((MinMaxCurve)(ref val9)).constant * 3f); } } <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; } case 2: { <>1__state = -1; ZNetScene instance = ZNetScene.instance; 5__3 = ((instance != null) ? instance.GetPrefab("projectile_stormcaller_staff_sphere_DO") : null); if ((Object)(object)5__3 != (Object)null) { 5__4 = 10; 5__5 = 5; 5__6 = 0.02f; 5__7 = 0; goto IL_0415; } goto IL_0426; } case 3: <>1__state = -1; 5__8++; goto IL_03d2; case 4: <>1__state = -1; 5__7++; goto IL_0415; case 5: <>1__state = -1; if (Object.op_Implicit((Object)(object)5__2)) { Object.Destroy((Object)(object)5__2); } <>2__current = (object)new WaitForSeconds(fireDelay); <>1__state = 6; return true; case 6: { <>1__state = -1; EikthyrTrackerPlugin.Log.LogInfo((object)"[LC] Visuales charge ejecutados — esperando FireBroadcast."); return false; } IL_0426: <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 5; return true; IL_0415: if (5__7 < 5__5) { 5__8 = 0; goto IL_03d2; } goto IL_0426; IL_03d2: if (5__8 < 5__4) { float num = 360f / (float)5__4 * (float)5__8 + (float)5__7 * 12f; float num2 = 3f; float num3 = 3f + Random.Range(0f, 2f); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(bossPos.x + Mathf.Sin(num * ((float)Math.PI / 180f)) * num2, bossPos.y + num3, bossPos.z + Mathf.Cos(num * ((float)Math.PI / 180f)) * num2); GameObject val2 = Object.Instantiate(5__3, val, Quaternion.identity); Projectile component = val2.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } Rigidbody component2 = val2.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.useGravity = false; component2.velocity = Vector3.zero; } ZNetView[] componentsInChildren = val2.GetComponentsInChildren(true); foreach (ZNetView val3 in componentsInChildren) { Object.Destroy((Object)(object)val3); } ZSyncTransform[] componentsInChildren2 = val2.GetComponentsInChildren(true); foreach (ZSyncTransform val4 in componentsInChildren2) { Object.Destroy((Object)(object)val4); } ParticleSystem[] componentsInChildren3 = val2.GetComponentsInChildren(); foreach (ParticleSystem val5 in componentsInChildren3) { MainModule main = val5.main; ((MainModule)(ref main)).startColor = new MinMaxGradient(Color.yellow); } Renderer[] componentsInChildren4 = val2.GetComponentsInChildren(); foreach (Renderer val6 in componentsInChildren4) { val6.material.color = Color.yellow; if (val6.material.HasProperty("_EmissionColor")) { val6.material.SetColor("_EmissionColor", Color.yellow * 2f); } } runner.StartCoroutine(MoveOrbeToBossPos(val2, bossPos)); <>2__current = (object)new WaitForSeconds(5__6); <>1__state = 3; return true; } <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 4; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__14 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Vector3 bossPos; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__14(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) if (<>1__state != 0) { return false; } <>1__state = -1; ZNetScene instance = ZNetScene.instance; GameObject val = ((instance != null) ? instance.GetPrefab("lightningAOE") : null); if ((Object)(object)val == (Object)null) { return false; } GameObject val2 = Object.Instantiate(val, bossPos, Quaternion.identity); ParticleSystem[] componentsInChildren = val2.GetComponentsInChildren(); foreach (ParticleSystem val3 in componentsInChildren) { MainModule main = val3.main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(Color.cyan); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__15 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public List group1; public List group2; private List 5__2; private List 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__15(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__2 = null; 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: 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_0116: Expected O, but got Unknown //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Expected O, but got Unknown //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Expected O, but got Unknown //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_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_038f: 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_039b: 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_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_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: { <>1__state = -1; ZNetScene instance = ZNetScene.instance; GameObject val = ((instance != null) ? instance.GetPrefab("lightningAOE") : null); if ((Object)(object)val == (Object)null) { return false; } 5__2 = new List(); foreach (Vector3 item in group1) { 5__2.Add(SpawnWarningCircle(item, 1.5f, Color.cyan)); } <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 1; return true; } case 1: <>1__state = -1; foreach (GameObject item2 in 5__2) { SetCircleColor(item2, Color.white); } <>2__current = (object)new WaitForSeconds(0.4f); <>1__state = 2; return true; case 2: <>1__state = -1; foreach (GameObject item3 in 5__2) { SetCircleColor(item3, Color.yellow); } <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 3; return true; case 3: <>1__state = -1; foreach (GameObject item4 in 5__2) { if (Object.op_Implicit((Object)(object)item4)) { Object.Destroy((Object)(object)item4); } } foreach (Vector3 item5 in group1) { SpawnLocalFX("lightningAOE", item5, Color.cyan); } 5__3 = new List(); foreach (Vector3 item6 in group2) { 5__3.Add(SpawnWarningCircle(item6, 1.5f, Color.cyan)); } <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 4; return true; case 4: <>1__state = -1; foreach (GameObject item7 in 5__3) { SetCircleColor(item7, Color.white); } <>2__current = (object)new WaitForSeconds(0.4f); <>1__state = 5; return true; case 5: <>1__state = -1; foreach (GameObject item8 in 5__3) { SetCircleColor(item8, Color.yellow); } <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 6; return true; case 6: <>1__state = -1; foreach (GameObject item9 in 5__3) { if (Object.op_Implicit((Object)(object)item9)) { Object.Destroy((Object)(object)item9); } } foreach (Vector3 item10 in group2) { SpawnLocalFX("lightningAOE", item10, Color.cyan); } EikthyrTrackerPlugin.Log.LogInfo((object)"[Rays] Visuales ejecutados."); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__17 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Vector3 bossPos; private int 5__2; private float 5__3; private List 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__17(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0110: 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: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: { <>1__state = -1; ZNetScene instance = ZNetScene.instance; GameObject val3 = ((instance != null) ? instance.GetPrefab("lightningAOE") : null); if ((Object)(object)val3 == (Object)null) { return false; } 5__2 = 8; 5__3 = 4f; 5__4 = new List(); for (int j = 0; j < 5__2; j++) { float num2 = 360f / (float)5__2 * (float)j * ((float)Math.PI / 180f); Vector3 center = bossPos + new Vector3(Mathf.Sin(num2) * 5__3, 0f, Mathf.Cos(num2) * 5__3); 5__4.Add(SpawnWarningCircle(center, 1.5f, Color.yellow)); } <>2__current = (object)new WaitForSeconds(1.5f); <>1__state = 1; return true; } case 1: <>1__state = -1; foreach (GameObject item in 5__4) { SetCircleColor(item, Color.white); } <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 2; return true; case 2: { <>1__state = -1; foreach (GameObject item2 in 5__4) { if (Object.op_Implicit((Object)(object)item2)) { Object.Destroy((Object)(object)item2); } } RaycastHit val2 = default(RaycastHit); for (int i = 0; i < 5__2; i++) { float num = 360f / (float)5__2 * (float)i * ((float)Math.PI / 180f); Vector3 val = bossPos + new Vector3(Mathf.Sin(num) * 5__3, 0f, Mathf.Cos(num) * 5__3); if (Physics.Raycast(val + Vector3.up * 50f, Vector3.down, ref val2, 100f)) { val.y = ((RaycastHit)(ref val2)).point.y; } SpawnLocalFX("lightningAOE", val, Color.yellow); } EikthyrTrackerPlugin.Log.LogInfo((object)"[Stomp] Visuales ejecutados (local-only)."); return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__9 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Vector3 bossPos; public List targets; private <>c__DisplayClass9_0 <>8__1; public MonoBehaviour runner; private GameObject 5__2; private int 5__3; private float 5__4; private Vector3 5__5; private int 5__6; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__9(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0121: 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_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_0228: 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_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0179: 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_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0317: 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_039c: 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_037d: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: { <>1__state = -1; <>8__1 = new <>c__DisplayClass9_0(); <>8__1.bossPos = bossPos; ZNetScene instance = ZNetScene.instance; 5__2 = ((instance != null) ? instance.GetPrefab("projectile_stormcaller_staff_sphere_DO") : null); if ((Object)(object)5__2 == (Object)null) { return false; } 5__3 = 6; 5__4 = 14f; 5__5 = <>8__1.bossPos + Vector3.up * 2f; targets.Sort((Vector3 a, Vector3 b) => Vector3.Distance(b, <>8__1.bossPos).CompareTo(Vector3.Distance(a, <>8__1.bossPos))); 5__6 = 0; break; } case 1: <>1__state = -1; 5__6++; break; } if (5__6 < 5__3) { Vector3 val; Vector3 val2; if (5__6 < targets.Count) { val = targets[5__6] + Vector3.up - 5__5; val2 = ((Vector3)(ref val)).normalized; float num = Random.Range(-5f, 5f); val2 = Quaternion.Euler(0f, num, 0f) * val2; } else if (targets.Count > 0) { Vector3 val3 = targets[Random.Range(0, targets.Count)]; val = val3 + Vector3.up - 5__5; val2 = ((Vector3)(ref val)).normalized; float num2 = Random.Range(-15f, 15f); val2 = Quaternion.Euler(0f, num2, 0f) * val2; } else { float num3 = Random.Range(0f, 360f); float num4 = Random.Range(5f, 20f); Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(<>8__1.bossPos.x + Mathf.Sin(num3 * ((float)Math.PI / 180f)) * num4, <>8__1.bossPos.y, <>8__1.bossPos.z + Mathf.Cos(num3 * ((float)Math.PI / 180f)) * num4); val = val4 + Vector3.up - 5__5; val2 = ((Vector3)(ref val)).normalized; } ((Vector3)(ref val2)).Normalize(); GameObject val5 = Object.Instantiate(5__2, 5__5, Quaternion.LookRotation(val2)); Projectile component = val5.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { ((Behaviour)component).enabled = false; } Rigidbody component2 = val5.GetComponent(); if (Object.op_Implicit((Object)(object)component2)) { component2.isKinematic = true; component2.useGravity = false; } ZNetView[] componentsInChildren = val5.GetComponentsInChildren(true); foreach (ZNetView val6 in componentsInChildren) { Object.Destroy((Object)(object)val6); } ZSyncTransform[] componentsInChildren2 = val5.GetComponentsInChildren(true); foreach (ZSyncTransform val7 in componentsInChildren2) { Object.Destroy((Object)(object)val7); } ParticleSystem[] componentsInChildren3 = val5.GetComponentsInChildren(); foreach (ParticleSystem val8 in componentsInChildren3) { MainModule main = val8.main; ((MainModule)(ref main)).startColor = new MinMaxGradient(Color.yellow); } Renderer[] componentsInChildren4 = val5.GetComponentsInChildren(); foreach (Renderer val9 in componentsInChildren4) { val9.material.color = Color.yellow; if (val9.material.HasProperty("_EmissionColor")) { val9.material.SetColor("_EmissionColor", Color.yellow * 2f); } } runner.StartCoroutine(MoveProjInDirection(val5, val2, 5__4, 3f, 10f, 0.8f)); <>2__current = null; <>1__state = 1; return true; } EikthyrTrackerPlugin.Log.LogInfo((object)"[LC] Proyectiles disparados hacia jugadores."); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__11 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Vector3 bossPos; public GameObject proj; private float 5__2; private Vector3 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__11(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b7: 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_00c6: 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_00dc: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__2 = 6f; 5__3 = bossPos + Vector3.up * 1.5f; break; case 1: <>1__state = -1; break; } if ((Object)(object)proj != (Object)null) { float num = Vector3.Distance(proj.transform.position, 5__3); if (num <= 0.5f) { Object.Destroy((Object)(object)proj); return false; } Vector3 val = 5__3 - proj.transform.position; Vector3 normalized = ((Vector3)(ref val)).normalized; Transform transform = proj.transform; transform.position += normalized * 5__2 * Time.deltaTime; proj.transform.rotation = Quaternion.LookRotation(normalized); <>2__current = null; <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__10 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public GameObject proj; public Vector3 dir; public float speed; public float hitDamage; public float hitRadius; public float maxTime; private float 5__2; private bool 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__10(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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_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_00ce: 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_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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__2 = 0f; 5__3 = false; break; case 1: <>1__state = -1; break; } if ((Object)(object)proj != (Object)null && 5__2 < maxTime && !5__3) { Transform transform = proj.transform; transform.position += dir * speed * Time.deltaTime; proj.transform.rotation = Quaternion.LookRotation(dir); 5__2 += Time.deltaTime; if (hitDamage > 0f && (Object)(object)Player.m_localPlayer != (Object)null && !((Character)Player.m_localPlayer).IsDead()) { float num = Vector3.Distance(proj.transform.position, ((Component)Player.m_localPlayer).transform.position + Vector3.up); if (num <= hitRadius) { 5__3 = true; HitData val = new HitData(); val.m_point = proj.transform.position; val.m_damage.m_lightning = hitDamage; val.m_ranged = true; val.m_hitType = (HitType)16; ((Character)Player.m_localPlayer).Damage(val); EikthyrTrackerPlugin.Log.LogWarning((object)$"[LC Proj] \ud83d\udca5 Impacto — {hitDamage} lightning"); } } <>2__current = null; <>1__state = 1; return true; } if ((Object)(object)proj != (Object)null) { Object.Destroy((Object)(object)proj); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const float ChargeSpawnRadius = 3f; public const float ChargeSpawnHeight = 3f; public static Vector3 ParseVec(string s, CultureInfo ci) { //IL_0039: 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) string[] array = s.Split(new char[1] { ',' }); if (array.Length < 3) { return Vector3.zero; } return new Vector3(float.Parse(array[0], ci), float.Parse(array[1], ci), float.Parse(array[2], ci)); } public static string VecToStr(Vector3 v, CultureInfo ci) { //IL_0006: 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_001c: Unknown result type (might be due to invalid IL or missing references) return string.Format(ci, "{0},{1},{2}", v.x, v.y, v.z); } public static GameObject SpawnWarningCircle(Vector3 center, float radius, Color color) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_0069: 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) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("EK_WarningCircle"); val.transform.position = center + Vector3.up * 0.1f; LineRenderer val2 = val.AddComponent(); val2.useWorldSpace = false; val2.loop = true; val2.widthMultiplier = 0.12f; val2.positionCount = 32; ((Renderer)val2).material = new Material(Shader.Find("Sprites/Default")); val2.startColor = color; val2.endColor = color; for (int i = 0; i < 32; i++) { float num = 11.25f * (float)i * ((float)Math.PI / 180f); val2.SetPosition(i, new Vector3(Mathf.Sin(num) * radius, 0f, Mathf.Cos(num) * radius)); } return val; } public static void SetCircleColor(GameObject go, Color color) { //IL_0019: 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) if (Object.op_Implicit((Object)(object)go)) { LineRenderer component = go.GetComponent(); if (Object.op_Implicit((Object)(object)component)) { component.startColor = color; component.endColor = color; } } } public static void SpawnLocalFX(string prefabName, Vector3 pos, Color color, float lifetime = 3f) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0039: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Expected O, but got Unknown //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_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_00da: 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) ZNetScene instance = ZNetScene.instance; GameObject val = ((instance != null) ? instance.GetPrefab(prefabName) : null); if ((Object)(object)val == (Object)null) { return; } GameObject val2 = new GameObject("EK_FX_" + prefabName + "_Local"); val2.transform.position = pos; ParticleSystem[] componentsInChildren = val.GetComponentsInChildren(true); foreach (ParticleSystem val3 in componentsInChildren) { GameObject val4 = Object.Instantiate(((Component)val3).gameObject, pos, ((Component)val3).transform.rotation, val2.transform); ZNetView[] componentsInChildren2 = val4.GetComponentsInChildren(true); foreach (ZNetView val5 in componentsInChildren2) { Object.Destroy((Object)(object)val5); } ZSyncTransform[] componentsInChildren3 = val4.GetComponentsInChildren(true); foreach (ZSyncTransform val6 in componentsInChildren3) { Object.Destroy((Object)(object)val6); } MainModule main = val4.GetComponent().main; ((MainModule)(ref main)).startColor = new MinMaxGradient(color); } AudioSource[] componentsInChildren4 = val.GetComponentsInChildren(true); foreach (AudioSource val7 in componentsInChildren4) { GameObject val8 = new GameObject("EK_Audio"); val8.transform.SetParent(val2.transform); val8.transform.position = pos; AudioSource val9 = val8.AddComponent(); val9.clip = val7.clip; val9.volume = val7.volume; val9.pitch = val7.pitch; val9.spatialBlend = val7.spatialBlend; val9.minDistance = val7.minDistance; val9.maxDistance = val7.maxDistance; val9.rolloffMode = val7.rolloffMode; val9.Play(); } Object.Destroy((Object)(object)val2, lifetime); } public static void ExecuteLightningCharge(string payload, MonoBehaviour runner) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) CultureInfo invariantCulture = CultureInfo.InvariantCulture; string[] array = payload.Split(new char[1] { '|' }); if (array.Length < 2) { EikthyrTrackerPlugin.Log.LogError((object)("[LC] payload inválido: '" + payload + "'")); return; } Vector3 bossPos = ParseVec(array[0], invariantCulture); Vector3 bossForward = ParseVec(array[1], invariantCulture); float result = EikthyrTrackerPlugin.ChargeWindupDelay; float result2 = EikthyrTrackerPlugin.ChargeFireDelay; if (array.Length >= 3) { float.TryParse(array[2], NumberStyles.Float, invariantCulture, out result); } if (array.Length >= 4) { float.TryParse(array[3], NumberStyles.Float, invariantCulture, out result2); } runner.StartCoroutine(CoLightningCharge(runner, bossPos, bossForward, result, result2)); } [IteratorStateMachine(typeof(d__8))] private static IEnumerator CoLightningCharge(MonoBehaviour runner, Vector3 bossPos, Vector3 bossForward, float windupDelay, float fireDelay) { //IL_000e: 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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__8(0) { runner = runner, bossPos = bossPos, windupDelay = windupDelay, fireDelay = fireDelay }; } [IteratorStateMachine(typeof(d__9))] public static IEnumerator FireLCProjectiles(Vector3 bossPos, List targets, MonoBehaviour runner) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__9(0) { bossPos = bossPos, targets = targets, runner = runner }; } [IteratorStateMachine(typeof(d__10))] private static IEnumerator MoveProjInDirection(GameObject proj, Vector3 dir, float speed, float maxTime, float hitDamage = 0f, float hitRadius = 0.6f) { //IL_000e: 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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__10(0) { proj = proj, dir = dir, speed = speed, maxTime = maxTime, hitDamage = hitDamage, hitRadius = hitRadius }; } [IteratorStateMachine(typeof(d__11))] private static IEnumerator MoveOrbeToBossPos(GameObject proj, Vector3 bossPos) { //IL_000e: 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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__11(0) { proj = proj, bossPos = bossPos }; } public static void ExecuteLightningRays(string payload, MonoBehaviour runner) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) CultureInfo invariantCulture = CultureInfo.InvariantCulture; Vector3 bossPos = ParseVec(payload, invariantCulture); runner.StartCoroutine(CoLightningRays(bossPos)); } public static void ExecuteLightningRaysWithGroups(string payload, MonoBehaviour runner) { //IL_0073: 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) CultureInfo invariantCulture = CultureInfo.InvariantCulture; string[] array = payload.Split(new char[1] { '|' }); if (array.Length < 3) { EikthyrTrackerPlugin.Log.LogError((object)("[Rays] payload inválido: '" + payload + "'")); return; } List list = new List(); List list2 = new List(); string[] array2 = array[1].Split(new char[1] { ';' }); foreach (string text in array2) { if (!string.IsNullOrEmpty(text)) { list.Add(ParseVec(text, invariantCulture)); } } string[] array3 = array[2].Split(new char[1] { ';' }); foreach (string text2 in array3) { if (!string.IsNullOrEmpty(text2)) { list2.Add(ParseVec(text2, invariantCulture)); } } runner.StartCoroutine(CoLightningRaysVisuals(list, list2)); } [IteratorStateMachine(typeof(d__14))] private static IEnumerator CoLightningRays(Vector3 bossPos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__14(0) { bossPos = bossPos }; } [IteratorStateMachine(typeof(d__15))] private static IEnumerator CoLightningRaysVisuals(List group1, List group2) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__15(0) { group1 = group1, group2 = group2 }; } public static void ExecuteStompAOE(string payload, MonoBehaviour runner) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) CultureInfo invariantCulture = CultureInfo.InvariantCulture; Vector3 bossPos = ParseVec(payload, invariantCulture); runner.StartCoroutine(CoStompAOE(bossPos)); } [IteratorStateMachine(typeof(d__17))] private static IEnumerator CoStompAOE(Vector3 bossPos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__17(0) { bossPos = bossPos }; } } public static class ServerCoroutineRunner { private static ServerCoroutineRunnerMB _instance; public static void Run(IEnumerator coroutine) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if ((Object)(object)_instance == (Object)null) { GameObject val = new GameObject("EikthyrServerRunner"); Object.DontDestroyOnLoad((Object)(object)val); _instance = val.AddComponent(); } ((MonoBehaviour)_instance).StartCoroutine(coroutine); } } public class ServerCoroutineRunnerMB : MonoBehaviour { } public static class RPC { [CompilerGenerated] private sealed class d__41 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float delay; public Player player; public bool checkProximity; public Vector3 impactPos; public float dmg; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__41(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (delay > 0f) { <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; } break; case 1: <>1__state = -1; break; } if ((Object)(object)player == (Object)null || ((Character)player).IsDead()) { return false; } if (checkProximity && Vector3.Distance(((Component)player).transform.position, impactPos) > 3f) { EikthyrTrackerPlugin.Log.LogInfo((object)$"[CLIENT Rays] Jugador fuera del rayo ({Vector3.Distance(((Component)player).transform.position, impactPos):F1}u) — daño cancelado."); return false; } HitData val = new HitData(); val.m_point = ((Component)player).transform.position; val.m_damage.m_lightning = dmg; val.m_ranged = true; val.m_hitType = (HitType)16; ((Character)player).Damage(val); EikthyrTrackerPlugin.Log.LogWarning((object)$"[CLIENT Rays] \ud83d\udca5 Daño: {dmg} lightning"); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__31 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public string payload; public Vector3 bossForward; public Vector3 bossPos; private float 5__2; private CultureInfo 5__3; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__3 = null; <>1__state = -2; } private bool MoveNext() { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown //IL_016b: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: { <>1__state = -1; float chargeWindupDelay = EikthyrTrackerPlugin.ChargeWindupDelay; 5__2 = EikthyrTrackerPlugin.ChargeFireDelay; float num = chargeWindupDelay + 0.5f + 1.6f + 0.1f + 5__2; float num2 = num - 5__2; 5__3 = CultureInfo.InvariantCulture; ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.Everybody, "EikthyrTracker_Freeze", new object[1] { "1" }); EikthyrTrackerPlugin.Log.LogInfo((object)"[SERVER LC] Broadcast FreezeEikthyr enviado."); string text2 = payload + "|" + chargeWindupDelay.ToString(5__3) + "|" + 5__2.ToString(5__3); ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.Everybody, "EikthyrTracker_LCBroadcast", new object[1] { text2 }); <>2__current = (object)new WaitForSeconds(num2); <>1__state = 1; return true; } case 1: <>1__state = -1; ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.Everybody, "EikthyrTracker_Unfreeze", new object[1] { "1" }); EikthyrTrackerPlugin.Log.LogInfo((object)"[SERVER LC] UnfreezeEikthyr — boss libre para lanzar."); <>2__current = (object)new WaitForSeconds(5__2); <>1__state = 2; return true; case 2: { <>1__state = -1; Vector3 forward = bossForward; forward.y = 0f; if (forward == Vector3.zero) { forward = Vector3.forward; } ((Vector3)(ref forward)).Normalize(); List list = new List(); foreach (ZNetPeer connectedPeer in ZNet.instance.GetConnectedPeers()) { if (connectedPeer.m_characterID == ZDOID.None) { continue; } ZDO zDO = ZDOMan.instance.GetZDO(connectedPeer.m_characterID); if (zDO != null) { Vector3 position = zDO.GetPosition(); if (!(Vector3.Distance(position, bossPos) > 30f)) { list.Add(position); Log.LogInfo((object)("[SERVER LC] Target añadido: " + connectedPeer.m_playerName)); } } } if (list.Count > 0) { StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < list.Count; i++) { if (i > 0) { stringBuilder.Append(';'); } stringBuilder.Append(AttackClients.VecToStr(list[i], 5__3)); } string text = $"{AttackClients.VecToStr(bossPos, 5__3)}|{stringBuilder}"; ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.Everybody, "EikthyrTracker_LCFire", new object[1] { text }); } _lcInProgress = false; EikthyrTrackerPlugin.Log.LogInfo((object)"[SERVER LC] LC completado — flag reseteado."); return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__32 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public float delay; public MonsterAI ai; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__32(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(delay); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)ai != (Object)null) { ((Behaviour)ai).enabled = true; EikthyrTrackerPlugin.Log.LogInfo((object)"[SERVER LC] MonsterAI reactivado."); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__43 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Vector3 bossPos; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__43(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1.8f); <>1__state = 1; return true; case 1: { <>1__state = -1; int num = 8; float num2 = 4f; foreach (ZNetPeer connectedPeer in ZNet.instance.GetConnectedPeers()) { if (connectedPeer.m_characterID == ZDOID.None) { continue; } ZDO zDO = ZDOMan.instance.GetZDO(connectedPeer.m_characterID); if (zDO == null) { continue; } Vector3 position = zDO.GetPosition(); bool flag = false; for (int i = 0; i < num; i++) { float num3 = 360f / (float)num * (float)i * ((float)Math.PI / 180f); Vector3 val = bossPos + new Vector3(Mathf.Sin(num3) * num2, 0f, Mathf.Cos(num3) * num2); if (Vector3.Distance(position, val) <= 2.5f) { flag = true; break; } } if (flag) { ZRoutedRpc.instance.InvokeRoutedRPC(connectedPeer.m_uid, "EikthyrTracker_StompDamage", new object[1] { "15" }); Log.LogWarning((object)("[SERVER Stomp] \ud83d\udca5 Daño → " + connectedPeer.m_playerName)); } } _stompInProgress = false; EikthyrTrackerPlugin.Log.LogInfo((object)"[SERVER Stomp] Flag reseteado."); return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public const string EikthyrAttack = "EikthyrTracker_AttackDetected"; public const string EikthyrSummoned = "EikthyrTracker_BossSummoned"; public const string EikthyrSpawnMinions = "EikthyrTracker_SpawnMinions"; public const string LCRequest = "EikthyrTracker_LCRequest"; public const string LCBroadcast = "EikthyrTracker_LCBroadcast"; public const string LCDamage = "EikthyrTracker_LCDamage"; public const string FreezeEikthyr = "EikthyrTracker_Freeze"; public const string UnfreezeEikthyr = "EikthyrTracker_Unfreeze"; public const string LCFireBroadcast = "EikthyrTracker_LCFire"; public const string RaysRequest = "EikthyrTracker_RaysRequest"; public const string RaysBroadcast = "EikthyrTracker_RaysBroadcast"; public const string RaysDamage = "EikthyrTracker_RaysDamage"; public const string StompRequest = "EikthyrTracker_StompRequest"; public const string StompBroadcast = "EikthyrTracker_StompBroadcast"; public const string StompDamage = "EikthyrTracker_StompDamage"; private static float _lastLCTime = -99f; private static float _lastRaysTime = -99f; private static float _lastStompTime = -99f; private const float LCCooldown = 3f; private const float RaysCooldown = 4f; private const float StompCooldown = 3f; private static bool _minionsAlreadySpawned = false; private static bool _lcInProgress = false; private static bool _stompInProgress = false; private static ManualLogSource Log => EikthyrTrackerPlugin.Log; public static void RegisterRPCs() { ZRoutedRpc.instance.Register("EikthyrTracker_AttackDetected", (Action)OnEikthyrAttack_Server); ZRoutedRpc.instance.Register("EikthyrTracker_BossSummoned", (Action)OnEikthyrSummoned_Server); ZRoutedRpc.instance.Register("EikthyrTracker_SpawnMinions", (Action)OnEikthyrSpawnMinions_Server); ZRoutedRpc.instance.Register("EikthyrTracker_LCRequest", (Action)OnLCRequest_Server); ZRoutedRpc.instance.Register("EikthyrTracker_LCBroadcast", (Action)OnLCBroadcast_Client); ZRoutedRpc.instance.Register("EikthyrTracker_LCDamage", (Action)OnLCDamage_Client); ZRoutedRpc.instance.Register("EikthyrTracker_Freeze", (Action)OnFreezeEikthyr_Client); ZRoutedRpc.instance.Register("EikthyrTracker_Unfreeze", (Action)OnUnfreezeEikthyr_Client); ZRoutedRpc.instance.Register("EikthyrTracker_LCFire", (Action)OnLCFireBroadcast_Client); ZRoutedRpc.instance.Register("EikthyrTracker_RaysRequest", (Action)OnRaysRequest_Server); ZRoutedRpc.instance.Register("EikthyrTracker_RaysBroadcast", (Action)OnRaysBroadcast_Client); ZRoutedRpc.instance.Register("EikthyrTracker_RaysDamage", (Action)OnRaysDamage_Client); ZRoutedRpc.instance.Register("EikthyrTracker_StompRequest", (Action)OnStompRequest_Server); ZRoutedRpc.instance.Register("EikthyrTracker_StompBroadcast", (Action)OnStompBroadcast_Client); ZRoutedRpc.instance.Register("EikthyrTracker_StompDamage", (Action)OnStompDamage_Client); } public static void OnEikthyrAttack_Server(long senderPeerID, string attackName, int attackId) { if (!((Object)(object)ZNet.instance == (Object)null) && ZNet.instance.IsServer()) { string peerName = GetPeerName(senderPeerID); Log.LogWarning((object)"══════════════════════════════════════"); Log.LogWarning((object)"[SERVER RPC] \ud83d\udde1\ufe0f EIKTHYR ATAQUE DETECTADO"); Log.LogWarning((object)("[SERVER RPC] Ataque : " + attackName)); Log.LogWarning((object)$"[SERVER RPC] Attack ID : {attackId}"); Log.LogWarning((object)$"[SERVER RPC] Peer : {peerName} ({senderPeerID})"); Log.LogWarning((object)"══════════════════════════════════════"); } } public static void OnEikthyrSummoned_Server(long senderPeerID, string invokerName) { if (!((Object)(object)ZNet.instance == (Object)null) && ZNet.instance.IsServer()) { string peerName = GetPeerName(senderPeerID); Log.LogWarning((object)"══════════════════════════════════════"); Log.LogWarning((object)"[SERVER RPC] \ud83d\udd14 EIKTHYR INVOCADO"); Log.LogWarning((object)("[SERVER RPC] Invocador : " + invokerName)); Log.LogWarning((object)$"[SERVER RPC] Peer : {peerName} ({senderPeerID})"); Log.LogWarning((object)"══════════════════════════════════════"); } } public static void OnEikthyrSpawnMinions_Server(long senderPeerID, string eikthyrPosStr) { //IL_00d0: 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) if ((Object)(object)ZNet.instance == (Object)null || !ZNet.instance.IsServer()) { return; } if (_minionsAlreadySpawned) { Log.LogInfo((object)("[SERVER RPC] Minions ya spawneados — ignorando RPC de " + GetPeerName(senderPeerID) + ".")); return; } _minionsAlreadySpawned = true; string[] array = eikthyrPosStr.Split(new char[1] { ',' }); if (array.Length != 3) { Log.LogError((object)("[SERVER RPC] Posición inválida: '" + eikthyrPosStr + "'")); _minionsAlreadySpawned = false; return; } CultureInfo invariantCulture = CultureInfo.InvariantCulture; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(float.Parse(array[0], invariantCulture), float.Parse(array[1], invariantCulture), float.Parse(array[2], invariantCulture)); Log.LogWarning((object)"══════════════════════════════════════"); Log.LogWarning((object)"[SERVER RPC] \ud83d\udc17 SPAWN MINIONS EIKTHYR"); Log.LogWarning((object)$"[SERVER RPC] Posición : {val}"); Log.LogWarning((object)("[SERVER RPC] Peer : " + GetPeerName(senderPeerID))); Log.LogWarning((object)"══════════════════════════════════════"); MinionSpawner.SpawnBoars(val); } public static void OnLCRequest_Server(long senderPeerID, string payload) { //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ZNet.instance == (Object)null || !ZNet.instance.IsServer()) { return; } if (_lcInProgress) { Log.LogInfo((object)("[SERVER LC] LC ya en curso — ignorando RPC de " + GetPeerName(senderPeerID) + ".")); return; } float time = Time.time; if (time - _lastLCTime < 3f) { Log.LogInfo((object)("[SERVER LC] En cooldown — ignorando de " + GetPeerName(senderPeerID) + ".")); return; } _lastLCTime = time; _lcInProgress = true; CultureInfo invariantCulture = CultureInfo.InvariantCulture; string[] array = payload.Split(new char[1] { '|' }); if (array.Length < 2) { Log.LogError((object)("[SERVER LC] payload inválido: '" + payload + "'")); _lcInProgress = false; return; } Vector3 val = AttackClients.ParseVec(array[0], invariantCulture); Vector3 val2 = AttackClients.ParseVec(array[1], invariantCulture); Log.LogWarning((object)"══════════════════════════════════════"); Log.LogWarning((object)"[SERVER LC] ⚡ LIGHTNING CHARGE"); Log.LogWarning((object)$"[SERVER LC] Boss pos : {val}"); Log.LogWarning((object)$"[SERVER LC] Forward : {val2}"); Log.LogWarning((object)("[SERVER LC] Peer : " + GetPeerName(senderPeerID))); Log.LogWarning((object)"══════════════════════════════════════"); ServerCoroutineRunner.Run(LCSequence_Server(payload, val, val2)); } [IteratorStateMachine(typeof(d__31))] private static IEnumerator LCSequence_Server(string payload, Vector3 bossPos, Vector3 bossForward) { //IL_000e: 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_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { payload = payload, bossPos = bossPos, bossForward = bossForward }; } [IteratorStateMachine(typeof(d__32))] private static IEnumerator ReenableAI(MonsterAI ai, float delay) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__32(0) { ai = ai, delay = delay }; } public static void OnLCBroadcast_Client(long senderPeerID, string payload) { if (!((Object)(object)ZNet.instance != (Object)null) || !ZNet.instance.IsServer()) { Log.LogInfo((object)"[CLIENT LC] ⚡ Broadcast recibido — ejecutando visuales."); Player localPlayer = Player.m_localPlayer; if (!((Object)(object)localPlayer == (Object)null)) { AttackClients.ExecuteLightningCharge(payload, (MonoBehaviour)(object)localPlayer); } } } public static void OnLCFireBroadcast_Client(long senderPeerID, string payload) { //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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ZNet.instance != (Object)null && ZNet.instance.IsServer()) { return; } Player localPlayer = Player.m_localPlayer; if ((Object)(object)localPlayer == (Object)null) { return; } CultureInfo invariantCulture = CultureInfo.InvariantCulture; string[] array = payload.Split(new char[1] { '|' }); if (array.Length < 2) { return; } Vector3 bossPos = AttackClients.ParseVec(array[0], invariantCulture); List list = new List(); string[] array2 = array[1].Split(new char[1] { ';' }); foreach (string text in array2) { if (!string.IsNullOrEmpty(text)) { list.Add(AttackClients.ParseVec(text, invariantCulture)); } } ((MonoBehaviour)localPlayer).StartCoroutine(AttackClients.FireLCProjectiles(bossPos, list, (MonoBehaviour)(object)localPlayer)); } public static void OnFreezeEikthyr_Client(long senderPeerID, string unused) { foreach (Character allCharacter in Character.GetAllCharacters()) { if (!EikthyrTrackerPlugin.IsEikthyr(allCharacter)) { continue; } ZNetView component = ((Component)allCharacter).GetComponent(); if (!((Object)(object)component == (Object)null) && component.IsValid() && component.IsOwner()) { MonsterAI component2 = ((Component)allCharacter).GetComponent(); BaseAI component3 = ((Component)allCharacter).GetComponent(); if ((Object)(object)component2 != (Object)null) { ((Behaviour)component2).enabled = false; } if (component3 != null) { component3.StopMoving(); } allCharacter.m_speed = 0f; allCharacter.m_runSpeed = 0f; allCharacter.m_walkSpeed = 0f; EikthyrTrackerPlugin.Log.LogInfo((object)"[CLIENT] Eikthyr congelado (soy el owner)."); break; } } } public static void OnUnfreezeEikthyr_Client(long senderPeerID, string unused) { foreach (Character allCharacter in Character.GetAllCharacters()) { if (!EikthyrTrackerPlugin.IsEikthyr(allCharacter)) { continue; } ZNetView component = ((Component)allCharacter).GetComponent(); if (!((Object)(object)component == (Object)null) && component.IsValid() && component.IsOwner()) { MonsterAI component2 = ((Component)allCharacter).GetComponent(); if ((Object)(object)component2 != (Object)null) { ((Behaviour)component2).enabled = true; } allCharacter.m_speed = 3f; allCharacter.m_runSpeed = 6f; allCharacter.m_walkSpeed = 2f; Patch_Attack_Start_Stomp.IgnoreNext = true; allCharacter.StartAttack((Character)null, false); Patch_Attack_Start_Stomp.IgnoreNext = false; EikthyrTrackerPlugin.Log.LogInfo((object)"[CLIENT] Eikthyr descongelado — StartAttack stomp ejecutado."); break; } } } public static void OnLCDamage_Client(long senderPeerID, string dmgStr) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)ZNet.instance != (Object)null) || !ZNet.instance.IsServer()) { Player localPlayer = Player.m_localPlayer; if (!((Object)(object)localPlayer == (Object)null) && !((Character)localPlayer).IsDead()) { CultureInfo invariantCulture = CultureInfo.InvariantCulture; float result = 10f; float.TryParse(dmgStr, NumberStyles.Float, invariantCulture, out result); HitData val = new HitData(); val.m_point = ((Component)localPlayer).transform.position; val.m_damage.m_lightning = result; val.m_ranged = true; val.m_hitType = (HitType)16; ((Character)localPlayer).Damage(val); Log.LogWarning((object)$"[CLIENT LC] \ud83d\udca5 Daño recibido: {result} lightning"); } } } public static void OnRaysRequest_Server(long senderPeerID, string posStr) { //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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_020e: 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_0260: 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_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0438: 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_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_037a: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: 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_04af: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: 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) if ((Object)(object)ZNet.instance == (Object)null || !ZNet.instance.IsServer()) { return; } float time = Time.time; if (time - _lastRaysTime < 4f) { Log.LogInfo((object)("[SERVER Rays] En cooldown — ignorando de " + GetPeerName(senderPeerID) + ".")); return; } _lastRaysTime = time; CultureInfo invariantCulture = CultureInfo.InvariantCulture; Vector3 val = AttackClients.ParseVec(posStr, invariantCulture); Log.LogWarning((object)"══════════════════════════════════════"); Log.LogWarning((object)"[SERVER Rays] ⚡ LIGHTNING RAYS"); Log.LogWarning((object)$"[SERVER Rays] Boss pos : {val}"); Log.LogWarning((object)("[SERVER Rays] Peer : " + GetPeerName(senderPeerID))); Log.LogWarning((object)"══════════════════════════════════════"); List list = new List(); foreach (ZNetPeer connectedPeer in ZNet.instance.GetConnectedPeers()) { if (!(connectedPeer.m_characterID == ZDOID.None)) { ZDO zDO = ZDOMan.instance.GetZDO(connectedPeer.m_characterID); if (zDO != null && Vector3.Distance(zDO.GetPosition(), val) < 30f) { list.Add(connectedPeer); } } } if (list.Count == 0) { Log.LogInfo((object)"[SERVER Rays] Sin jugadores en rango."); return; } for (int num = list.Count - 1; num > 0; num--) { int index = Random.Range(0, num + 1); ZNetPeer value = list[num]; list[num] = list[index]; list[index] = value; } List list2 = new List(); List list3 = new List(); List list4; List list5; if (list.Count >= 5) { int num2 = list.Count / 2; list4 = list.GetRange(0, num2); list5 = list.GetRange(num2, list.Count - num2); } else { list4 = new List(list); list5 = new List(); } foreach (ZNetPeer item in list4) { ZDO zDO2 = ZDOMan.instance.GetZDO(item.m_characterID); if (zDO2 != null) { list2.Add(zDO2.GetPosition()); } } foreach (ZNetPeer item2 in list5) { ZDO zDO3 = ZDOMan.instance.GetZDO(item2.m_characterID); if (zDO3 != null) { list3.Add(zDO3.GetPosition()); } } while (list2.Count < 5) { float num3 = Random.Range(0f, 360f) * ((float)Math.PI / 180f); float num4 = Random.Range(3f, 12f); Vector3 val2 = val + new Vector3(Mathf.Sin(num3) * num4, 0f, Mathf.Cos(num3) * num4); if ((Object)(object)ZoneSystem.instance != (Object)null) { ZoneSystem.instance.GetSolidHeight(val2, ref val2.y, 1000); } list2.Add(val2); } if (list5.Count > 0) { while (list3.Count < 5) { float num5 = Random.Range(0f, 360f) * ((float)Math.PI / 180f); float num6 = Random.Range(3f, 12f); Vector3 val3 = val + new Vector3(Mathf.Sin(num5) * num6, 0f, Mathf.Cos(num5) * num6); if ((Object)(object)ZoneSystem.instance != (Object)null) { ZoneSystem.instance.GetSolidHeight(val3, ref val3.y, 1000); } list3.Add(val3); } } else { while (list3.Count < 5) { float num7 = Random.Range(0f, 360f) * ((float)Math.PI / 180f); float num8 = Random.Range(3f, 12f); Vector3 val4 = val + new Vector3(Mathf.Sin(num7) * num8, 0f, Mathf.Cos(num7) * num8); if ((Object)(object)ZoneSystem.instance != (Object)null) { ZoneSystem.instance.GetSolidHeight(val4, ref val4.y, 1000); } list3.Add(val4); } } Log.LogWarning((object)$"[SERVER Rays] Oleada1={list2.Count} puntos | Oleada2={list3.Count} puntos"); CultureInfo invariantCulture2 = CultureInfo.InvariantCulture; for (int i = 0; i < list4.Count; i++) { ZNetPeer val5 = list4[i]; string text = ((i < list2.Count) ? AttackClients.VecToStr(list2[i], invariantCulture2) : AttackClients.VecToStr(Vector3.zero, invariantCulture2)); ZRoutedRpc.instance.InvokeRoutedRPC(val5.m_uid, "EikthyrTracker_RaysDamage", new object[1] { "1.9|8|" + text }); Log.LogWarning((object)("[SERVER Rays] \ud83d\udca5 Oleada 1 → " + val5.m_playerName + " @ " + text)); } for (int j = 0; j < list5.Count; j++) { ZNetPeer val6 = list5[j]; string text2 = ((j < list3.Count) ? AttackClients.VecToStr(list3[j], invariantCulture2) : AttackClients.VecToStr(Vector3.zero, invariantCulture2)); ZRoutedRpc.instance.InvokeRoutedRPC(val6.m_uid, "EikthyrTracker_RaysDamage", new object[1] { "3.8|8|" + text2 }); Log.LogWarning((object)("[SERVER Rays] \ud83d\udca5 Oleada 2 → " + val6.m_playerName + " @ " + text2)); } StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder2 = new StringBuilder(); for (int k = 0; k < list2.Count; k++) { if (k > 0) { stringBuilder.Append(';'); } stringBuilder.Append(AttackClients.VecToStr(list2[k], invariantCulture)); } for (int l = 0; l < list3.Count; l++) { if (l > 0) { stringBuilder2.Append(';'); } stringBuilder2.Append(AttackClients.VecToStr(list3[l], invariantCulture)); } string text3 = $"{posStr}|{stringBuilder}|{stringBuilder2}"; ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.Everybody, "EikthyrTracker_RaysBroadcast", new object[1] { text3 }); } public static void OnRaysBroadcast_Client(long senderPeerID, string payload) { if (!((Object)(object)ZNet.instance != (Object)null) || !ZNet.instance.IsServer()) { Log.LogInfo((object)"[CLIENT Rays] ⚡ Broadcast recibido — ejecutando visuales."); Player localPlayer = Player.m_localPlayer; if (!((Object)(object)localPlayer == (Object)null)) { AttackClients.ExecuteLightningRaysWithGroups(payload, (MonoBehaviour)(object)localPlayer); } } } public static void OnRaysDamage_Client(long senderPeerID, string dmgPayload) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ZNet.instance != (Object)null && ZNet.instance.IsServer()) { return; } Player localPlayer = Player.m_localPlayer; if (!((Object)(object)localPlayer == (Object)null) && !((Character)localPlayer).IsDead()) { CultureInfo invariantCulture = CultureInfo.InvariantCulture; string[] array = dmgPayload.Split(new char[1] { '|' }); float result = 0f; float result2 = 8f; Vector3 impactPos = Vector3.zero; bool checkProximity = false; if (array.Length >= 1) { float.TryParse(array[0], NumberStyles.Float, invariantCulture, out result); } if (array.Length >= 2) { float.TryParse(array[1], NumberStyles.Float, invariantCulture, out result2); } if (array.Length >= 3) { impactPos = AttackClients.ParseVec(array[2], invariantCulture); checkProximity = true; } ((MonoBehaviour)localPlayer).StartCoroutine(ApplyDamageDelayed(localPlayer, result2, result, impactPos, checkProximity)); } } [IteratorStateMachine(typeof(d__41))] private static IEnumerator ApplyDamageDelayed(Player player, float dmg, float delay, Vector3 impactPos, bool checkProximity) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__41(0) { player = player, dmg = dmg, delay = delay, impactPos = impactPos, checkProximity = checkProximity }; } public static void OnStompRequest_Server(long senderPeerID, string posStr) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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) if ((Object)(object)ZNet.instance == (Object)null || !ZNet.instance.IsServer()) { return; } if (_stompInProgress) { Log.LogInfo((object)("[SERVER Stomp] Stomp ya en curso — ignorando RPC de " + GetPeerName(senderPeerID) + ".")); return; } float time = Time.time; if (time - _lastStompTime < 3f) { Log.LogInfo((object)("[SERVER Stomp] En cooldown — ignorando de " + GetPeerName(senderPeerID) + ".")); return; } _lastStompTime = time; _stompInProgress = true; CultureInfo invariantCulture = CultureInfo.InvariantCulture; Vector3 val = AttackClients.ParseVec(posStr, invariantCulture); Log.LogWarning((object)"══════════════════════════════════════"); Log.LogWarning((object)"[SERVER Stomp] \ud83d\udd28 STOMP AOE"); Log.LogWarning((object)$"[SERVER Stomp] Boss pos : {val}"); Log.LogWarning((object)("[SERVER Stomp] Peer : " + GetPeerName(senderPeerID))); Log.LogWarning((object)"══════════════════════════════════════"); ZRoutedRpc.instance.InvokeRoutedRPC(ZRoutedRpc.Everybody, "EikthyrTracker_StompBroadcast", new object[1] { posStr }); ServerCoroutineRunner.Run(StompDamageSequence(val)); } [IteratorStateMachine(typeof(d__43))] private static IEnumerator StompDamageSequence(Vector3 bossPos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__43(0) { bossPos = bossPos }; } public static void OnStompBroadcast_Client(long senderPeerID, string payload) { if (!((Object)(object)ZNet.instance != (Object)null) || !ZNet.instance.IsServer()) { Log.LogInfo((object)"[CLIENT Stomp] \ud83d\udd28 Broadcast recibido — ejecutando visuales."); Player localPlayer = Player.m_localPlayer; if (!((Object)(object)localPlayer == (Object)null)) { AttackClients.ExecuteStompAOE(payload, (MonoBehaviour)(object)localPlayer); } } } public static void OnStompDamage_Client(long senderPeerID, string dmgStr) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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) if (!((Object)(object)ZNet.instance != (Object)null) || !ZNet.instance.IsServer()) { Player localPlayer = Player.m_localPlayer; if (!((Object)(object)localPlayer == (Object)null) && !((Character)localPlayer).IsDead()) { CultureInfo invariantCulture = CultureInfo.InvariantCulture; float result = 15f; float.TryParse(dmgStr, NumberStyles.Float, invariantCulture, out result); HitData val = new HitData(); val.m_point = ((Component)localPlayer).transform.position; val.m_damage.m_blunt = result; val.m_ranged = true; val.m_hitType = (HitType)6; ((Character)localPlayer).Damage(val); EikthyrTrackerPlugin.Log.LogWarning((object)$"[CLIENT Stomp] \ud83d\udca5 Daño: {result} blunt"); } } } public static void SendAttack(string attackName, int attackId) { if (ZRoutedRpc.instance != null && !((Object)(object)ZNet.instance == (Object)null)) { long num = (ZNet.instance.IsServer() ? ZNet.GetUID() : ZRoutedRpc.instance.GetServerPeerID()); ZRoutedRpc.instance.InvokeRoutedRPC(num, "EikthyrTracker_AttackDetected", new object[2] { attackName, attackId }); } } public static void SendSummoned(string playerName) { if (ZRoutedRpc.instance != null && !((Object)(object)ZNet.instance == (Object)null)) { long num = (ZNet.instance.IsServer() ? ZNet.GetUID() : ZRoutedRpc.instance.GetServerPeerID()); ZRoutedRpc.instance.InvokeRoutedRPC(num, "EikthyrTracker_BossSummoned", new object[1] { playerName }); } } public static void SendSpawnMinions(Vector3 eikthyrPos) { //IL_003f: 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_0055: Unknown result type (might be due to invalid IL or missing references) if (ZRoutedRpc.instance != null && !((Object)(object)ZNet.instance == (Object)null)) { long num = (ZNet.instance.IsServer() ? ZNet.GetUID() : ZRoutedRpc.instance.GetServerPeerID()); CultureInfo invariantCulture = CultureInfo.InvariantCulture; string text = string.Format(invariantCulture, "{0},{1},{2}", eikthyrPos.x, eikthyrPos.y, eikthyrPos.z); ZRoutedRpc.instance.InvokeRoutedRPC(num, "EikthyrTracker_SpawnMinions", new object[1] { text }); } } public static void ResetMinionFlag() { _minionsAlreadySpawned = false; } public static void SendLCRequest(Vector3 bossPos, Vector3 bossForward) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (ZRoutedRpc.instance != null && !((Object)(object)ZNet.instance == (Object)null)) { long num = (ZNet.instance.IsServer() ? ZNet.GetUID() : ZRoutedRpc.instance.GetServerPeerID()); CultureInfo invariantCulture = CultureInfo.InvariantCulture; string text = AttackClients.VecToStr(bossPos, invariantCulture) + "|" + AttackClients.VecToStr(bossForward, invariantCulture); ZRoutedRpc.instance.InvokeRoutedRPC(num, "EikthyrTracker_LCRequest", new object[1] { text }); } } public static void SendRaysRequest(Vector3 bossPos) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (ZRoutedRpc.instance != null && !((Object)(object)ZNet.instance == (Object)null)) { long num = (ZNet.instance.IsServer() ? ZNet.GetUID() : ZRoutedRpc.instance.GetServerPeerID()); CultureInfo invariantCulture = CultureInfo.InvariantCulture; string text = AttackClients.VecToStr(bossPos, invariantCulture); ZRoutedRpc.instance.InvokeRoutedRPC(num, "EikthyrTracker_RaysRequest", new object[1] { text }); } } public static void SendStompRequest(Vector3 bossPos) { //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (ZRoutedRpc.instance != null && !((Object)(object)ZNet.instance == (Object)null)) { long num = (ZNet.instance.IsServer() ? ZNet.GetUID() : ZRoutedRpc.instance.GetServerPeerID()); CultureInfo invariantCulture = CultureInfo.InvariantCulture; string text = AttackClients.VecToStr(bossPos, invariantCulture); ZRoutedRpc.instance.InvokeRoutedRPC(num, "EikthyrTracker_StompRequest", new object[1] { text }); } } private static string GetPeerName(long peerID) { if ((Object)(object)ZNet.instance == (Object)null) { return "desconocido"; } foreach (ZNetPeer connectedPeer in ZNet.instance.GetConnectedPeers()) { if (connectedPeer.m_uid == peerID) { return connectedPeer.m_playerName; } } if (peerID == ZNet.GetUID()) { return "Host/Server"; } return $"Peer-{peerID}"; } } [HarmonyPatch(typeof(Character), "Damage")] public static class Patch_Eikthyr_LightningImmunity { private static void Prefix(Character __instance, ref HitData hit) { if (!((Object)(object)__instance == (Object)null) && hit != null && EikthyrTrackerPlugin.IsEikthyr(__instance) && hit.m_damage.m_lightning > 0f) { hit.m_damage.m_lightning = 0f; EikthyrTrackerPlugin.Log.LogInfo((object)"[EikthyrTracker] ⚡ Daño lightning bloqueado en Eikthyr."); } } } [HarmonyPatch(typeof(OfferingBowl), "Interact")] public static class Patch_OfferingBowl_Interact { private static void Postfix(OfferingBowl __instance, Humanoid user, bool hold) { if (!hold && !((Object)(object)__instance == (Object)null) && !((Object)(object)user == (Object)null)) { GameObject bossPrefab = __instance.m_bossPrefab; if ((((bossPrefab != null) ? ((Object)bossPrefab).name : null) ?? "").Contains("Eikthyr")) { Player val = (Player)(object)((user is Player) ? user : null); string text = ((val != null) ? val.GetPlayerName() : "Desconocido"); EikthyrTrackerPlugin.Log.LogInfo((object)("[CLIENT DETECT] Altar Eikthyr activado por " + text)); RPC.SendSummoned(text); } } } } [HarmonyPatch(typeof(Character), "Awake")] public static class Patch_Eikthyr_Spawn { [CompilerGenerated] private sealed class d__1 : IEnumerator, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public Character eikthyr; private float 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //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_0098: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__2 = 0f; break; case 1: { <>1__state = -1; 5__2 += Time.deltaTime; if ((Object)(object)eikthyr == (Object)null) { return false; } ZNetView component = ((Component)eikthyr).GetComponent(); if ((Object)(object)component != (Object)null && component.IsValid()) { Vector3 position = ((Component)eikthyr).transform.position; ManualLogSource log = EikthyrTrackerPlugin.Log; object arg = position; ZNet instance = ZNet.instance; log.LogWarning((object)$"[EikthyrTracker] \ud83d\udc80 EIKTHYR SPAWNEADO en {arg} | isServer={((instance != null) ? new bool?(instance.IsServer()) : null)}"); RPC.SendSpawnMinions(position); return false; } break; } } if (5__2 < 5f) { <>2__current = null; <>1__state = 1; return true; } EikthyrTrackerPlugin.Log.LogError((object)"[EikthyrTracker] Timeout esperando ZNetView de Eikthyr."); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static void Postfix(Character __instance) { if (!((Object)(object)__instance == (Object)null) && EikthyrTrackerPlugin.IsEikthyr(__instance)) { ((MonoBehaviour)__instance).StartCoroutine(SendSpawnDelayed(__instance)); } } [IteratorStateMachine(typeof(d__1))] private static IEnumerator SendSpawnDelayed(Character eikthyr) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1(0) { eikthyr = eikthyr }; } } [HarmonyPatch(typeof(Attack), "Start")] public static class Patch_Attack_Start_Stomp { public static bool IgnoreNext; private static bool Prefix(Attack __instance, Humanoid character) { //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) if (IgnoreNext) { return true; } if ((Object)(object)character == (Object)null) { return true; } if (!EikthyrTrackerPlugin.IsEikthyr((Character)(object)character)) { return true; } if (__instance.m_attackAnimation != "attack_stomp") { return true; } ZNetView component = ((Component)character).GetComponent(); if ((Object)(object)component == (Object)null || !component.IsValid() || !component.IsOwner()) { return true; } EikthyrTrackerPlugin.Log.LogInfo((object)"[INTERCEPT] Attack.Start attack_stomp interceptado por owner — cancelando vanilla."); MonsterAI component2 = ((Component)character).GetComponent(); BaseAI component3 = ((Component)character).GetComponent(); if ((Object)(object)component2 != (Object)null) { ((Behaviour)component2).enabled = false; } if (component3 != null) { component3.StopMoving(); } ((Character)character).m_speed = 0f; ((Character)character).m_runSpeed = 0f; ((Character)character).m_walkSpeed = 0f; EikthyrTrackerPlugin.Log.LogInfo((object)"[INTERCEPT] Boss congelado localmente."); RPC.SendLCRequest(((Component)character).transform.position, ((Component)character).transform.forward); return false; } } [HarmonyPatch(typeof(ZSyncAnimation))] public static class Patch_ZSyncAnimation_SetTrigger { [HarmonyPrefix] [HarmonyPatch("SetTrigger", new Type[] { typeof(string) })] private static void Prefix(ZSyncAnimation __instance, string name) { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) Character val = ((__instance != null) ? ((Component)__instance).GetComponentInParent() : null); if ((Object)(object)val == (Object)null || !EikthyrTrackerPlugin.IsEikthyr(val)) { return; } ZNetView component = ((Component)val).GetComponent(); if (!((Object)(object)component == (Object)null) && component.IsValid() && component.IsOwner()) { int hashCode = name.GetHashCode(); EikthyrTrackerPlugin.Log.LogInfo((object)("[CLIENT DETECT] Trigger: " + name + " (soy el owner)")); if (name == "attack1") { EikthyrTrackerPlugin.Log.LogInfo((object)"[CLIENT DETECT] attack1 → enviando StompRequest al servidor."); RPC.SendStompRequest(((Component)val).transform.position); } else if (name == "attack2") { EikthyrTrackerPlugin.Log.LogInfo((object)"[CLIENT DETECT] attack2 → enviando RaysRequest al servidor."); RPC.SendRaysRequest(((Component)val).transform.position); } else if (name != "attack_stomp") { RPC.SendAttack(name, hashCode); } WriteAttackToZDO(val, name, hashCode); } } private static void WriteAttackToZDO(Character eikthyr, string attackName, int attackId) { ZNetView component = ((Component)eikthyr).GetComponent(); if (!((Object)(object)component == (Object)null) && component.IsValid() && component.IsOwner()) { ZDO zDO = component.GetZDO(); zDO.Set("eikthyr_last_attack", attackName); zDO.Set("eikthyr_attack_id", attackId); if ((Object)(object)ZNet.instance != (Object)null) { zDO.Set("eikthyr_attack_timestamp", (float)ZNet.instance.GetTimeSeconds()); } } } } [HarmonyPatch(typeof(ZSyncAnimation))] public static class Patch_ZSyncAnimation_RPC_SetTrigger { [HarmonyPrefix] [HarmonyPatch("RPC_SetTrigger", new Type[] { typeof(long), typeof(string) })] private static void Prefix(ZSyncAnimation __instance, long sender, string name) { Character val = ((__instance != null) ? ((Component)__instance).GetComponentInParent() : null); if (!((Object)(object)val == (Object)null) && EikthyrTrackerPlugin.IsEikthyr(val) && !(name == "attack1") && !(name == "attack2")) { RPC.SendAttack("RPC_" + name, name.GetHashCode()); } } } [HarmonyPatch(typeof(Aoe), "OnHit")] public static class Patch_Eikthyr_AoeOnHit { private static void Prefix(Aoe __instance, Collider collider, Vector3 hitPoint) { if ((Object)(object)__instance == (Object)null) { return; } Transform root = ((Component)__instance).transform.root; if ((((root != null) ? ((Object)root).name : null) ?? "").Contains("Eikthyr")) { object obj; if (collider == null) { obj = null; } else { GameObject gameObject = ((Component)collider).gameObject; obj = ((gameObject != null) ? ((Object)gameObject).name : null); } if (obj == null) { obj = "desconocido"; } string text = (string)obj; RPC.SendAttack("AOE_Hit_" + text, 900); } } } [HarmonyPatch(typeof(Character), "OnDeath")] public static class Patch_Eikthyr_Death { private static void Prefix(Character __instance) { if (!((Object)(object)__instance == (Object)null) && EikthyrTrackerPlugin.IsEikthyr(__instance)) { RPC.ResetMinionFlag(); RPC.SendAttack("BOSS_DEFEATED", -1); } } }