Decompiled source of VRISING VIVA v0.10.98
BepInEx/plugins/WolfDashMechanic.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using FMOD; using FMOD.Studio; using HarmonyLib; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.Attributes; using Il2CppInterop.Runtime.Injection; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem; using Il2CppSystem.Collections.Generic; using Microsoft.CodeAnalysis; using ProjectM; using ProjectM.Audio; using ProjectM.CastleBuilding; using ProjectM.Gameplay; using ProjectM.Gameplay.Scripting; using ProjectM.Gameplay.Systems; using ProjectM.Hybrid; using ProjectM.Network; using ProjectM.Pathfinding; using ProjectM.Scripting; using ProjectM.Sequencer; using ProjectM.Shared; using ProjectM.Tiles; using ProjectM.UI; using Stunlock.Core; using Stunlock.Fmod; using Stunlock.Sequencer; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; using Unity.Entities; using Unity.Mathematics; using Unity.Transforms; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0")] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace WolfDashMechanic { internal sealed class AngelRelay(ManualLogSource log) { internal const float HealthThreshold = 0.65f; private const float TickInterval = 2f; private const float Preparation = 4f; private const float SoloSwapInterval = 3f; private const int TicksPerTurn = 3; private const int RequiredSwaps = 4; private const int TotalTicks = 15; private const float Radius = 1.5f; private const float RuneRadius = 2.1f; private const float RuneOffset = 4f; private const float SwapMarkerDistance = 3.5f; private const float MaxLength = 17f; private readonly List<Entity> markers = new List<Entity>(); private Entity beam; private Entity swapPulse; private Entity effectPrefab; private Entity warningPrefab; private float3 origin; private float3 rune; private float2 direction; private float length; private quaternion rotation; private bool solo; private bool finished; private int tick; private int consecutive; private Entity lastReceiver; private double nextTick; internal bool IsActive => nextTick != 0.0; internal bool Completed { get { if (!IsActive) { return tick == 15; } return false; } } private bool RuneTurn { get { if (solo) { return tick / 3 % 2 == 1; } return false; } } internal bool CanStart(Health health) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) if (!finished && !IsActive && health.Value > 0f && ((ModifiableFloat)(ref health.MaxHealth)).Value > 0f) { return health.Value <= 0.65f * ((ModifiableFloat)(ref health.MaxHealth)).Value; } return false; } internal bool TryStart(World world, Entity boss, float3 center, quaternion roomFacing, Func<float3, bool> inRoom, List<(Entity Entity, float3 Position)> players, double now) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: 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_0087: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0163: 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0173: 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_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Expected O, but got Unknown //IL_01ca: 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_023c: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) EntityManager entityManager = world.EntityManager; ServerScriptMapper existingSystemManaged = world.GetExistingSystemManaged<ServerScriptMapper>(); PrefabLookupMap prefabLookupMap = PrefabCollectionSystem.GetPrefabLookupMap(world); solo = players.Count == 1; bool flag = default(bool); BepInExWarningLogInterpolatedStringHandler val; if (existingSystemManaged != null) { NativeParallelHashMap<PrefabGUID, Entity> guidToEntityMap = prefabLookupMap.GuidToEntityMap; if (guidToEntityMap.TryGetValue(new PrefabGUID(-602633418), ref warningPrefab) && TryFindTrack(world, center, roomFacing, solo, inRoom, out direction, out length, out rune)) { origin = center; rotation = quaternion.LookRotationSafe(new float3(direction.x, 0f, direction.y), new float3(0f, 1f, 0f)); ServerGameManager serverGameManager = existingSystemManaged.GetServerGameManager(); effectPrefab = serverGameManager._NetworkedSequence; float num = 36f + (solo ? 4f : 0f); try { for (float num2 = 1.5f; num2 <= length; num2 += 1.8f) { Mark(entityManager, Along(num2), num); } if (solo) { Mark(entityManager, rune, num); } PaladinBeam.Face(entityManager, boss, rotation); beam = PaladinBeam.BeginChannel(entityManager, serverGameManager, boss, center, rotation, num); if (beam == Entity.Null) { Cancel(entityManager); finished = true; ManualLogSource obj = log; val = new BepInExWarningLogInterpolatedStringHandler(32, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("ANJO_REVEZAMENTO_SEM_RAIO chefe="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<Entity>(boss); } obj.LogWarning(val); return false; } tick = (consecutive = 0); lastReceiver = Entity.Null; nextTick = now + 4.0; AngelSeals.TellPlayers(entityManager, players, solo ? "Revezamento da Luz! Comece nos círculos em linha. Quando o chat mandar trocar, vá ao círculo aceso fora da faixa." : "Revezamento da Luz! Interceptem o raio. Troquem quem fica na frente nos ticks 4, 7, 10 e 13."); ManualLogSource obj2 = log; bool flag2 = default(bool); BepInExInfoLogInterpolatedStringHandler val2 = new BepInExInfoLogInterpolatedStringHandler(59, 5, ref flag2); if (flag2) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("ANJO_REVEZAMENTO_INICIO chefe="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" solo="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<bool>(solo); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" origem="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<float3>(origin); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" alcance="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<float>(length); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" runa="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<float3>(rune); } obj2.LogInfo(val2); return true; } catch { Cancel(entityManager); finished = true; throw; } } } finished = true; ManualLogSource obj4 = log; val = new BepInExWarningLogInterpolatedStringHandler(33, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("ANJO_REVEZAMENTO_SEM_FAIXA chefe="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<Entity>(boss); } obj4.LogWarning(val); return false; } internal void Update(World world, Entity boss, List<(Entity Entity, float3 Position)> players, AngelRoomWipe wipe, double now) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_0081: Expected O, but got Unknown //IL_002a: 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_0093: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_048e: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0133: Expected O, but got Unknown //IL_0145: 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_0167: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) if (now < nextTick) { return; } EntityManager entityManager = world.EntityManager; bool flag2 = default(bool); if (((EntityManager)(ref entityManager)).Exists(beam) && ((EntityManager)(ref entityManager)).Exists(markers[0]) && !((EntityManager)(ref entityManager)).HasComponent<SpawnTag>(markers[0])) { if (solo) { List<Entity> list = markers; if (!((EntityManager)(ref entityManager)).Exists(list[list.Count - 1])) { goto IL_006f; } } bool swapDue = tick > 0 && tick % 3 == 0; Entity receiver; bool flag = TryFindReceiver(players, out receiver); string text = ((RuneTurn && (!flag || receiver != Entity.Null)) ? "a runa fora da faixa ficou vazia" : RecordTick(flag, receiver, swapDue)); BepInExInfoLogInterpolatedStringHandler val; if (text != null) { if (solo) { foreach (var player in players) { float3 item = player.Position; ManualLogSource obj = log; val = new BepInExInfoLogInterpolatedStringHandler(59, 3, ref flag2); if (flag2) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("ANJO_REVEZAMENTO_POSICAO jogador="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float3>(item); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" distancia_runa="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float>(math.distance(((float3)(ref item)).xz, ((float3)(ref rune)).xz), "F2"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" esperado="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(RuneTurn ? "runa" : "faixa"); } obj.LogInfo(val); } } Finish(entityManager); wipe.Trigger(entityManager, boss, players, now); if (players.Count > 0) { float[] array = new float[3] { 2f, length * 0.5f, length }; foreach (float distance in array) { MarkImpact(entityManager, Along(distance)); } AngelSeals.TellPlayers(entityManager, players, "Revezamento falhou: " + text + ". Explosão em toda a sala!"); } ManualLogSource obj2 = log; val = new BepInExInfoLogInterpolatedStringHandler(44, 4, ref flag2); if (flag2) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("ANJO_REVEZAMENTO_FALHA chefe="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" tick="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(tick + 1); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("/"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(15); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" motivo="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>(text); } obj2.LogInfo(val); return; } tick++; int num = (tick - 1) / 3; if (tick == 15) { Finish(entityManager); AngelSeals.TellPlayers(entityManager, players, $"Revezamento concluído. Trocas {num}/{4}."); } else { bool flag3 = tick % 3 == 0; if (flag3) { HighlightSwap(entityManager, RuneTurn ? rune : Along(3.5f)); } string value = ((!flag3) ? "" : ((!solo) ? " Próximo tick: troquem quem recebe o raio!" : (RuneTurn ? " Troca em 3 s: vá para a runa acesa!" : " Troca em 3 s: volte à faixa!"))); string value2 = ((receiver == Entity.Null) ? " Runa confirmada." : ""); AngelSeals.TellPlayers(entityManager, players, $"Raio {tick}/{15} · Trocas {num}/{4}.{value2}{value}"); nextTick = now + (double)((solo && flag3) ? 3f : 2f); } ManualLogSource obj3 = log; val = new BepInExInfoLogInterpolatedStringHandler(54, 6, ref flag2); if (flag2) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("ANJO_REVEZAMENTO_TICK chefe="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" tick="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(tick); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("/"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(15); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" trocas="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(num); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("/"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(4); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" receptor="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<Entity>(receiver); } obj3.LogInfo(val); return; } goto IL_006f; IL_006f: ManualLogSource obj4 = log; BepInExWarningLogInterpolatedStringHandler val2 = new BepInExWarningLogInterpolatedStringHandler(37, 1, ref flag2); if (flag2) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("ANJO_REVEZAMENTO_AVISO_PERDIDO chefe="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<Entity>(boss); } obj4.LogWarning(val2); Finish(entityManager); } private string? RecordTick(bool found, Entity receiver, bool swapDue) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0040: 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_005f: 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) if (!found) { return "ninguém interceptou o raio"; } if (tick != 0 && receiver == lastReceiver) { if (consecutive >= 3) { return "sobrecarga no quarto tick"; } if (swapDue) { return "faltou a troca obrigatória"; } } consecutive = ((tick == 0 || !(receiver == lastReceiver)) ? 1 : (consecutive + 1)); lastReceiver = receiver; return null; } private bool TryFindReceiver(List<(Entity Entity, float3 Position)> players, out Entity receiver) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a8: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) receiver = Entity.Null; float num = float.PositiveInfinity; bool runeTurn = RuneTurn; foreach (var player in players) { var (val, val2) = player; if (!(math.abs(val2.y - origin.y) > 1f)) { if (runeTurn && math.distancesq(((float3)(ref val2)).xz, ((float3)(ref rune)).xz) <= 4.4099994f) { receiver = Entity.Null; return true; } float2 val3 = ((float3)(ref val2)).xz - ((float3)(ref origin)).xz; float num2 = math.dot(val3, direction); float num3 = math.abs(val3.x * direction.y - val3.y * direction.x); if (!(num2 < 0.5f) && !(num2 > length) && !(num3 > 1.5f) && !(num2 >= num)) { num = num2; receiver = val; } } } return receiver != Entity.Null; } private static bool TryFindTrack(World world, float3 center, quaternion roomFacing, bool solo, Func<float3, bool> inRoom, out float2 direction, out float length, out float3 rune) { //IL_0002: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_0063: 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) //IL_006b: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_014f: 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) direction = default(float2); length = 0f; rune = default(float3); if (!AngelWave.TryGetRoomTiles(world, out var tiles)) { return false; } float3 val = math.rotate(roomFacing, new float3(0f, 0f, 1f)); float2 xz = ((float3)(ref val)).xz; float2 val2 = default(float2); ((float2)(ref val2))..ctor(0f - xz.y, xz.x); TilePolygons val3 = TileCollisionHelper.CreateLinePolygon(); try { MapData val4 = TileCollisionHelper.CreateMapData(val3, tiles); byte heightLevel = TileLayerUtility.GetHeightLevel(center.y); float2[] array = (float2[])(object)new float2[2] { xz, -xz }; foreach (float2 val5 in array) { float num = 0f; for (float num2 = 1f; num2 <= 17f; num2 += 1f) { float3 arg = Shift(center, val5 * num2); if (!inRoom(arg) || TileMapCollisionMath.CheckStaticCircle(ref val4, ((float3)(ref arg)).xz, heightLevel, 0.5f, (MapCollisionFlags)1)) { break; } num = num2; } if (num < 5f || num <= length) { continue; } float3 val6 = Shift(center, val5 * 3.5f + val2 * 4f); if (solo && (!inRoom(val6) || TileMapCollisionMath.CheckStaticCircle(ref val4, ((float3)(ref val6)).xz, heightLevel, 1.5f, (MapCollisionFlags)1))) { val6 = Shift(center, val5 * 3.5f - val2 * 4f); if (!inRoom(val6) || TileMapCollisionMath.CheckStaticCircle(ref val4, ((float3)(ref val6)).xz, heightLevel, 1.5f, (MapCollisionFlags)1)) { continue; } } direction = val5; length = num; rune = val6; } } finally { ((TilePolygons)(ref val3)).Dispose(); } return length > 0f; } private float3 Along(float distance) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) return Shift(origin, direction * distance); } private static float3 Shift(float3 point, float2 offset) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) return point + new float3(offset.x, 0f, offset.y); } private void HighlightSwap(EntityManager manager, float3 position) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0043: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_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_0097: 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_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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_00ef: Unknown result type (might be due to invalid IL or missing references) if (((EntityManager)(ref manager)).Exists(effectPrefab)) { if (((EntityManager)(ref manager)).Exists(swapPulse)) { DestroyUtility.CreateDestroyEvent(manager, swapPulse, (DestroyReason)0, (DestroyDebugReason)0); } swapPulse = ((EntityManager)(ref manager)).Instantiate(effectPrefab); ((EntityManager)(ref manager)).SetComponentData<SpawnSequenceForEntity>(swapPulse, new SpawnSequenceForEntity { SequenceGuid = PaladinBeam.Warning, PlayOnSelf = true, Scale = 1.35f }); ((EntityManager)(ref manager)).SetComponentData<Translation>(swapPulse, new Translation { Value = position }); ((EntityManager)(ref manager)).SetComponentData<Rotation>(swapPulse, new Rotation { Value = quaternion.identity }); ((EntityManager)(ref manager)).SetComponentData<LifeTime>(swapPulse, new LifeTime { Duration = (solo ? 3f : 2f) + 4f, EndAction = (LifeTimeEndAction)2 }); } } private void Mark(EntityManager manager, float3 position, float duration) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) Entity val = ((EntityManager)(ref manager)).Instantiate(warningPrefab); markers.Add(val); AngelWave.PrepareWarning(manager, val, position, rotation, duration); } private void MarkImpact(EntityManager manager, float3 position) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //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_0010: 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) Entity marker = ((EntityManager)(ref manager)).Instantiate(warningPrefab); AngelWave.PrepareWarning(manager, marker, position, rotation, 0.25f); } private void Finish(EntityManager manager) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) Cancel(manager); finished = true; } internal void ResetAttempt(EntityManager manager) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) Cancel(manager); finished = false; } internal void Cancel(EntityManager manager) { //IL_0010: 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_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_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_0093: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) foreach (Entity marker in markers) { if (((EntityManager)(ref manager)).Exists(marker)) { DestroyUtility.CreateDestroyEvent(manager, marker, (DestroyReason)0, (DestroyDebugReason)0); } } markers.Clear(); if (((EntityManager)(ref manager)).Exists(beam)) { DestroyUtility.CreateDestroyEvent(manager, beam, (DestroyReason)0, (DestroyDebugReason)0); } if (((EntityManager)(ref manager)).Exists(swapPulse)) { DestroyUtility.CreateDestroyEvent(manager, swapPulse, (DestroyReason)0, (DestroyDebugReason)0); } beam = Entity.Null; swapPulse = Entity.Null; nextTick = 0.0; } } internal sealed class AngelRoomWipe { private const float Damage = 10000f; private readonly List<Entity> targets = new List<Entity>(); private double resolveAt; internal int PendingCount => targets.Count; internal bool IsPending => resolveAt != 0.0; internal void Trigger(EntityManager manager, Entity boss, List<(Entity Entity, float3 Position)> players, double now) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) int num = StatChangeEvent.CreateDefaultStatChangeFlags() | 0x4020E; resolveAt = now + 0.15; foreach (var player in players) { Entity item = player.Entity; StatChangeEvent.CreateStatChangeEvent(manager, (StatType)0, item, -10000f, num, (StatChangeReason)1, boss); targets.Add(item); } } internal bool Resolve(World world, Entity boss, double now) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0072: 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_0074: Unknown result type (might be due to invalid IL or missing references) if (!IsPending) { return true; } if (now < resolveAt) { return false; } EntityManager entityManager = world.EntityManager; Entity val = (((EntityManager)(ref entityManager)).Exists(boss) ? boss : Entity.Null); Health val2 = default(Health); foreach (Entity target in targets) { if (((EntityManager)(ref entityManager)).Exists(target) && ((EntityManager)(ref entityManager)).TryGetComponentData<Health>(target, ref val2) && !val2.IsDead && val2.Value > 0f) { StatChangeUtility.KillEntity(entityManager, target, val, world.Time.ElapsedTime, (StatChangeReason)1, true); } } targets.Clear(); resolveAt = 0.0; return true; } } internal sealed class AngelSeals(ManualLogSource log) { private const float HealthThreshold = 0.8f; private const float EndHealthThreshold = 0.65f; private const double RepeatInterval = 10.0; private const int RoundCount = 3; private const float Radius = 1.5f; private const float MinSpacing = 3.2f; private const float SoloTime = 8f; private const float GroupTime = 10f; private Entity[] markers = Array.Empty<Entity>(); private float3[] sites = Array.Empty<float3>(); private Entity warningPrefab; private quaternion facing; private double deadline; private double nextRoundAt; private bool finished; private int completedRounds; internal AngelRoomWipe Wipe { get; } = new AngelRoomWipe(); internal bool IsActive => deadline != 0.0; internal bool Finished => finished; internal bool InSeries { get { if (!IsActive) { if (!finished) { return completedRounds > 0; } return false; } return true; } } internal bool ReadyForRound(double now) { if (!finished && !IsActive) { return now >= nextRoundAt; } return false; } internal bool NeedsUpdate(EntityManager manager, Entity boss, double now) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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) Health val = default(Health); if (finished || !((EntityManager)(ref manager)).TryGetComponentData<Health>(boss, ref val) || val.Value <= 0f || ((ModifiableFloat)(ref val.MaxHealth)).Value <= 0f) { return false; } if (val.Value <= 0.65f * ((ModifiableFloat)(ref val.MaxHealth)).Value) { Cancel(manager); finished = true; ManualLogSource obj = log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val2 = new BepInExInfoLogInterpolatedStringHandler(35, 3, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("ANJO_SELOS_ENCERRADOS chefe="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" vida="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<float>(val.Value); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("/"); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<float>(((ModifiableFloat)(ref val.MaxHealth)).Value); } obj.LogInfo(val2); return false; } if (!IsActive) { if (ReadyForRound(now)) { return val.Value <= 0.8f * ((ModifiableFloat)(ref val.MaxHealth)).Value; } return false; } return true; } internal void TryStart(World world, float3[][] rows, quaternion rotation, List<(Entity Entity, float3 Position)> players, double now) { //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0150: 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_0229: Expected O, but got Unknown if (players.Count == 0) { return; } EntityManager entityManager = world.EntityManager; PrefabLookupMap prefabLookupMap = PrefabCollectionSystem.GetPrefabLookupMap(world); NativeParallelHashMap<PrefabGUID, Entity> guidToEntityMap = prefabLookupMap.GuidToEntityMap; bool flag = default(bool); if (!guidToEntityMap.TryGetValue(new PrefabGUID(-602633418), ref warningPrefab) || !TryFindSites(world, rows, players.Count, sites, out float3[] result)) { ManualLogSource obj = log; BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(32, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("ANJO_SELOS_SEM_ESPACO jogadores="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(players.Count); } obj.LogWarning(val); TellPlayers(entityManager, players, "Selos da Luz indisponíveis. A sala não tem espaço livre para todos os selos."); finished = true; return; } sites = result; facing = rotation; float num = ((players.Count == 1) ? 8f : 10f); markers = (Entity[])(object)new Entity[sites.Length]; try { for (int i = 0; i < sites.Length; i++) { markers[i] = ((EntityManager)(ref entityManager)).Instantiate(warningPrefab); AngelWave.PrepareWarning(entityManager, markers[i], sites[i], facing, num + 1f); } deadline = now + (double)num; nextRoundAt = now + 10.0; TellPlayers(entityManager, players, (players.Count == 1) ? $"Selos da Luz {completedRounds + 1}/{3}! Fique dentro do selo ao fim de 8 segundos." : $"Selos da Luz {completedRounds + 1}/{3}! {sites.Length} selos, um jogador por selo. Fiquem neles até o fim dos 10 segundos."); ManualLogSource obj2 = log; BepInExInfoLogInterpolatedStringHandler val2 = new BepInExInfoLogInterpolatedStringHandler(44, 4, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("ANJO_SELOS_INICIO rodada="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(completedRounds + 1); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("/"); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(3); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" jogadores="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(players.Count); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" selos="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(sites.Length); } obj2.LogInfo(val2); } catch { Cancel(entityManager); finished = true; throw; } } internal void Update(World world, Entity boss, List<(Entity Entity, float3 Position)> players, double now) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Expected O, but got Unknown //IL_00ec: 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_00fa: 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_0127: Unknown result type (might be due to invalid IL or missing references) if (now < deadline) { return; } EntityManager entityManager = world.EntityManager; Entity[] array = markers; foreach (Entity val in array) { if (!((EntityManager)(ref entityManager)).Exists(val) || ((EntityManager)(ref entityManager)).HasComponent<SpawnTag>(val)) { Cancel(entityManager); finished = true; log.LogWarning((object)"ANJO_SELOS_AVISO_PERDIDO"); return; } } int num = 0; float3[] array2 = sites; for (int i = 0; i < array2.Length; i++) { if (IsOccupied(array2[i], players)) { num++; } } Cancel(entityManager); if (num == sites.Length && players.Count == sites.Length) { finished = ++completedRounds == 3; TellPlayers(entityManager, players, "Selos da Luz ativados. O ataque foi contido."); } else { finished = true; if (players.Count > 0) { TellPlayers(entityManager, players, "Selos da Luz falharam! A sala inteira foi atingida."); StartWipe(entityManager, boss, players, now); } } ManualLogSource obj = log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val2 = new BepInExInfoLogInterpolatedStringHandler(54, 5, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("ANJO_SELOS_FIM chefe="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" ocupados="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(num); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("/"); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(sites.Length); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" jogadores="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(players.Count); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" atingidos="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<int>(Wipe.PendingCount); } obj.LogInfo(val2); } private static bool IsOccupied(float3 center, List<(Entity Entity, float3 Position)> players) { //IL_0010: 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) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) foreach (var player in players) { float3 item = player.Position; if (math.abs(item.y - center.y) <= 1f && math.distancesq(((float3)(ref item)).xz, ((float3)(ref center)).xz) <= 2.25f) { return true; } } return false; } private void StartWipe(EntityManager manager, Entity boss, List<(Entity Entity, float3 Position)> players, double now) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) Wipe.Trigger(manager, boss, players, now); float3[] array = sites; foreach (float3 point in array) { Entity marker = ((EntityManager)(ref manager)).Instantiate(warningPrefab); AngelWave.PrepareWarning(manager, marker, point, facing, 0.25f); } } private static bool TryFindSites(World world, float3[][] rows, int count, float3[] previous, out float3[] result) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) result = Array.Empty<float3>(); if (!AngelWave.TryGetRoomTiles(world, out var tiles)) { return false; } List<float3> list = new List<float3>(); TilePolygons val = TileCollisionHelper.CreateLinePolygon(); try { MapData val2 = TileCollisionHelper.CreateMapData(val, tiles); foreach (float3[] array in rows) { for (int j = 0; j < array.Length; j++) { float3 val3 = array[j]; if (!TileMapCollisionMath.CheckStaticCircle(ref val2, ((float3)(ref val3)).xz, TileLayerUtility.GetHeightLevel(val3.y), 1.5f, (MapCollisionFlags)1)) { list.Add(val3); } } } } finally { ((TilePolygons)(ref val)).Dispose(); } if (list.Count < count) { return false; } float3[] array2 = (float3[])(object)new float3[count]; for (int k = 0; k < count; k++) { float num = float.NegativeInfinity; int num2 = -1; for (int l = 0; l < list.Count; l++) { float3 val4 = list[l]; float2 xz = ((float3)(ref val4)).xz; float num3 = float.PositiveInfinity; for (int m = 0; m < k; m++) { num3 = math.min(num3, math.distancesq(xz, ((float3)(ref array2[m])).xz)); } if (k == 0 || !(num3 < 10.240001f)) { bool flag = false; float3[] array = previous; for (int i = 0; i < array.Length; i++) { float3 val5 = array[i]; flag |= math.distancesq(xz, ((float3)(ref val5)).xz) < 0.01f; } float num4 = ((k == 0) ? 1f : num3) * (0.75f + 0.25f * Random.Shared.NextSingle()); if (flag) { num4 *= 0.1f; } if (num4 > num) { num2 = l; num = num4; } } } if (num2 < 0) { return false; } array2[k] = list[num2]; list.RemoveAt(num2); } result = array2; return true; } internal static void TellPlayers(EntityManager manager, List<(Entity Entity, float3 Position)> players, string message) { //IL_0018: 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) //IL_0020: 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_002d: 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_003c: Unknown result type (might be due to invalid IL or missing references) FixedString512Bytes val = default(FixedString512Bytes); ((FixedString512Bytes)(ref val))..ctor(message); PlayerCharacter val2 = default(PlayerCharacter); User val3 = default(User); foreach (var player in players) { Entity item = player.Entity; if (((EntityManager)(ref manager)).TryGetComponentData<PlayerCharacter>(item, ref val2) && ((EntityManager)(ref manager)).TryGetComponentData<User>(val2.UserEntity, ref val3)) { ServerChatUtils.SendSystemMessageToClient(manager, val3, ref val); } } } internal void ResetAttempt(EntityManager manager) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) Cancel(manager); sites = Array.Empty<float3>(); completedRounds = 0; nextRoundAt = 0.0; finished = false; } internal void Cancel(EntityManager manager) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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) //IL_001e: Unknown result type (might be due to invalid IL or missing references) Entity[] array = markers; foreach (Entity val in array) { if (((EntityManager)(ref manager)).Exists(val)) { DestroyUtility.CreateDestroyEvent(manager, val, (DestroyReason)0, (DestroyDebugReason)0); } } markers = Array.Empty<Entity>(); deadline = 0.0; } } internal sealed class AngelSentence(ManualLogSource log) { private const double Cooldown = 15.0; private const float WarningTime = 2f; private const float ChannelTime = 7f; private const float SoloRescueTime = 5f; private const float MaxRange = 16f; private const float RuneRadius = 1.5f; private const long MovementLock = 16L; private static readonly PrefabGUID MovementBuff = new PrefabGUID(-266552360); private Entity target; private Entity runeMarker; private Entity warning; private Entity beam; private Entity pulse; private Entity restraint; private float3 rune; private float3 anchor; private bool solo; private bool charged; private bool textErrorReported; private double nextProbe; private double nextCast; private double lockAt; private double killAt; private int lastCount; internal bool IsActive => target != Entity.Null; internal bool IsChanneling => killAt != 0.0; internal bool ReachedDeadline(double now) { if (IsChanneling) { return now >= killAt; } return false; } internal bool ShouldUpdate(double now) { if (!IsActive) { if (now >= nextProbe) { return now >= nextCast; } return false; } return true; } internal void ExpireRestraint(EntityManager manager, double now) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) if (ReachedDeadline(now)) { ReleaseRestraint(manager); } } internal bool Update(World world, Entity boss, List<(Entity Entity, float3 Position)> players, Func<float3, bool> inRoom, double now) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0177: 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_003a: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0254: 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_01bc: 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_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Expected O, but got Unknown //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Expected O, but got Unknown //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) EntityManager entityManager = world.EntityManager; if (!IsActive) { if (!ShouldUpdate(now)) { return false; } nextProbe = now + 0.5; Translation val = default(Translation); if (players.Count == 0 || !((EntityManager)(ref entityManager)).TryGetComponentData<Translation>(boss, ref val) || !inRoom(val.Value)) { nextCast = 0.0; return false; } AggroConsumer val2 = default(AggroConsumer); if (!((EntityManager)(ref entityManager)).TryGetComponentData<AggroConsumer>(boss, ref val2) || !TryPosition(players, ((NetworkedEntity)(ref val2.AggroTarget)).GetEntityOnServer(), out var position)) { return false; } if (nextCast == 0.0) { nextCast = now + 15.0; return false; } if (math.distancesq(((float3)(ref val.Value)).xz, ((float3)(ref position)).xz) <= 256f) { StartWarning(world, boss, ((NetworkedEntity)(ref val2.AggroTarget)).GetEntityOnServer(), position, val.Value, players, inRoom, now); } return false; } if (!((EntityManager)(ref entityManager)).Exists(runeMarker)) { Cancel(entityManager); return false; } if (!IsChanneling) { if (!TryPosition(players, target, out var position2)) { Cancel(entityManager); return false; } charged |= solo && AtRune(position2); if (now >= lockAt) { try { if (!StartChannel(world, boss, position2, players, now)) { Cancel(entityManager); } } catch { Cancel(entityManager); throw; } } return false; } if (!TargetAlive(entityManager)) { Cancel(entityManager); return false; } bool flag = default(bool); if (now >= killAt) { Entity victim = target; try { ShowCount(world, players, 0); } finally { Cancel(entityManager); } StatChangeUtility.KillEntity(entityManager, victim, boss, world.Time.ElapsedTime, (StatChangeReason)1, true); AngelSeals.TellPlayers(entityManager, players, "Sentença da Luz: o tempo acabou."); ManualLogSource obj2 = log; BepInExInfoLogInterpolatedStringHandler val3 = new BepInExInfoLogInterpolatedStringHandler(35, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val3).AppendLiteral("ANJO_SENTENCA_EXECUCAO chefe="); ((BepInExLogInterpolatedStringHandler)val3).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val3).AppendLiteral(" alvo="); ((BepInExLogInterpolatedStringHandler)val3).AppendFormatted<Entity>(victim); } obj2.LogInfo(val3); return players.TrueForAll(((Entity Entity, float3 Position) player) => player.Entity == victim); } if (!((EntityManager)(ref entityManager)).Exists(beam) || !((EntityManager)(ref entityManager)).Exists(restraint)) { Cancel(entityManager); return false; } bool num; if (!solo) { num = HasRescuer(players); } else { if (!charged) { goto IL_02fd; } num = now >= killAt - 2.0; } if (num) { Cancel(entityManager); AngelSeals.TellPlayers(entityManager, players, "Sentença da Luz rompida. Jogador libertado."); ManualLogSource obj3 = log; BepInExInfoLogInterpolatedStringHandler val3 = new BepInExInfoLogInterpolatedStringHandler(34, 2, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val3).AppendLiteral("ANJO_SENTENCA_ROMPIDA chefe="); ((BepInExLogInterpolatedStringHandler)val3).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val3).AppendLiteral(" solo="); ((BepInExLogInterpolatedStringHandler)val3).AppendFormatted<bool>(solo); } obj3.LogInfo(val3); return false; } goto IL_02fd; IL_02fd: HoldTarget(entityManager); int num2 = (int)Math.Ceiling(killAt - now); if (num2 != lastCount) { lastCount = num2; ShowCount(world, players, num2); if (num2 <= 2) { Destroy(entityManager, pulse); pulse = ShowLight(world, anchor, target, 0.9f, (num2 == 2) ? 1.25f : 1.75f); } } return false; } private void StartWarning(World world, Entity boss, Entity victim, float3 position, float3 source, List<(Entity Entity, float3 Position)> players, Func<float3, bool> inRoom, double now) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0041: 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_0061: 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_0067: 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_006e: 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_0079: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) if (!TryFindRune(world, position, source, inRoom, out rune)) { return; } EntityManager entityManager = world.EntityManager; PrefabLookupMap prefabLookupMap = PrefabCollectionSystem.GetPrefabLookupMap(world); NativeParallelHashMap<PrefabGUID, Entity> guidToEntityMap = prefabLookupMap.GuidToEntityMap; Entity val = default(Entity); if (!guidToEntityMap.TryGetValue(new PrefabGUID(-602633418), ref val)) { return; } target = victim; solo = players.Count == 1; charged = false; try { runeMarker = ((EntityManager)(ref entityManager)).Instantiate(val); AngelWave.PrepareWarning(entityManager, runeMarker, rune, quaternion.identity, 11f); warning = ShowLight(world, position, target, 2f, 1.2f); lockAt = now + 2.0; nextCast = now + 15.0; AngelSeals.TellPlayers(entityManager, players, solo ? "Sentença da Luz! Pise na Runa de Ruptura ao lado do seu personagem durante o aviso de 2 segundos." : "Sentença da Luz! Quando o raio prender o alvo, um aliado deve pisar na Runa de Ruptura."); ManualLogSource obj = log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val2 = new BepInExInfoLogInterpolatedStringHandler(44, 4, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("ANJO_SENTENCA_AVISO chefe="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" alvo="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<Entity>(target); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" solo="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<bool>(solo); ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral(" runa="); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted<float3>(rune); } obj.LogInfo(val2); } catch { Cancel(entityManager); throw; } } private bool StartChannel(World world, Entity boss, float3 position, List<(Entity Entity, float3 Position)> players, double now) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: 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_007e: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00b6: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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_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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: 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_01de: Expected O, but got Unknown //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) EntityManager entityManager = world.EntityManager; ServerScriptMapper existingSystemManaged = world.GetExistingSystemManaged<ServerScriptMapper>(); Translation val = default(Translation); if (existingSystemManaged == null || !((EntityManager)(ref entityManager)).TryGetComponentData<Translation>(boss, ref val)) { return false; } ServerGameManager serverGameManager = existingSystemManaged.GetServerGameManager(); Entity val2 = target; PrefabGUID movementBuff = MovementBuff; Entity val3 = default(Entity); if (((ServerGameManager)(ref serverGameManager)).TryGetBuff(val2, ((PrefabGUID)(ref movementBuff)).ToIdentifier(), ref val3)) { return false; } float3 val4 = position - val.Value; val4.y = 0f; quaternion rotation = ((math.lengthsq(val4) > 0.01f) ? quaternion.LookRotationSafe(val4, new float3(0f, 1f, 0f)) : ((EntityManager)(ref entityManager)).GetComponentData<Rotation>(boss).Value); if (math.lengthsq(val4) > 256f) { return false; } PaladinBeam.Face(entityManager, boss, rotation); beam = PaladinBeam.BeginChannel(entityManager, serverGameManager, boss, val.Value, rotation, 7f); if (beam == Entity.Null) { return false; } if (!((ServerGameManager)(ref serverGameManager)).TryInstantiateBuffEntityImmediate(boss, target, MovementBuff, ref restraint, (OnSpawnedDelegate)null, 1)) { return false; } ((EntityManager)(ref entityManager)).SetComponentData<LifeTime>(restraint, new LifeTime { Duration = 7f, EndAction = (LifeTimeEndAction)2 }); ((EntityManager)(ref entityManager)).RemoveComponent<HideWeapon>(restraint); ((EntityManager)(ref entityManager)).RemoveComponent<DiminishingReturn>(restraint); ((EntityManager)(ref entityManager)).RemoveComponent<DiminishingReturnElement>(restraint); BuffModificationFlagData componentData = ((EntityManager)(ref entityManager)).GetComponentData<BuffModificationFlagData>(restraint); componentData.ModificationTypes = 16L; ((EntityManager)(ref entityManager)).SetComponentData<BuffModificationFlagData>(restraint, componentData); anchor = position; killAt = now + 7.0; lastCount = 7; Destroy(entityManager, warning); warning = Entity.Null; HoldTarget(entityManager); ShowCount(world, players, lastCount); ManualLogSource obj = log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val5 = new BepInExInfoLogInterpolatedStringHandler(53, 3, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val5).AppendLiteral("ANJO_SENTENCA_CANALIZADA chefe="); ((BepInExLogInterpolatedStringHandler)val5).AppendFormatted<Entity>(boss); ((BepInExLogInterpolatedStringHandler)val5).AppendLiteral(" alvo="); ((BepInExLogInterpolatedStringHandler)val5).AppendFormatted<Entity>(target); ((BepInExLogInterpolatedStringHandler)val5).AppendLiteral(" runa_carregada="); ((BepInExLogInterpolatedStringHandler)val5).AppendFormatted<bool>(charged); } obj.LogInfo(val5); return true; } private void HoldTarget(EntityManager manager) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_0133: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_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) Translation val = default(Translation); if (((EntityManager)(ref manager)).TryGetComponentData<Translation>(target, ref val) && (math.distancesq(((float3)(ref val.Value)).xz, ((float3)(ref anchor)).xz) > 0.0004f || math.abs(val.Value.y - anchor.y) > 0.75f)) { float3 value = default(float3); ((float3)(ref value))..ctor(anchor.x, (math.abs(val.Value.y - anchor.y) < 0.75f) ? val.Value.y : anchor.y, anchor.z); ((EntityManager)(ref manager)).SetComponentData<Translation>(target, new Translation { Value = value }); if (((EntityManager)(ref manager)).HasComponent<LastTranslation>(target)) { ((EntityManager)(ref manager)).SetComponentData<LastTranslation>(target, new LastTranslation { Value = value }); } } Velocity val2 = default(Velocity); if (((EntityManager)(ref manager)).TryGetComponentData<Velocity>(target, ref val2) && math.any(val2.Value != float3.zero)) { ((EntityManager)(ref manager)).SetComponentData<Velocity>(target, default(Velocity)); } } private bool AtRune(float3 position) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (math.abs(position.y - rune.y) <= 1f) { return math.distancesq(((float3)(ref position)).xz, ((float3)(ref rune)).xz) <= 2.25f; } return false; } private bool HasRescuer(List<(Entity Entity, float3 Position)> players) { //IL_0011: 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) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) foreach (var (val, position) in players) { if (val != target && AtRune(position)) { return true; } } return false; } private bool TargetAlive(EntityManager manager) { //IL_0003: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) Health val = default(Health); if (!((EntityManager)(ref manager)).Exists(target) || !((EntityManager)(ref manager)).TryGetComponentData<Health>(target, ref val) || val.IsDead || val.Value <= 0f) { return false; } PlayerCharacter val2 = default(PlayerCharacter); if (((EntityManager)(ref manager)).TryGetComponentData<PlayerCharacter>(target, ref val2)) { User val3 = default(User); if (((EntityManager)(ref manager)).TryGetComponentData<User>(val2.UserEntity, ref val3)) { return val3.IsConnected; } return false; } return true; } private static bool TryPosition(List<(Entity Entity, float3 Position)> players, Entity entity, out float3 position) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) foreach (var player in players) { if (player.Entity == entity && entity != Entity.Null) { position = player.Position; return true; } } position = default(float3); return false; } private static bool TryFindRune(World world, float3 target, float3 boss, Func<float3, bool> inRoom, out float3 found) { //IL_0002: 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) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: 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_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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_00de: 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_00fb: Unknown result type (might be due to invalid IL or missing references) found = default(float3); if (!AngelWave.TryGetRoomTiles(world, out var tiles)) { return false; } float2 val = math.normalizesafe(((float3)(ref target)).xz - ((float3)(ref boss)).xz, new float2(0f, 1f)); float2 val2 = default(float2); ((float2)(ref val2))..ctor(0f - val.y, val.x); TilePolygons val3 = TileCollisionHelper.CreateLinePolygon(); try { MapData val4 = TileCollisionHelper.CreateMapData(val3, tiles); float2[] array = (float2[])(object)new float2[4] { val2, -val2, val, -val }; foreach (float2 val5 in array) { float3 val6 = target + new float3(val5.x, 0f, val5.y) * 3f; if (inRoom(val6) && !TileMapCollisionMath.CheckStaticCircle(ref val4, ((float3)(ref val6)).xz, TileLayerUtility.GetHeightLevel(val6.y), 1.5f, (MapCollisionFlags)1)) { found = val6; return true; } } } finally { ((TilePolygons)(ref val3)).Dispose(); } return false; } private static Entity ShowLight(World world, float3 position, Entity unit, float duration, float scale) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_009d: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) EntityManager entityManager = world.EntityManager; ServerScriptMapper existingSystemManaged = world.GetExistingSystemManaged<ServerScriptMapper>(); if (existingSystemManaged == null) { return Entity.Null; } Entity networkedSequence = existingSystemManaged.GetServerGameManager()._NetworkedSequence; if (!((EntityManager)(ref entityManager)).Exists(networkedSequence)) { return Entity.Null; } Entity val = ((EntityManager)(ref entityManager)).Instantiate(networkedSequence); ((EntityManager)(ref entityManager)).SetComponentData<SpawnSequenceForEntity>(val, new SpawnSequenceForEntity { SequenceGuid = PaladinBeam.Warning, Target = new NetworkedEntity(false, unit), Scale = scale }); ((EntityManager)(ref entityManager)).SetComponentData<Translation>(val, new Translation { Value = position }); ((EntityManager)(ref entityManager)).SetComponentData<Rotation>(val, new Rotation {