using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Unity.Collections; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("LethalCompanyMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LethalCompanyMod")] [assembly: AssemblyTitle("LethalCompanyMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [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 LethalCompanyMod { [BepInPlugin("anton.lethalcompanymod", "LethalCompanyMod", "1.18.2")] public sealed class Plugin : BaseUnityPlugin { private sealed class AnimatedSlashSprite { internal Transform Transform; internal Renderer Renderer; internal Vector3 Anchor; internal Vector3 Drift; internal Vector3 BaseScale; internal Color Tint; internal float Phase; internal float Speed; internal float Roll; internal bool CameraAttached; } private sealed class SoulMeterVisual { internal GameObject Root; internal Image Fill; internal Transform Target; } private sealed class HiddenTerrainState { internal Behaviour Terrain; internal bool WasEnabled; } private sealed class ArenaEntityState { internal Vector3 Position; internal Quaternion Rotation; internal Vector3 Velocity; internal Vector3 AngularVelocity; } private class NetworkDomainSession { internal ulong Id; internal DomainKind Domain; internal Vector3 SourceCenter; internal Vector3 ArenaCenter; internal ulong CasterId; internal float Duration; internal readonly Dictionary Participants = new Dictionary(); } private sealed class HostDomainSession : NetworkDomainSession { internal float TimeLeft; internal float OpeningTimeLeft = 2.35f; internal float OpeningEndRealtime; internal float EndRealtime; internal float EffectTimeLeft; internal float GambleTimeLeft; internal bool ArenaActivated; internal readonly HashSet ParticipantClientIds = new HashSet(); internal readonly Dictionary EnemyStates = new Dictionary(); internal readonly Dictionary EnemySpeeds = new Dictionary(); internal readonly Dictionary ItemStates = new Dictionary(); internal readonly Dictionary NetworkEntityStates = new Dictionary(); internal readonly Dictionary PlayerSoulValues = new Dictionary(); internal readonly Dictionary EnemySoulValues = new Dictionary(); internal readonly HashSet SoulDeathsSent = new HashSet(); } private enum DomainKind { InfiniteVoid, MalevolentShrineOpen, MalevolentShrineClosed, IdleDeathGamble, SelfEmbodimentOfPerfection } private enum DomainInputCommand { ToggleMenu, Select1, Select2, Select3, Select4, Select5, Confirm, Direct1, Direct2, Direct3, Direct4, Direct5 } private readonly struct DomainStyle { public readonly Color BoundaryColor; public readonly Color CoreColor; public readonly Color AccentColor; public readonly Color LightColor; public readonly Color FogColor; public readonly Color TextColor; public readonly float LightIntensity; public DomainStyle(Color boundaryColor, Color coreColor, Color accentColor, Color lightColor, Color fogColor, Color textColor, float lightIntensity) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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_0016: 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_001e: 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_0026: 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) BoundaryColor = boundaryColor; CoreColor = coreColor; AccentColor = accentColor; LightColor = lightColor; FogColor = fogColor; TextColor = textColor; LightIntensity = lightIntensity; } } public const string PluginGuid = "anton.lethalcompanymod"; public const string PluginName = "LethalCompanyMod"; public const string PluginVersion = "1.18.2"; private const float DomainDuration = 30f; private const float IdleDeathGambleMinDuration = 45f; private const float IdleDeathGambleMaxDuration = 70f; private const float OpeningDuration = 2.35f; private const float DomainRadius = 26f; private const float MalevolentShrineOpenRadius = 55f; private const int MalevolentShrineOpenDamage = 3; private const float ForcedJackpotChance = 0.065f; private const float EffectInterval = 0.35f; private const float ClosedBarrierRadius = 23.4f; private const float SelfEmbodimentInteriorScale = 1.5f; private const float BarrierReturnOffset = 1.5f; private const float InfiniteVoidMovementMultiplier = 0.015f; private const float JackpotDuration = 100f; private const float JackpotRegenInterval = 0.1f; private const int JackpotRegenHealAmount = 32; private const int JackpotMinimumHealth = 92; private const ulong NoJackpotRegenClientId = ulong.MaxValue; private const float GambleSpinInterval = 4.2f; private const float DomainRequestRetryInterval = 1.5f; private const int MaxDomainRequestAttempts = 4; private const float ArenaFloorSize = 62f; private const float ArenaCaptureRadius = 26f; private const float ArenaSafeSpawnHeight = 0.7f; private const float ArenaFallRecoveryDepth = 1.25f; private const float ExteriorBarrierPostTeleportDelay = 0.2f; private const float MaximumSoul = 100f; private const float MinimumSoulDrainPerSecond = 2.75f; private const float MaximumSoulDrainPerSecond = 20f; private const float SoulDrainFalloffDistance = 14f; private const float SoulExileDepth = 1500f; private const string OpenDomainMessage = "LethalCompanyMod.OpenDomain"; private const string RequestDomainMessage = "LethalCompanyMod.RequestDomain"; private const string CloseDomainMessage = "LethalCompanyMod.CloseDomain"; private const string GambleRollMessage = "LethalCompanyMod.GambleRoll"; private const string ShrineDamageMessage = "LethalCompanyMod.ShrineDamage"; private const string DomainDeniedMessage = "LethalCompanyMod.DomainDenied"; private const string DomainConfigMessage = "LethalCompanyMod.DomainConfig"; private const string SoulStateMessage = "LethalCompanyMod.SoulState"; private const string SoulDeathMessage = "LethalCompanyMod.SoulDeath"; private readonly Dictionary originalEnemySpeeds = new Dictionary(); private readonly Dictionary domainSounds = new Dictionary(); private readonly HashSet missingSoundWarnings = new HashSet(); private readonly Dictionary domainUsesConsumedThisMoon = new Dictionary(); private ConfigEntry domainUsesPerMoonConfig; private ConfigEntry infiniteDomainUsesConfig; private AudioClip? slotRollClip; private AudioClip? jackpotSoundClip; private AudioClip? selfEmbodimentOpeningClip; private Texture2D? infiniteVoidGalaxyTexture; private Texture2D? infiniteVoidBlackHoleTexture; private Texture2D? infiniteVoidInkTexture; private Texture2D? infiniteVoidStreakTexture; private Texture2D? malevolentShrineOpenBarrierTexture; private Texture2D? malevolentShrineClosedBarrierTexture; private Texture2D? idleDeathGambleBarrierTexture; private Texture2D? malevolentShrineGroundSealTexture; private Texture2D? malevolentShrineSlashTexture; private Texture2D? malevolentShrineSlashCoreTexture; private Texture2D? softParticleTexture; private readonly List infiniteVoidRotators = new List(); private readonly List infiniteVoidPulseLines = new List(); private readonly List infiniteVoidParticleSystems = new List(); private readonly List infiniteVoidParticleRates = new List(); private readonly List infiniteVoidOverlayImages = new List(); private readonly List infiniteVoidOverlayRects = new List(); private readonly List malevolentShrineSlashLines = new List(); private readonly List malevolentShrineSlashPhases = new List(); private readonly List malevolentShrineSlashSpeeds = new List(); private readonly List malevolentShrineSlashWidths = new List(); private readonly List malevolentShrineSlashSprites = new List(); private readonly List openingRotators = new List(); private readonly List openingRotationSpeeds = new List(); private readonly List openingTimedParticles = new List(); private readonly List openingParticleStopProgress = new List(); private readonly List idleDeathGambleRotators = new List(); private readonly List idleDeathGambleRotationSpeeds = new List(); private readonly List idleDeathGambleRotationAxes = new List(); private readonly List idleDeathGambleChaseLights = new List(); private readonly List idleDeathGambleChaseScales = new List(); private readonly Dictionary hiddenDomainRenderers = new Dictionary(); private readonly Dictionary hiddenDomainLights = new Dictionary(); private readonly List hiddenDomainTerrains = new List(); private readonly Dictionary persistentDomainArenas = new Dictionary(); private readonly List persistentArenaNavMeshes = new List(); private readonly List persistentArenaNavMeshData = new List(); private readonly Dictionary arenaEnemyStates = new Dictionary(); private readonly Dictionary arenaItemStates = new Dictionary(); private readonly Dictionary arenaNetworkEntityStates = new Dictionary(); private readonly Dictionary domainParticipantSourcePositions = new Dictionary(); private readonly Dictionary hostDomainSessions = new Dictionary(); private readonly Dictionary knownDomainSessions = new Dictionary(); private readonly Dictionary domainExteriorRoots = new Dictionary(); private readonly HashSet pendingExteriorBarrierSessions = new HashSet(); private readonly Dictionary sessionDomainArenas = new Dictionary(); private readonly Dictionary domainInputActions = new Dictionary(); private readonly Dictionary domainInputLatches = new Dictionary(); private readonly Dictionary localPlayerSoulValues = new Dictionary(); private readonly Dictionary localEnemySoulValues = new Dictionary(); private readonly Dictionary localDirectEnemySoulValues = new Dictionary(); private readonly Dictionary playerSoulMeters = new Dictionary(); private readonly Dictionary enemySoulMeters = new Dictionary(); private Renderer? infiniteVoidGalaxyRenderer; private Renderer? activeDomainInteriorRenderer; private Transform? shrineMouthRoot; private GameObject? shrineCameraVfxRoot; private GameObject? domainCameraBackdropRoot; private bool atmosphereCaptured; private bool originalFogEnabled; private FogMode originalFogMode; private Color originalFogColor; private float originalFogDensity; private Color originalAmbientLight; private Material? originalSkybox; private Material? domainSkyboxMaterial; private Material? selfEmbodimentHandMaterial; private Material? selfEmbodimentHandAccentMaterial; private Material? selfEmbodimentCrystalMaterial; private Transform? selfEmbodimentCrystalRoot; private float selfEmbodimentVisualTime; private bool skyboxCaptured; private Camera? domainGameplayCamera; private CameraClearFlags originalCameraClearFlags; private Color originalCameraBackgroundColor; private bool domainCameraCaptured; private bool domainArenaActivated; private bool localPlayerInDomainArena; private bool localPlayerReturnCaptured; private int arenaRoundInstanceId; private float idleDeathGambleVisualTime; private float idleDeathGambleRollPulse; private DomainKind selectedDomain; private bool menuOpen; private bool domainOpen; private bool openingActive; private bool domainVisualBuilt; private bool domainAffectsGameplay; private bool readyTipShown; private bool inputDebugLogged; private bool networkHandlersRegistered; private NetworkManager? registeredNetworkManager; private Harmony? harmony; private bool runtimeCallbacksRegistered; private bool runtimeDriverLogged; private bool runtimeShutdown; private bool pluginHostDestroyed; private bool detachedRuntimeTickLogged; private bool applicationQuitting; private bool runtimeResourcesInitialized; private bool runtimeInitializing; private bool domainSoundLoadScheduled; private bool jackpotSoundLoadScheduled; private bool selfEmbodimentOpeningWarningLogged; private bool domainRequestPending; private DomainKind pendingDomainRequest; private Vector3 pendingDomainCenter; private ulong pendingDomainCasterId; private float domainRequestRetryTimer; private int domainRequestAttempts; private bool moonUsageStateInitialized; private bool previousShipHasLanded; private bool domainUsesAvailableOnMoon; private bool hostConfigReceived; private int syncedDomainUsesPerMoon = 1; private bool syncedInfiniteDomainUses; private float configSyncTimer; private int moonUsageLevelId = int.MinValue; private int lastTickFrame = -1; private int lastLateTickFrame = -1; private int lastMenuToggleFrame = -1; private int lastDirectHotkeyFrame = -1; private float openingTime; private float domainTimeLeft; private float activeDomainDuration; private float openingEndRealtime; private float domainEndRealtime; private float effectTimer; private float gambleTimer; private float barrierTipCooldown; private float jackpotRegenTimeLeft; private float jackpotRegenTick; private float spinDisplayTimeLeft; private int jackpotRoll; private ulong casterClientId; private ulong activeDomainSessionId; private ulong nextHostDomainSessionId = 1uL; private Vector3 activeDomainArenaCenter; private ulong jackpotRegenClientId = ulong.MaxValue; private Vector3 domainCenter; private Vector3 domainSourceCenter; private Vector3 localPlayerReturnPosition; private Quaternion localPlayerReturnRotation; private Vector3 lastLocalPlayerPosition; private bool hasLastLocalPlayerPosition; private GameObject? driverHost; private DomainRuntimeDriver? runtimeDriver; private GameObject? menuCanvasRoot; private Text? menuText; private GameObject? spinCanvasRoot; private Text? spinText; private GameObject? soulHudCanvasRoot; private Image? soulHudFill; private Text? soulHudText; private GameObject? domainRoot; private GameObject? openingRoot; private GameObject? infiniteVoidOverlayRoot; private GameObject? jackpotSoundObject; private AudioSource? jackpotSoundSource; private Light? domainLight; private string statusText = "Press 0, F1, or Insert to open the menu."; private string soundDirectory = string.Empty; private string textureDirectory = string.Empty; private float infiniteVoidVisualTime; private float malevolentShrineVisualTime; internal static ManualLogSource Log { get; private set; } internal static Plugin? Instance { get; private set; } private void Awake() { Instance = this; Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)("Plugin Awake: enabled=" + ((Behaviour)this).enabled + ", active=" + ((Component)this).gameObject.activeInHierarchy + ", host=" + ((Object)((Component)this).gameObject).name + ".")); InitializeRuntimeHooks(); BindConfig(); InitializeInputActions(); soundDirectory = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location) ?? Paths.PluginPath, "sounds"); textureDirectory = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location) ?? Paths.PluginPath, "textures"); Log.LogInfo((object)"Runtime scene objects are deferred until the first post-chainloader frame."); Log.LogInfo((object)"LethalCompanyMod 1.18.2 loaded. 0/F1/Insert menu, F2-F6 domains, multiplayer opening sync enabled."); } private void OnEnable() { if (Log != null) { Log.LogInfo((object)("Plugin OnEnable: active=" + ((Component)this).gameObject.activeInHierarchy + ".")); } } private void Start() { Log.LogInfo((object)"Plugin Start callback fired."); } private void OnDisable() { if (Log != null) { Log.LogInfo((object)"Plugin OnDisable callback fired; persistent runtime driver remains active."); } } private void BindConfig() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown domainUsesPerMoonConfig = ((BaseUnityPlugin)this).Config.Bind("Domain Usage", "Domains Per Moon", 1, new ConfigDescription("How many Domain Expansions each player may use after the ship lands. The host's value controls multiplayer lobbies.", (AcceptableValueBase)(object)new AcceptableValueRange(1, 20), Array.Empty())); infiniteDomainUsesConfig = ((BaseUnityPlugin)this).Config.Bind("Domain Usage", "Infinite Domains (Debug)", false, "Allows unlimited Domain Expansions while the ship is landed. The host's value controls multiplayer lobbies."); domainUsesPerMoonConfig.SettingChanged += OnDomainConfigChanged; infiniteDomainUsesConfig.SettingChanged += OnDomainConfigChanged; } private void OnDomainConfigChanged(object sender, EventArgs args) { configSyncTimer = 0f; Log.LogInfo((object)("Domain usage config changed: uses=" + GetConfiguredDomainUsesPerMoon() + ", infinite=" + infiniteDomainUsesConfig.Value + ".")); } private void OnDestroy() { if (!applicationQuitting && !runtimeShutdown) { pluginHostDestroyed = true; if (Log != null) { Log.LogInfo((object)"Plugin Unity host was destroyed after chainloading; static runtime hooks will bootstrap the post-boot driver."); } } else { ShutdownRuntime(); } } internal void ShutdownRuntime() { if (runtimeShutdown) { return; } runtimeShutdown = true; if (Log != null) { Log.LogInfo((object)"Shutting down detached domain runtime."); } UnregisterNetworkHandlers(); StopJackpotSound(); CloseDomain(broadcast: false); ClearKnownDomainSessions(); ClearPersistentDomainArenas(); DisposeInputActions(); UnregisterRuntimeCallbacks(); if (harmony != null) { try { harmony.UnpatchSelf(); } catch (Exception ex) { if (Log != null) { Log.LogDebug((object)("Runtime hooks were already removed: " + ex.Message)); } } harmony = null; } if ((Object)(object)driverHost != (Object)null) { Object.Destroy((Object)(object)driverHost); driverHost = null; } runtimeDriver = null; Instance = null; } private void AttachDriver() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown if (!IsRuntimeDriverAlive()) { driverHost = new GameObject("LethalCompanyModDriverHost"); Object.DontDestroyOnLoad((Object)(object)driverHost); runtimeDriver = driverHost.AddComponent(); runtimeDriver.Initialize(this); Log.LogInfo((object)("Top-level runtime driver attached: enabled=" + ((Behaviour)runtimeDriver).enabled + ", active=" + driverHost.activeInHierarchy + ".")); } } private bool IsRuntimeDriverAlive() { if (driverHost != null && (Object)(object)driverHost != (Object)null && runtimeDriver != null) { return (Object)(object)runtimeDriver != (Object)null; } return false; } private bool EnsureRuntimeInitialized() { if (runtimeShutdown || applicationQuitting) { return false; } if (runtimeResourcesInitialized && IsRuntimeDriverAlive()) { return true; } if (runtimeInitializing) { return false; } runtimeInitializing = true; try { if (!runtimeResourcesInitialized) { CreateCanvasMenu(); CreateSpinDisplay(); LoadVisualTextures(); if ((Object)(object)slotRollClip == (Object)null) { slotRollClip = CreateSlotRollClip(); } runtimeResourcesInitialized = true; } if (!IsRuntimeDriverAlive()) { AttachDriver(); } int length = Enum.GetValues(typeof(DomainKind)).Length; if ((domainSounds.Count < length || (Object)(object)selfEmbodimentOpeningClip == (Object)null) && !domainSoundLoadScheduled) { domainSoundLoadScheduled = StartRuntimeCoroutine(LoadDomainSoundsTracked()); } if ((Object)(object)jackpotSoundClip == (Object)null && !jackpotSoundLoadScheduled) { jackpotSoundLoadScheduled = StartRuntimeCoroutine(LoadJackpotSoundTracked()); } Log.LogInfo((object)"Post-chainloader runtime scene objects initialized."); return IsRuntimeDriverAlive(); } catch (Exception ex) { runtimeResourcesInitialized = false; Log.LogError((object)("Could not initialize the post-chainloader runtime: " + ex)); return false; } finally { runtimeInitializing = false; } } private bool StartRuntimeCoroutine(IEnumerator routine) { if (!IsRuntimeDriverAlive() && !runtimeInitializing) { EnsureRuntimeInitialized(); } DomainRuntimeDriver domainRuntimeDriver = runtimeDriver; if (domainRuntimeDriver != null && (Object)(object)domainRuntimeDriver != (Object)null) { domainRuntimeDriver.StartManagedCoroutine(routine); return true; } Log.LogWarning((object)"Could not start a runtime coroutine because no live post-boot driver exists."); return false; } internal void NotifyRuntimeDriverDestroyed(DomainRuntimeDriver driver) { if (runtimeDriver == driver) { runtimeDriver = null; driverHost = null; if (!applicationQuitting && !runtimeShutdown) { domainSoundLoadScheduled = false; jackpotSoundLoadScheduled = false; Log.LogInfo((object)"Runtime driver was removed during scene cleanup and will be recreated on the next game frame."); } } } internal void NotifyApplicationQuitting() { applicationQuitting = true; ShutdownRuntime(); } private void InitializeRuntimeHooks() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown RegisterRuntimeCallbacks(); try { harmony = new Harmony("anton.lethalcompanymod"); int num = 0; num += PatchRuntimeMethod(typeof(StartOfRound), "Update", "HarmonyTickPostfix"); num += PatchRuntimeMethod(typeof(PlayerControllerB), "Update", "HarmonyTickPostfix"); num += PatchRuntimeMethod(typeof(HUDManager), "Update", "HarmonyTickPostfix"); num += PatchRuntimeMethod(typeof(StartOfRound), "LateUpdate", "HarmonyLateTickPostfix"); num += PatchRuntimeMethod(typeof(PlayerControllerB), "LateUpdate", "HarmonyLateTickPostfix"); Log.LogInfo((object)("Installed " + num + "/5 explicit game update hooks for the domain runtime driver.")); } catch (Exception ex) { harmony = null; Log.LogWarning((object)("Could not install explicit game runtime hooks; render and Unity drivers remain active: " + ex)); } } private int PatchRuntimeMethod(Type targetType, string targetMethodName, string postfixMethodName) { //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown if (harmony == null) { return 0; } MethodInfo methodInfo = AccessTools.Method(targetType, targetMethodName, (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.Method(typeof(Plugin), postfixMethodName, (Type[])null, (Type[])null); if (methodInfo == null || methodInfo2 == null) { Log.LogWarning((object)("Runtime hook target was not found: " + targetType.FullName + "." + targetMethodName + ".")); return 0; } harmony.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); return 1; } private void RegisterRuntimeCallbacks() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown if (!runtimeCallbacksRegistered) { Application.onBeforeRender += new UnityAction(OnBeforeRenderRuntimeTick); Camera.onPreCull = (CameraCallback)Delegate.Combine((Delegate?)(object)Camera.onPreCull, (Delegate?)new CameraCallback(OnCameraPreCullRuntimeTick)); Application.quitting += NotifyApplicationQuitting; runtimeCallbacksRegistered = true; Log.LogInfo((object)"Registered render and camera runtime callbacks."); } } private void UnregisterRuntimeCallbacks() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown if (runtimeCallbacksRegistered) { Application.onBeforeRender -= new UnityAction(OnBeforeRenderRuntimeTick); Camera.onPreCull = (CameraCallback)Delegate.Remove((Delegate?)(object)Camera.onPreCull, (Delegate?)new CameraCallback(OnCameraPreCullRuntimeTick)); Application.quitting -= NotifyApplicationQuitting; runtimeCallbacksRegistered = false; } } private void OnBeforeRenderRuntimeTick() { LogRuntimeDriverOnce("Application.onBeforeRender"); Tick(); LateTick(); } private void OnCameraPreCullRuntimeTick(Camera camera) { LogRuntimeDriverOnce("Camera.onPreCull"); Tick(); LateTick(); } internal void LogRuntimeDriverOnce(string driver) { if (!runtimeDriverLogged) { runtimeDriverLogged = true; Log.LogInfo((object)("Domain runtime driver is active through " + driver + ".")); } } private static void HarmonyTickPostfix() { Plugin instance = Instance; if (instance != null) { instance.LogRuntimeDriverOnce("explicit Harmony Update postfix"); instance.Tick(); } } private static void HarmonyLateTickPostfix() { Plugin instance = Instance; if (instance != null) { instance.LogRuntimeDriverOnce("explicit Harmony LateUpdate postfix"); instance.LateTick(); } } public void Update() { Tick(); } public void LateUpdate() { LateTick(); } internal void LateTick() { if (lastLateTickFrame == Time.frameCount) { return; } lastLateTickFrame = Time.frameCount; if (domainOpen && !openingActive && domainVisualBuilt) { MaintainRemoteDomainPlayerRepresentations(); if (!HasClosedBarrier() || localPlayerInDomainArena) { EnforceDomainAtmosphere(); } } } internal void Tick() { if (runtimeShutdown || applicationQuitting || lastTickFrame == Time.frameCount) { return; } lastTickFrame = Time.frameCount; if ((pluginHostDestroyed || Time.frameCount >= 5) && !EnsureRuntimeInitialized()) { return; } if (pluginHostDestroyed && !detachedRuntimeTickLogged) { detachedRuntimeTickLogged = true; Log.LogInfo((object)"Detached runtime confirmed active after BepInEx Manager teardown."); } LogInputDebugOnce(); HandleMenuKeyboard(); HandleDirectDomainHotkeys(); HandleMenuToggle(); TryRegisterNetworkHandlers(); UpdatePendingDomainRequest(); UpdateConfigSynchronization(); UpdateHostDomainSessions(); CloseUnnetworkedDomainIfCasterDied(); EnsurePersistentDomainArenas(); UpdateDomainUsageMoonState(); ShowReadyTipOnce(); UpdateCanvasMenu(); UpdateSpinDisplay(); UpdateSoulMeterVisuals(); ApplyJackpotRegeneration(); if (domainOpen) { UpdateOpeningAndDomainVisuals(); ApplyInfiniteVoidPlayerSlow(); ApplyClosedBarrierContainment(); domainTimeLeft = domainEndRealtime - Time.realtimeSinceStartup; effectTimer -= Time.unscaledDeltaTime; if (!openingActive && effectTimer <= 0f) { effectTimer = 0.35f; ApplyDomainEffect(); } if (domainTimeLeft <= -2f && !IsHostManagingActiveDomain()) { CloseDomain(broadcast: false); } } } private void HandleMenuToggle() { Keyboard current = Keyboard.current; bool fallbackHeld = IsHeld((current != null) ? current.digit0Key : null, (KeyCode)48) || IsHeld((current != null) ? current.numpad0Key : null, (KeyCode)256) || IsHeld((current != null) ? current.f1Key : null, (KeyCode)282) || IsHeld((current != null) ? current.insertKey : null, (KeyCode)277); if (ConsumeCommandPress(DomainInputCommand.ToggleMenu, fallbackHeld) && lastMenuToggleFrame != Time.frameCount) { lastMenuToggleFrame = Time.frameCount; menuOpen = !menuOpen; statusText = (menuOpen ? "Domain menu opened." : "Domain menu closed."); Log.LogInfo((object)statusText); } } private void CreateCanvasMenu() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0063: 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_008e: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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_0104: 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_0119: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)menuCanvasRoot != (Object)null)) { menuCanvasRoot = new GameObject("DomainMenuCanvas"); Object.DontDestroyOnLoad((Object)(object)menuCanvasRoot); Canvas obj = menuCanvasRoot.AddComponent(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 32767; CanvasScaler obj2 = menuCanvasRoot.AddComponent(); obj2.uiScaleMode = (ScaleMode)1; obj2.referenceResolution = new Vector2(1920f, 1080f); obj2.matchWidthOrHeight = 0.5f; menuCanvasRoot.AddComponent(); GameObject val = new GameObject("Panel"); val.transform.SetParent(menuCanvasRoot.transform, false); ((Graphic)val.AddComponent()).color = new Color(0f, 0f, 0f, 0.74f); RectTransform component = val.GetComponent(); component.anchorMin = new Vector2(0.03f, 0.12f); component.anchorMax = new Vector2(0.38f, 0.58f); component.offsetMin = Vector2.zero; component.offsetMax = Vector2.zero; GameObject val2 = new GameObject("MenuText"); val2.transform.SetParent(val.transform, false); menuText = val2.AddComponent(); menuText.font = Resources.GetBuiltinResource("Arial.ttf"); menuText.fontSize = 18; ((Graphic)menuText).color = new Color(0.78f, 1f, 1f, 1f); menuText.alignment = (TextAnchor)0; menuText.horizontalOverflow = (HorizontalWrapMode)0; menuText.verticalOverflow = (VerticalWrapMode)1; RectTransform component2 = val2.GetComponent(); component2.anchorMin = Vector2.zero; component2.anchorMax = Vector2.one; component2.offsetMin = new Vector2(16f, 12f); component2.offsetMax = new Vector2(-16f, -12f); menuCanvasRoot.SetActive(false); } } private void CreateSpinDisplay() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0063: 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_0082: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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) if (!((Object)(object)spinCanvasRoot != (Object)null)) { spinCanvasRoot = new GameObject("IdleDeathGambleSpinCanvas"); Object.DontDestroyOnLoad((Object)(object)spinCanvasRoot); Canvas obj = spinCanvasRoot.AddComponent(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 32766; CanvasScaler obj2 = spinCanvasRoot.AddComponent(); obj2.uiScaleMode = (ScaleMode)1; obj2.referenceResolution = new Vector2(1920f, 1080f); obj2.matchWidthOrHeight = 0.5f; GameObject val = new GameObject("SpinText"); val.transform.SetParent(spinCanvasRoot.transform, false); spinText = val.AddComponent(); spinText.font = Resources.GetBuiltinResource("Arial.ttf"); spinText.fontSize = 52; spinText.fontStyle = (FontStyle)1; spinText.supportRichText = true; spinText.alignment = (TextAnchor)4; spinText.horizontalOverflow = (HorizontalWrapMode)1; spinText.verticalOverflow = (VerticalWrapMode)1; RectTransform component = val.GetComponent(); component.anchorMin = new Vector2(0.34f, 0.67f); component.anchorMax = new Vector2(0.66f, 0.84f); component.offsetMin = Vector2.zero; component.offsetMax = Vector2.zero; spinCanvasRoot.SetActive(false); } } private void UpdateSpinDisplay() { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)spinCanvasRoot == (Object)null) { CreateSpinDisplay(); } if ((Object)(object)spinCanvasRoot == (Object)null) { return; } if (spinDisplayTimeLeft > 0f) { spinDisplayTimeLeft -= Time.unscaledDeltaTime; if (!spinCanvasRoot.activeSelf) { spinCanvasRoot.SetActive(true); } if ((Object)(object)spinText != (Object)null) { Color color = ((Graphic)spinText).color; color.a = Mathf.Clamp01(spinDisplayTimeLeft / 0.55f); ((Graphic)spinText).color = color; } } else if (spinCanvasRoot.activeSelf) { spinCanvasRoot.SetActive(false); } } private void ShowGambleRoll(int roll, bool jackpot) { //IL_0065: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)spinText == (Object)null) { CreateSpinDisplay(); } if (!((Object)(object)spinText == (Object)null)) { spinText.text = (jackpot ? ("JACKPOT\n" + roll + "") : ("ROLL\n" + roll + "")); ((Graphic)spinText).color = Color.white; spinDisplayTimeLeft = (jackpot ? 3.2f : 2.1f); if ((Object)(object)spinCanvasRoot != (Object)null) { spinCanvasRoot.SetActive(true); } } } private void CreateSoulHud() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0063: 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_00aa: 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_00ed: 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_010b: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Expected O, but got Unknown //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: 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_02a9: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)soulHudCanvasRoot != (Object)null)) { soulHudCanvasRoot = new GameObject("SelfEmbodimentSoulHud"); Object.DontDestroyOnLoad((Object)(object)soulHudCanvasRoot); Canvas obj = soulHudCanvasRoot.AddComponent(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 32765; CanvasScaler obj2 = soulHudCanvasRoot.AddComponent(); obj2.uiScaleMode = (ScaleMode)1; obj2.referenceResolution = new Vector2(1920f, 1080f); obj2.matchWidthOrHeight = 0.5f; ((Graphic)CreateSoulImage("Soul HUD Glow", soulHudCanvasRoot.transform, new Color(0.82f, 0.12f, 1f, 0.24f), new Vector2(0.027f, 0.29f), new Vector2(0.066f, 0.69f))).raycastTarget = false; ((Graphic)CreateSoulImage("Soul HUD Frame", soulHudCanvasRoot.transform, new Color(0.92f, 0.36f, 1f, 1f), new Vector2(0.033f, 0.31f), new Vector2(0.06f, 0.67f))).raycastTarget = false; ((Graphic)CreateSoulImage("Soul HUD Backing", soulHudCanvasRoot.transform, new Color(0.045f, 0.008f, 0.06f, 0.96f), new Vector2(0.037f, 0.318f), new Vector2(0.056f, 0.662f))).raycastTarget = false; soulHudFill = CreateSoulImage("Soul HUD Fill", soulHudCanvasRoot.transform, Color.white, new Vector2(0.039f, 0.322f), new Vector2(0.054f, 0.658f)); soulHudFill.type = (Type)0; ((Graphic)soulHudFill).rectTransform.pivot = new Vector2(0.5f, 0f); ((Graphic)soulHudFill).raycastTarget = false; GameObject val = new GameObject("Soul HUD Text"); val.transform.SetParent(soulHudCanvasRoot.transform, false); soulHudText = val.AddComponent(); soulHudText.font = Resources.GetBuiltinResource("Arial.ttf"); soulHudText.fontSize = 23; soulHudText.fontStyle = (FontStyle)1; soulHudText.alignment = (TextAnchor)3; ((Graphic)soulHudText).color = new Color(0.96f, 0.82f, 1f, 1f); RectTransform component = val.GetComponent(); component.anchorMin = new Vector2(0.066f, 0.43f); component.anchorMax = new Vector2(0.18f, 0.57f); component.offsetMin = Vector2.zero; component.offsetMax = Vector2.zero; soulHudCanvasRoot.SetActive(false); } } private static Image CreateSoulImage(string name, Transform parent, Color color, Vector2 anchorMin, Vector2 anchorMax) { //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_001b: 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_002e: 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_0040: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); Image val2 = val.AddComponent(); ((Graphic)val2).color = color; RectTransform component = val.GetComponent(); component.anchorMin = anchorMin; component.anchorMax = anchorMax; component.offsetMin = Vector2.zero; component.offsetMax = Vector2.zero; return val2; } private void UpdateSoulMeterVisuals() { if (!domainOpen || openingActive || !localPlayerInDomainArena || selectedDomain != DomainKind.SelfEmbodimentOfPerfection) { if ((Object)(object)soulHudCanvasRoot != (Object)null && soulHudCanvasRoot.activeSelf) { soulHudCanvasRoot.SetActive(false); } return; } Camera val = StartOfRound.Instance?.localPlayerController?.gameplayCamera ?? Camera.main; if ((Object)(object)val == (Object)null) { return; } ulong localClientId = GetLocalClientId(); HashSet hashSet = new HashSet(); foreach (KeyValuePair localPlayerSoulValue in localPlayerSoulValues) { if (localPlayerSoulValue.Key != localClientId) { PlayerControllerB val2 = FindPlayerByActualClientId(localPlayerSoulValue.Key); if (!((Object)(object)val2 == (Object)null) && !IsPlayerDead(val2)) { hashSet.Add(localPlayerSoulValue.Key); UpdateSoulMeter(playerSoulMeters, localPlayerSoulValue.Key, ((Component)val2).transform, localPlayerSoulValue.Value, val); } } } PruneSoulMeters(playerSoulMeters, hashSet); HashSet hashSet2 = new HashSet(); foreach (KeyValuePair localDirectEnemySoulValue in localDirectEnemySoulValues) { if (!((Object)(object)localDirectEnemySoulValue.Key == (Object)null) && !IsEnemyDead(localDirectEnemySoulValue.Key)) { ulong localEnemyVisualId = GetLocalEnemyVisualId(localDirectEnemySoulValue.Key); hashSet2.Add(localEnemyVisualId); UpdateSoulMeter(enemySoulMeters, localEnemyVisualId, ((Component)localDirectEnemySoulValue.Key).transform, localDirectEnemySoulValue.Value, val); } } foreach (KeyValuePair localEnemySoulValue in localEnemySoulValues) { if (hashSet2.Contains(localEnemySoulValue.Key)) { continue; } Transform val3 = FindEnemyTransformByNetworkId(localEnemySoulValue.Key); if (!((Object)(object)val3 == (Object)null)) { EnemyAI val4 = ((Component)val3).GetComponent() ?? ((Component)val3).GetComponentInChildren(); if (!((Object)(object)val4 != (Object)null) || !IsEnemyDead(val4)) { hashSet2.Add(localEnemySoulValue.Key); UpdateSoulMeter(enemySoulMeters, localEnemySoulValue.Key, val3, localEnemySoulValue.Value, val); } } } PruneSoulMeters(enemySoulMeters, hashSet2); if (localPlayerSoulValues.TryGetValue(localClientId, out var value)) { if ((Object)(object)soulHudCanvasRoot == (Object)null) { CreateSoulHud(); } if ((Object)(object)soulHudCanvasRoot != (Object)null && !soulHudCanvasRoot.activeSelf) { soulHudCanvasRoot.SetActive(true); } SetSoulFill(soulHudFill, value); if ((Object)(object)soulHudText != (Object)null) { soulHudText.text = "SOUL " + Mathf.CeilToInt(value); } } else if ((Object)(object)soulHudCanvasRoot != (Object)null && soulHudCanvasRoot.activeSelf) { soulHudCanvasRoot.SetActive(false); } } private void UpdateSoulMeter(Dictionary meters, ulong id, Transform target, float soul, Camera camera) { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0061: 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_0070: 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_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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) if (!meters.TryGetValue(id, out SoulMeterVisual value) || (Object)(object)value.Root == (Object)null) { value = (meters[id] = CreateWorldSoulMeter(target, camera)); } value.Target = target; float soulMeterTargetHeight = GetSoulMeterTargetHeight(target); value.Root.transform.position = target.position + Vector3.up * soulMeterTargetHeight + ((Component)camera).transform.right * 0.72f; value.Root.transform.rotation = Quaternion.LookRotation(value.Root.transform.position - ((Component)camera).transform.position, ((Component)camera).transform.up); float num = ((soul <= 20f) ? (1f + Mathf.Sin(Time.unscaledTime * 11f) * 0.08f) : 1f); value.Root.transform.localScale = Vector3.one * (0.0065f * num); SetSoulFill(value.Fill, soul); } private SoulMeterVisual CreateWorldSoulMeter(Transform target, Camera camera) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0070: 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_00a8: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Soul Meter - " + ((Object)target).name); if ((Object)(object)domainRoot != (Object)null) { val.transform.SetParent(domainRoot.transform, false); } Canvas obj = val.AddComponent(); obj.renderMode = (RenderMode)2; obj.worldCamera = camera; obj.overrideSorting = true; obj.sortingOrder = 32000; val.GetComponent().sizeDelta = new Vector2(42f, 172f); ((Graphic)CreateSoulImage("Soul Meter Glow", val.transform, new Color(0.76f, 0.08f, 1f, 0.28f), new Vector2(-0.12f, -0.04f), new Vector2(1.12f, 1.04f))).raycastTarget = false; ((Graphic)CreateSoulImage("Soul Meter Frame", val.transform, new Color(0.96f, 0.38f, 1f, 1f), Vector2.zero, Vector2.one)).raycastTarget = false; ((Graphic)CreateSoulImage("Soul Meter Backing", val.transform, new Color(0.035f, 0.004f, 0.05f, 0.98f), new Vector2(0.16f, 0.035f), new Vector2(0.84f, 0.965f))).raycastTarget = false; Image val2 = CreateSoulImage("Soul Meter Fill", val.transform, Color.white, new Vector2(0.22f, 0.065f), new Vector2(0.78f, 0.935f)); val2.type = (Type)0; ((Graphic)val2).rectTransform.pivot = new Vector2(0.5f, 0f); ((Graphic)val2).raycastTarget = false; val.transform.localScale = Vector3.one * 0.0065f; return new SoulMeterVisual { Root = val, Fill = val2, Target = target }; } private static float GetSoulMeterTargetHeight(Transform target) { //IL_0001: 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_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_0035: Unknown result type (might be due to invalid IL or missing references) float num = target.position.y + 1.8f; Renderer[] componentsInChildren = ((Component)target).GetComponentsInChildren(); foreach (Renderer val in componentsInChildren) { if ((Object)(object)val != (Object)null) { float num2 = num; Bounds bounds = val.bounds; num = Mathf.Max(num2, ((Bounds)(ref bounds)).max.y); } } return Mathf.Clamp(num - target.position.y + 0.35f, 1.7f, 4.8f); } private static void SetSoulFill(Image? fill, float soul) { //IL_0033: 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_0069: 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) if (!((Object)(object)fill == (Object)null)) { float num = Mathf.Clamp01(soul / 100f); fill.fillAmount = 1f; ((Transform)((Graphic)fill).rectTransform).localScale = new Vector3(1f, num, 1f); ((Graphic)fill).color = (Color)((soul <= 20f) ? new Color(1f, 0.08f, 0.16f, 1f) : ((soul <= 50f) ? new Color(1f, 0.2f, 0.78f, 1f) : Color.white)); } } private static Transform? FindEnemyTransformByNetworkId(ulong networkObjectId) { NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || singleton.SpawnManager == null || !singleton.SpawnManager.SpawnedObjects.TryGetValue(networkObjectId, out var value) || (Object)(object)value == (Object)null) { return null; } EnemyAI val = ((Component)value).GetComponent() ?? ((Component)value).GetComponentInChildren(); if (!((Object)(object)val != (Object)null)) { return null; } return ((Component)val).transform; } private static void PruneSoulMeters(Dictionary meters, HashSet visibleIds) { foreach (ulong item in new List(meters.Keys)) { SoulMeterVisual soulMeterVisual = meters[item]; if (!visibleIds.Contains(item) || !((Object)(object)soulMeterVisual.Root != (Object)null) || !((Object)(object)soulMeterVisual.Target != (Object)null)) { if ((Object)(object)soulMeterVisual.Root != (Object)null) { Object.Destroy((Object)(object)soulMeterVisual.Root); } meters.Remove(item); } } } private void ClearSoulMeterVisuals() { foreach (SoulMeterVisual value in playerSoulMeters.Values) { if ((Object)(object)value.Root != (Object)null) { Object.Destroy((Object)(object)value.Root); } } foreach (SoulMeterVisual value2 in enemySoulMeters.Values) { if ((Object)(object)value2.Root != (Object)null) { Object.Destroy((Object)(object)value2.Root); } } playerSoulMeters.Clear(); enemySoulMeters.Clear(); localPlayerSoulValues.Clear(); localEnemySoulValues.Clear(); localDirectEnemySoulValues.Clear(); if ((Object)(object)soulHudCanvasRoot != (Object)null) { soulHudCanvasRoot.SetActive(false); } } private void UpdateCanvasMenu() { if ((Object)(object)menuCanvasRoot == (Object)null) { CreateCanvasMenu(); } if ((Object)(object)menuCanvasRoot != (Object)null && menuCanvasRoot.activeSelf != menuOpen) { menuCanvasRoot.SetActive(menuOpen); } if (!((Object)(object)menuText == (Object)null)) { menuText.text = "DOMAIN EXPANSION MENU\n\n1 - Infinite Void" + SelectedMark(DomainKind.InfiniteVoid) + "\n2 - Malevolent Shrine Open" + SelectedMark(DomainKind.MalevolentShrineOpen) + "\n3 - Malevolent Shrine Closed" + SelectedMark(DomainKind.MalevolentShrineClosed) + "\n4 - Idle Death Gamble" + SelectedMark(DomainKind.IdleDeathGamble) + "\n5 - Self-Embodiment of Perfection" + SelectedMark(DomainKind.SelfEmbodimentOfPerfection) + "\n\nDomain uses: " + GetLocalDomainUsesDisplay() + "\nEnter - Open selected domain\nF2/F3/F4/F5/F6 - Direct domains\n0 / F1 / Insert - Toggle menu\n\n" + statusText; } } private string SelectedMark(DomainKind domain) { if (selectedDomain != domain) { return string.Empty; } return " <"; } private string GetLocalDomainUsesDisplay() { if (!domainUsesAvailableOnMoon) { return "0"; } if (InfiniteDomainUsesEnabled()) { return "Infinite"; } int effectiveDomainUsesPerMoon = GetEffectiveDomainUsesPerMoon(); int consumedDomainUses = GetConsumedDomainUses(GetLocalClientId()); return Mathf.Max(0, effectiveDomainUsesPerMoon - consumedDomainUses) + " / " + effectiveDomainUsesPerMoon; } private void HandleMenuKeyboard() { Keyboard current = Keyboard.current; if (menuOpen) { if (ConsumeCommandPress(DomainInputCommand.Select1, IsHeld((current != null) ? current.digit1Key : null, (KeyCode)49) || IsHeld((current != null) ? current.numpad1Key : null, (KeyCode)257))) { selectedDomain = DomainKind.InfiniteVoid; } if (ConsumeCommandPress(DomainInputCommand.Select2, IsHeld((current != null) ? current.digit2Key : null, (KeyCode)50) || IsHeld((current != null) ? current.numpad2Key : null, (KeyCode)258))) { selectedDomain = DomainKind.MalevolentShrineOpen; } if (ConsumeCommandPress(DomainInputCommand.Select3, IsHeld((current != null) ? current.digit3Key : null, (KeyCode)51) || IsHeld((current != null) ? current.numpad3Key : null, (KeyCode)259))) { selectedDomain = DomainKind.MalevolentShrineClosed; } if (ConsumeCommandPress(DomainInputCommand.Select4, IsHeld((current != null) ? current.digit4Key : null, (KeyCode)52) || IsHeld((current != null) ? current.numpad4Key : null, (KeyCode)260))) { selectedDomain = DomainKind.IdleDeathGamble; } if (ConsumeCommandPress(DomainInputCommand.Select5, IsHeld((current != null) ? current.digit5Key : null, (KeyCode)53) || IsHeld((current != null) ? current.numpad5Key : null, (KeyCode)261))) { selectedDomain = DomainKind.SelfEmbodimentOfPerfection; } if (ConsumeCommandPress(DomainInputCommand.Confirm, IsHeld((current != null) ? current.enterKey : null, (KeyCode)13) || IsHeld((current != null) ? current.numpadEnterKey : null, (KeyCode)271))) { menuOpen = false; OpenSelectedDomain(); } } } private void HandleDirectDomainHotkeys() { Keyboard current = Keyboard.current; if (lastDirectHotkeyFrame != Time.frameCount) { if (ConsumeCommandPress(DomainInputCommand.Direct1, IsHeld((current != null) ? current.f2Key : null, (KeyCode)283))) { OpenDomainDirect(DomainKind.InfiniteVoid); } else if (ConsumeCommandPress(DomainInputCommand.Direct2, IsHeld((current != null) ? current.f3Key : null, (KeyCode)284))) { OpenDomainDirect(DomainKind.MalevolentShrineOpen); } else if (ConsumeCommandPress(DomainInputCommand.Direct3, IsHeld((current != null) ? current.f4Key : null, (KeyCode)285))) { OpenDomainDirect(DomainKind.MalevolentShrineClosed); } else if (ConsumeCommandPress(DomainInputCommand.Direct4, IsHeld((current != null) ? current.f5Key : null, (KeyCode)286))) { OpenDomainDirect(DomainKind.IdleDeathGamble); } else if (ConsumeCommandPress(DomainInputCommand.Direct5, IsHeld((current != null) ? current.f6Key : null, (KeyCode)287))) { OpenDomainDirect(DomainKind.SelfEmbodimentOfPerfection); } } } private void OpenDomainDirect(DomainKind domain) { lastDirectHotkeyFrame = Time.frameCount; selectedDomain = domain; menuOpen = false; OpenSelectedDomain(); } private void OpenSelectedDomain() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if ((Object)(object)val == (Object)null) { statusText = "No local player found yet."; Log.LogWarning((object)statusText); return; } Vector3 position = ((Component)val).transform.position; ulong localClientId = GetLocalClientId(); NetworkManager singleton = NetworkManager.Singleton; if (domainOpen) { ShowDomainBusy(); } else if ((Object)(object)singleton != (Object)null && singleton.IsListening && !singleton.IsServer) { BeginDomainRequest(selectedDomain, position, localClientId); statusText = "Domain request sent to host: " + GetDomainName(selectedDomain) + "."; ShowTip("Domain requested", GetDomainName(selectedDomain)); } else if ((Object)(object)singleton != (Object)null && singleton.IsListening && singleton.IsServer && IsClientInsideActiveHostDomain(localClientId)) { ShowDomainBusy(); } else if (!domainUsesAvailableOnMoon) { ShowDomainUnavailableInShip(); } else if (!HasDomainUseRemaining(localClientId)) { ShowDomainUsageDenied(); } else if (TryConsumeDomainUse(localClientId)) { float duration = RollDomainDuration(selectedDomain); Dictionary participants = CaptureDomainParticipants(selectedDomain, position, localClientId); if ((Object)(object)singleton != (Object)null && singleton.IsListening && singleton.IsServer) { StartHostDomainSession(selectedDomain, position, localClientId, duration, participants); } else { OpenDomainLocal(selectedDomain, position, localClientId, affectsGameplay: true, duration, participants, 0uL); } } } private void UpdateDomainUsageMoonState() { StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null) { moonUsageStateInitialized = false; previousShipHasLanded = false; domainUsesAvailableOnMoon = false; moonUsageLevelId = int.MinValue; domainUsesConsumedThisMoon.Clear(); return; } object memberValue = GetMemberValue(instance, "shipHasLanded"); bool flag = default(bool); int num; if (memberValue is bool) { flag = (bool)memberValue; num = 1; } else { num = 0; } bool flag2 = (byte)((uint)num & (flag ? 1u : 0u)) != 0; memberValue = GetMemberValue(instance, "inShipPhase"); bool flag3 = default(bool); int num2; if (memberValue is bool) { flag3 = (bool)memberValue; num2 = 1; } else { num2 = 0; } bool flag4 = (byte)((uint)num2 & (flag3 ? 1u : 0u)) != 0; bool flag5 = flag2 && !flag4; int currentMoonLevelId = GetCurrentMoonLevelId(instance); if (!moonUsageStateInitialized) { moonUsageStateInitialized = true; previousShipHasLanded = flag5; domainUsesAvailableOnMoon = flag5; moonUsageLevelId = currentMoonLevelId; domainUsesConsumedThisMoon.Clear(); Log.LogInfo((object)("Domain usage initialized for moon level " + currentMoonLevelId + ".")); return; } if (flag5 && (!previousShipHasLanded || currentMoonLevelId != moonUsageLevelId)) { domainUsesConsumedThisMoon.Clear(); domainUsesAvailableOnMoon = true; Log.LogInfo((object)("Every player received " + (InfiniteDomainUsesEnabled() ? "unlimited" : GetEffectiveDomainUsesPerMoon().ToString()) + " domain use(s) for moon level " + currentMoonLevelId + ".")); } else if (!flag5 && previousShipHasLanded) { domainUsesConsumedThisMoon.Clear(); domainUsesAvailableOnMoon = false; Log.LogInfo((object)"Ship returned to orbit; every player's domain uses were set to zero."); NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && singleton.IsListening && singleton.IsServer) { CloseAllHostDomainSessions(broadcast: true); } else { if (domainOpen) { CloseDomain(broadcast: false); } ClearKnownDomainSessions(); } } previousShipHasLanded = flag5; moonUsageLevelId = currentMoonLevelId; } private static int GetCurrentMoonLevelId(StartOfRound round) { object memberValue = GetMemberValue(round, "currentLevelID"); if (memberValue is int) { return (int)memberValue; } object memberValue2 = GetMemberValue(round, "currentLevel"); if (memberValue2 != null) { object memberValue3 = GetMemberValue(memberValue2, "levelID"); if (memberValue3 is int) { return (int)memberValue3; } } return -1; } private bool TryConsumeDomainUse(ulong clientId) { if (!domainUsesAvailableOnMoon) { if (clientId == GetLocalClientId()) { ShowDomainUnavailableInShip(); } return false; } if (InfiniteDomainUsesEnabled()) { Log.LogInfo((object)("Infinite debug domain use granted to client " + clientId + " on moon level " + moonUsageLevelId + ".")); return true; } int consumedDomainUses = GetConsumedDomainUses(clientId); int effectiveDomainUsesPerMoon = GetEffectiveDomainUsesPerMoon(); if (consumedDomainUses < effectiveDomainUsesPerMoon) { domainUsesConsumedThisMoon[clientId] = consumedDomainUses + 1; Log.LogInfo((object)("Domain use " + (consumedDomainUses + 1) + "/" + effectiveDomainUsesPerMoon + " consumed for client " + clientId + " on moon level " + moonUsageLevelId + ".")); return true; } if (clientId == GetLocalClientId()) { ShowDomainUsageDenied(); } return false; } private bool HasDomainUseRemaining(ulong clientId) { if (domainUsesAvailableOnMoon) { if (!InfiniteDomainUsesEnabled()) { return GetConsumedDomainUses(clientId) < GetEffectiveDomainUsesPerMoon(); } return true; } return false; } private int GetConsumedDomainUses(ulong clientId) { if (!domainUsesConsumedThisMoon.TryGetValue(clientId, out var value)) { return 0; } return value; } private void RecordConsumedDomainUse(ulong clientId) { if (!InfiniteDomainUsesEnabled()) { domainUsesConsumedThisMoon[clientId] = Mathf.Min(GetEffectiveDomainUsesPerMoon(), GetConsumedDomainUses(clientId) + 1); } } private int GetConfiguredDomainUsesPerMoon() { return Mathf.Clamp(domainUsesPerMoonConfig?.Value ?? 1, 1, 20); } private int GetEffectiveDomainUsesPerMoon() { NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && singleton.IsListening && !singleton.IsServer && hostConfigReceived) { return syncedDomainUsesPerMoon; } return GetConfiguredDomainUsesPerMoon(); } private bool InfiniteDomainUsesEnabled() { NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && singleton.IsListening && !singleton.IsServer && hostConfigReceived) { return syncedInfiniteDomainUses; } return infiniteDomainUsesConfig?.Value ?? false; } private void ShowDomainUsageDenied() { statusText = "You used all Domain Expansions available on this moon."; ShowTip("Domain unavailable", statusText); Log.LogInfo((object)statusText); } private void ShowDomainUnavailableInShip() { statusText = "You have 0 domain uses while the ship is in orbit."; ShowTip("Domain unavailable", statusText); Log.LogInfo((object)statusText); } private void ShowDomainBusy() { statusText = "You cannot open a domain while you are inside another domain."; ShowTip("Domain blocked", statusText); Log.LogInfo((object)statusText); } private void OpenDomainLocal(DomainKind domain, Vector3 center, ulong casterId, bool affectsGameplay, float duration = -1f, Dictionary? participants = null, ulong sessionId = 0uL, Vector3? arenaCenter = null) { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d5: 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_00da: 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_010f: Unknown result type (might be due to invalid IL or missing references) selectedDomain = domain; CloseDomain(broadcast: false); ClearInfiniteVoidRuntimeReferences(); domainOpen = true; openingActive = true; domainVisualBuilt = false; domainAffectsGameplay = affectsGameplay; openingTime = 0f; activeDomainDuration = ((duration > 0f) ? duration : RollDomainDuration(domain)); domainTimeLeft = activeDomainDuration + 2.35f; openingEndRealtime = Time.realtimeSinceStartup + 2.35f; domainEndRealtime = openingEndRealtime + activeDomainDuration; effectTimer = 0f; gambleTimer = 0f; jackpotRoll = 0; activeDomainSessionId = sessionId; domainSourceCenter = center; domainCenter = center; activeDomainArenaCenter = (Vector3)(((??)arenaCenter) ?? GetPersistentArenaCenter(domain)); domainParticipantSourcePositions.Clear(); if (participants != null) { foreach (KeyValuePair participant in participants) { domainParticipantSourcePositions[participant.Key] = participant.Value; } } domainArenaActivated = false; localPlayerInDomainArena = false; localPlayerReturnCaptured = false; casterClientId = casterId; CreateOpeningAnimation(); PlayDomainSound(domain, center); statusText = GetDomainName(domain) + " opening..."; ShowTip("Domain opening", statusText); Log.LogInfo((object)statusText); } private void CloseDomain(bool broadcast = true) { //IL_00ba: 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) ulong num = activeDomainSessionId; if (broadcast && num != 0L) { BroadcastCloseDomain(num); } if (num != 0L) { DisableDomainExteriorBarrierColliders(num); } RestoreRemotePlayerRepresentationsFromArena(); RestoreEntitiesFromDomainArena(); RestoreEnemySpeeds(); RestoreDomainEnvironmentRendering(); RestoreDomainAtmosphere(); ClearSoulMeterVisuals(); ClearInfiniteVoidRuntimeReferences(); if ((Object)(object)domainRoot != (Object)null) { Object.Destroy((Object)(object)domainRoot); domainRoot = null; } if (num != 0L) { DestroyDomainExteriorBarrier(num); } openingRoot = null; domainLight = null; domainOpen = false; openingActive = false; domainVisualBuilt = false; domainAffectsGameplay = false; domainArenaActivated = false; localPlayerInDomainArena = false; localPlayerReturnCaptured = false; activeDomainSessionId = 0uL; activeDomainArenaCenter = Vector3.zero; domainParticipantSourcePositions.Clear(); domainTimeLeft = 0f; activeDomainDuration = 0f; openingEndRealtime = 0f; domainEndRealtime = 0f; } private void ClearInfiniteVoidRuntimeReferences() { infiniteVoidRotators.Clear(); infiniteVoidPulseLines.Clear(); infiniteVoidParticleSystems.Clear(); infiniteVoidParticleRates.Clear(); infiniteVoidOverlayImages.Clear(); infiniteVoidOverlayRects.Clear(); malevolentShrineSlashLines.Clear(); malevolentShrineSlashPhases.Clear(); malevolentShrineSlashSpeeds.Clear(); malevolentShrineSlashWidths.Clear(); malevolentShrineSlashSprites.Clear(); openingRotators.Clear(); openingRotationSpeeds.Clear(); openingTimedParticles.Clear(); openingParticleStopProgress.Clear(); idleDeathGambleRotators.Clear(); idleDeathGambleRotationSpeeds.Clear(); idleDeathGambleRotationAxes.Clear(); idleDeathGambleChaseLights.Clear(); idleDeathGambleChaseScales.Clear(); infiniteVoidGalaxyRenderer = null; activeDomainInteriorRenderer = null; shrineMouthRoot = null; if ((Object)(object)shrineCameraVfxRoot != (Object)null) { Object.Destroy((Object)(object)shrineCameraVfxRoot); shrineCameraVfxRoot = null; } if ((Object)(object)domainCameraBackdropRoot != (Object)null) { Object.Destroy((Object)(object)domainCameraBackdropRoot); domainCameraBackdropRoot = null; } if ((Object)(object)selfEmbodimentHandMaterial != (Object)null) { Object.Destroy((Object)(object)selfEmbodimentHandMaterial); selfEmbodimentHandMaterial = null; } if ((Object)(object)selfEmbodimentHandAccentMaterial != (Object)null) { Object.Destroy((Object)(object)selfEmbodimentHandAccentMaterial); selfEmbodimentHandAccentMaterial = null; } if ((Object)(object)selfEmbodimentCrystalMaterial != (Object)null) { Object.Destroy((Object)(object)selfEmbodimentCrystalMaterial); selfEmbodimentCrystalMaterial = null; } selfEmbodimentCrystalRoot = null; selfEmbodimentVisualTime = 0f; infiniteVoidVisualTime = 0f; malevolentShrineVisualTime = 0f; idleDeathGambleVisualTime = 0f; idleDeathGambleRollPulse = 0f; if ((Object)(object)infiniteVoidOverlayRoot != (Object)null) { Object.Destroy((Object)(object)infiniteVoidOverlayRoot); infiniteVoidOverlayRoot = null; } } private void EnsurePersistentDomainArenas() { StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null || (Object)(object)instance.localPlayerController == (Object)null) { return; } int instanceID = ((Object)instance).GetInstanceID(); if (arenaRoundInstanceId != instanceID) { ClearPersistentDomainArenas(); arenaRoundInstanceId = instanceID; } else { bool flag = false; foreach (GameObject value in persistentDomainArenas.Values) { if ((Object)(object)value == (Object)null) { flag = true; break; } } if (flag) { ClearPersistentDomainArenas(); arenaRoundInstanceId = instanceID; } } EnsurePersistentDomainArena(DomainKind.InfiniteVoid); EnsurePersistentDomainArena(DomainKind.MalevolentShrineClosed); EnsurePersistentDomainArena(DomainKind.IdleDeathGamble); EnsurePersistentDomainArena(DomainKind.SelfEmbodimentOfPerfection); } private unsafe void EnsurePersistentDomainArena(DomainKind domain) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_003d: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) if (persistentDomainArenas.TryGetValue(domain, out GameObject value) && (Object)(object)value != (Object)null) { return; } Vector3 persistentArenaCenter = GetPersistentArenaCenter(domain); GameObject val = new GameObject("Persistent Domain Arena - " + GetDomainName(domain)); val.transform.position = persistentArenaCenter; float arenaFloorSize = GetArenaFloorSize(domain); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)obj).name = "Persistent Arena Physics Floor"; obj.transform.SetParent(val.transform, false); obj.transform.localPosition = new Vector3(0f, -0.5f, 0f); obj.transform.localScale = new Vector3(arenaFloorSize, 1f, arenaFloorSize); Renderer component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.enabled = false; } int num = 32; float num2 = GetClosedBarrierRadius(domain) + 0.55f; float num3 = MathF.PI * 2f * num2 / (float)num * 1.12f; for (int i = 0; i < num; i++) { float num4 = (float)i * MathF.PI * 2f / (float)num; GameObject obj2 = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)obj2).name = "Persistent Arena Invisible Wall"; obj2.transform.SetParent(val.transform, false); obj2.transform.localPosition = new Vector3(Mathf.Cos(num4) * num2, 4.5f, Mathf.Sin(num4) * num2); obj2.transform.localRotation = Quaternion.Euler(0f, (0f - num4) * 57.29578f + 90f, 0f); obj2.transform.localScale = new Vector3(num3, 9f, 0.8f); Renderer component2 = obj2.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.enabled = false; } } persistentDomainArenas[domain] = val; BuildArenaNavMeshes(val, persistentArenaCenter); ManualLogSource log = Log; string[] obj3 = new string[5] { "Persistent arena ready: ", GetDomainName(domain), " at ", null, null }; Vector3 val2 = persistentArenaCenter; obj3[3] = ((object)(*(Vector3*)(&val2))/*cast due to .constrained prefix*/).ToString(); obj3[4] = "."; log.LogInfo((object)string.Concat(obj3)); } private unsafe void EnsureSessionDomainArena(ulong sessionId, DomainKind domain, Vector3 center) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_004a: 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_00a6: 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_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_012e: 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_0163: Unknown result type (might be due to invalid IL or missing references) if (domain == DomainKind.MalevolentShrineOpen || sessionId == 0L || (sessionDomainArenas.TryGetValue(sessionId, out GameObject value) && (Object)(object)value != (Object)null)) { return; } GameObject val = new GameObject("Session Domain Arena " + sessionId + " - " + GetDomainName(domain)); val.transform.position = center; float arenaFloorSize = GetArenaFloorSize(domain); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)obj).name = "Session Arena Physics Floor"; obj.transform.SetParent(val.transform, false); obj.transform.localPosition = new Vector3(0f, -0.65f, 0f); obj.transform.localScale = new Vector3(arenaFloorSize, 1f, arenaFloorSize); Renderer component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.enabled = false; } float num = arenaFloorSize * 0.5f; for (int i = 0; i < 4; i++) { GameObject obj2 = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)obj2).name = "Session Arena Invisible Wall"; obj2.transform.SetParent(val.transform, false); bool flag = i < 2; float num2 = ((i % 2 == 0) ? (-1f) : 1f); obj2.transform.localPosition = (flag ? new Vector3(num2 * num, 3.5f, 0f) : new Vector3(0f, 3.5f, num2 * num)); obj2.transform.localScale = (flag ? new Vector3(1f, 8f, arenaFloorSize) : new Vector3(arenaFloorSize, 8f, 1f)); Renderer component2 = obj2.GetComponent(); if ((Object)(object)component2 != (Object)null) { component2.enabled = false; } } sessionDomainArenas[sessionId] = val; BuildArenaNavMeshes(val, center); ManualLogSource log = Log; string[] obj3 = new string[5] { "Session arena ", sessionId.ToString(), " ready at ", null, null }; Vector3 val2 = center; obj3[3] = ((object)(*(Vector3*)(&val2))/*cast due to .constrained prefix*/).ToString(); obj3[4] = "."; log.LogInfo((object)string.Concat(obj3)); } private void BuildArenaNavMeshes(GameObject arenaRoot, Vector3 center) { //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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_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_008c: Unknown result type (might be due to invalid IL or missing references) try { List list = new List(); NavMeshBuilder.CollectSources(arenaRoot.transform, -1, (NavMeshCollectGeometry)1, 0, new List(), list); Bounds val = default(Bounds); ((Bounds)(ref val))..ctor(center + Vector3.up * 3.5f, new Vector3(66f, 10f, 66f)); int settingsCount = NavMesh.GetSettingsCount(); for (int i = 0; i < settingsCount; i++) { NavMeshData val2 = NavMeshBuilder.BuildNavMeshData(NavMesh.GetSettingsByIndex(i), list, val, Vector3.zero, Quaternion.identity); if (!((Object)(object)val2 == (Object)null)) { persistentArenaNavMeshData.Add(val2); persistentArenaNavMeshes.Add(NavMesh.AddNavMeshData(val2)); } } Log.LogInfo((object)("Persistent arena NavMesh built with " + settingsCount + " agent settings and " + list.Count + " sources.")); } catch (Exception ex) { Log.LogWarning((object)("Could not build persistent arena NavMesh: " + ex.Message)); } } private void ClearPersistentDomainArenas() { //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) foreach (NavMeshDataInstance persistentArenaNavMesh in persistentArenaNavMeshes) { NavMeshDataInstance current = persistentArenaNavMesh; try { ((NavMeshDataInstance)(ref current)).Remove(); } catch { } } persistentArenaNavMeshes.Clear(); foreach (NavMeshData persistentArenaNavMeshDatum in persistentArenaNavMeshData) { if ((Object)(object)persistentArenaNavMeshDatum != (Object)null) { Object.Destroy((Object)(object)persistentArenaNavMeshDatum); } } persistentArenaNavMeshData.Clear(); foreach (GameObject value in persistentDomainArenas.Values) { if ((Object)(object)value != (Object)null) { Object.Destroy((Object)(object)value); } } persistentDomainArenas.Clear(); foreach (GameObject value2 in sessionDomainArenas.Values) { if ((Object)(object)value2 != (Object)null) { Object.Destroy((Object)(object)value2); } } sessionDomainArenas.Clear(); arenaRoundInstanceId = 0; } private static Vector3 GetPersistentArenaCenter(DomainKind domain) { //IL_002b: 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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) return (Vector3)(domain switch { DomainKind.InfiniteVoid => new Vector3(8192f, 512f, 8192f), DomainKind.MalevolentShrineClosed => new Vector3(8320f, 512f, 8192f), DomainKind.IdleDeathGamble => new Vector3(8448f, 512f, 8192f), DomainKind.SelfEmbodimentOfPerfection => new Vector3(8576f, 512f, 8192f), _ => Vector3.zero, }); } private static Vector3 GetSessionArenaCenter(ulong sessionId) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) ulong num = ((sessionId == 0L) ? 0 : ((sessionId - 1) % 32)); float num2 = 8192f + (float)(num % 8) * 128f; float num3 = 8704f + (float)(num / 8) * 128f; return new Vector3(num2, 512f, num3); } private unsafe void ActivateClosedDomainArena() { //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_0039: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_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_008b: 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) if (domainArenaActivated || selectedDomain == DomainKind.MalevolentShrineOpen) { return; } domainArenaActivated = true; Vector3 val = ((activeDomainArenaCenter != Vector3.zero) ? activeDomainArenaCenter : GetPersistentArenaCenter(selectedDomain)); if (activeDomainSessionId != 0L) { EnsureSessionDomainArena(activeDomainSessionId, selectedDomain, val); } else { EnsurePersistentDomainArenas(); } SyncArenaPhysics(); TeleportLocalPlayerIntoArena(domainSourceCenter, val); TeleportRemotePlayerRepresentationsIntoArena(domainSourceCenter, val); if (domainAffectsGameplay) { TeleportHostEntitiesIntoArena(domainSourceCenter, val); if (selectedDomain == DomainKind.SelfEmbodimentOfPerfection) { InitializeLocalSoulState(); } } domainCenter = val; ManualLogSource log = Log; string[] obj = new string[7] { "Closed domain arena activated: ", GetDomainName(selectedDomain), ", source=", null, null, null, null }; Vector3 val2 = domainSourceCenter; obj[3] = ((object)(*(Vector3*)(&val2))/*cast due to .constrained prefix*/).ToString(); obj[4] = ", arena="; val2 = val; obj[5] = ((object)(*(Vector3*)(&val2))/*cast due to .constrained prefix*/).ToString(); obj[6] = "."; log.LogInfo((object)string.Concat(obj)); } private unsafe void CreateClosedDomainExteriorBarrier(ulong sessionId, DomainKind domain, Vector3 sourceCenter) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0037: 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_007d: 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_0097: 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_0105: Unknown result type (might be due to invalid IL or missing references) DestroyDomainExteriorBarrier(sessionId); if (domain != DomainKind.MalevolentShrineOpen && sessionId != 0L) { GameObject val = new GameObject("Closed Domain Exterior " + sessionId + " - " + GetDomainName(domain)); val.transform.position = sourceCenter; domainExteriorRoots[sessionId] = val; GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)obj).name = "Opaque Black Domain Sphere With Hitbox"; obj.transform.SetParent(val.transform, false); obj.transform.localPosition = Vector3.up * 1.2f; obj.transform.localScale = Vector3.one * 52f; Renderer component = obj.GetComponent(); ApplyOpaqueBarrierMaterial(component); component.shadowCastingMode = (ShadowCastingMode)0; component.receiveShadows = false; SphereCollider component2 = obj.GetComponent(); ((Collider)component2).enabled = false; ((Collider)component2).isTrigger = false; StartRuntimeCoroutine(EnableExteriorColliderAfterTeleport(sessionId, component2)); ManualLogSource log = Log; string[] obj2 = new string[7] { "Created solid black exterior for session ", sessionId.ToString(), " at ", null, null, null, null }; Vector3 val2 = sourceCenter; obj2[3] = ((object)(*(Vector3*)(&val2))/*cast due to .constrained prefix*/).ToString(); obj2[4] = " with radius "; obj2[5] = 26f.ToString(); obj2[6] = "."; log.LogInfo((object)string.Concat(obj2)); } } private IEnumerator CreateClosedDomainExteriorBarrierAfterTeleport(ulong sessionId, DomainKind domain, Vector3 sourceCenter) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSecondsRealtime(2.35f); if (!knownDomainSessions.TryGetValue(sessionId, out NetworkDomainSession value)) { pendingExteriorBarrierSessions.Remove(sessionId); yield break; } int localPlayerSlot = GetLocalPlayerSlot(); bool localParticipant = localPlayerSlot != int.MinValue && value.Participants.ContainsKey(localPlayerSlot); float waitTime = 0f; while (localParticipant && activeDomainSessionId == sessionId && !domainArenaActivated && waitTime < 3f) { waitTime += Time.unscaledDeltaTime; yield return null; } yield return (object)new WaitForFixedUpdate(); if (knownDomainSessions.ContainsKey(sessionId)) { CreateClosedDomainExteriorBarrier(sessionId, domain, sourceCenter); } pendingExteriorBarrierSessions.Remove(sessionId); } private IEnumerator EnableExteriorColliderAfterTeleport(ulong sessionId, SphereCollider collider) { yield return (object)new WaitForFixedUpdate(); yield return (object)new WaitForSecondsRealtime(0.2f); if ((Object)(object)collider != (Object)null && knownDomainSessions.ContainsKey(sessionId) && domainExteriorRoots.ContainsKey(sessionId)) { ((Collider)collider).enabled = true; } } private void DestroyDomainExteriorBarrier(ulong sessionId) { if (!domainExteriorRoots.TryGetValue(sessionId, out GameObject value) || (Object)(object)value == (Object)null) { domainExteriorRoots.Remove(sessionId); return; } DisableDomainExteriorBarrierColliders(sessionId); Object.Destroy((Object)(object)value); domainExteriorRoots.Remove(sessionId); } private void DisableDomainExteriorBarrierColliders(ulong sessionId) { if (!domainExteriorRoots.TryGetValue(sessionId, out GameObject value) || (Object)(object)value == (Object)null) { return; } Collider[] componentsInChildren = value.GetComponentsInChildren(); foreach (Collider val in componentsInChildren) { if ((Object)(object)val != (Object)null) { val.enabled = false; } } } private void DestroyAllDomainExteriorBarriers() { pendingExteriorBarrierSessions.Clear(); foreach (ulong item in new List(domainExteriorRoots.Keys)) { DestroyDomainExteriorBarrier(item); } } private unsafe void TeleportLocalPlayerIntoArena(Vector3 sourceCenter, Vector3 arenaCenter) { //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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_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_0109: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if ((Object)(object)val == (Object)null || IsPlayerDead(val)) { return; } int playerSlot = GetPlayerSlot(val); Vector3 value = ((Component)val).transform.position; if (domainParticipantSourcePositions.Count > 0) { if (!domainParticipantSourcePositions.TryGetValue(playerSlot, out value)) { return; } } else if (GetLocalClientId() != casterClientId && !IsWithinArenaCaptureRadius(((Component)val).transform.position, sourceCenter)) { return; } localPlayerReturnPosition = ((Component)val).transform.position; localPlayerReturnRotation = ((Component)val).transform.rotation; localPlayerReturnCaptured = true; localPlayerInDomainArena = true; hasLastLocalPlayerPosition = false; Vector3 val2 = MapPlayerPositionIntoArena(value, sourceCenter, arenaCenter, playerSlot, selectedDomain); TeleportPlayerSafely(val, val2, ((Component)val).transform.rotation); ManualLogSource log = Log; string[] obj = new string[5] { "Local player entered domain arena; return=", null, null, null, null }; Vector3 val3 = localPlayerReturnPosition; obj[1] = ((object)(*(Vector3*)(&val3))/*cast due to .constrained prefix*/).ToString(); obj[2] = ", target="; val3 = val2; obj[3] = ((object)(*(Vector3*)(&val3))/*cast due to .constrained prefix*/).ToString(); obj[4] = "."; log.LogInfo((object)string.Concat(obj)); } private void TeleportRemotePlayerRepresentationsIntoArena(Vector3 sourceCenter, Vector3 arenaCenter) { //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_006f: 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_007d: 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) StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null || instance.allPlayerScripts == null || domainParticipantSourcePositions.Count == 0) { return; } PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && !((Object)(object)val == (Object)(object)instance.localPlayerController) && !IsPlayerDead(val)) { int playerSlot = GetPlayerSlot(val); if (domainParticipantSourcePositions.TryGetValue(playerSlot, out var value)) { Vector3 position = MapPlayerPositionIntoArena(value, sourceCenter, arenaCenter, playerSlot, selectedDomain); ((Component)val).transform.position = position; EnsureRemoteParticipantVisible(val); } } } } private void MaintainRemoteDomainPlayerRepresentations() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0056: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_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_00db: 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_00eb: 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_0100: 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_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_015a: 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) if (!HasClosedBarrier() || !localPlayerInDomainArena || domainParticipantSourcePositions.Count == 0) { return; } StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null || instance.allPlayerScripts == null) { return; } Vector3 val = ((activeDomainArenaCenter != Vector3.zero) ? activeDomainArenaCenter : GetPersistentArenaCenter(selectedDomain)); PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val2 in allPlayerScripts) { if ((Object)(object)val2 == (Object)null || (Object)(object)val2 == (Object)(object)instance.localPlayerController || IsPlayerDead(val2)) { continue; } int playerSlot = GetPlayerSlot(val2); if (domainParticipantSourcePositions.TryGetValue(playerSlot, out var value)) { Vector3 position = ((Component)val2).transform.position; Vector3 val3 = position - val; val3.y = 0f; bool num = !IsFiniteVector(position) || position.y < val.y - 1.25f || position.y > val.y + 16f; float num2 = GetClosedBarrierRadius(selectedDomain) + 8f; if (num || ((Vector3)(ref val3)).sqrMagnitude > num2 * num2) { Vector3 position2 = (IsWithinArenaCaptureRadius(position, domainSourceCenter) ? position : value); ((Component)val2).transform.position = MapPlayerPositionIntoArena(position2, domainSourceCenter, val, playerSlot, selectedDomain); } EnsureRemoteParticipantVisible(val2); } } } private void RestoreRemotePlayerRepresentationsFromArena() { //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (domainParticipantSourcePositions.Count == 0) { return; } StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null || instance.allPlayerScripts == null) { return; } PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && !((Object)(object)val == (Object)(object)instance.localPlayerController)) { int playerSlot = GetPlayerSlot(val); if (domainParticipantSourcePositions.TryGetValue(playerSlot, out var value)) { ((Component)val).transform.position = value; EnsureRemoteParticipantVisible(val); } } } } private static void EnsureRemoteParticipantVisible(PlayerControllerB player) { SkinnedMeshRenderer[] componentsInChildren = ((Component)player).GetComponentsInChildren(true); foreach (SkinnedMeshRenderer val in componentsInChildren) { if ((Object)(object)val != (Object)null) { ((Renderer)val).enabled = true; } } object? memberValue = GetMemberValue(player, "thisPlayerModel"); Renderer val2 = (Renderer)((memberValue is Renderer) ? memberValue : null); if (val2 != null) { val2.enabled = true; } object? memberValue2 = GetMemberValue(player, "thisPlayerModelLOD1"); Renderer val3 = (Renderer)((memberValue2 is Renderer) ? memberValue2 : null); if (val3 != null) { val3.enabled = true; } object? memberValue3 = GetMemberValue(player, "thisPlayerModelLOD2"); Renderer val4 = (Renderer)((memberValue3 is Renderer) ? memberValue3 : null); if (val4 != null) { val4.enabled = true; } } private void TeleportHostEntitiesIntoArena(Vector3 sourceCenter, Vector3 arenaCenter) { //IL_0046: 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_0079: 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_0086: 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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) arenaEnemyStates.Clear(); arenaItemStates.Clear(); arenaNetworkEntityStates.Clear(); EnemyAI[] array = Object.FindObjectsOfType(); foreach (EnemyAI val in array) { if (!((Object)(object)val == (Object)null) && !IsEnemyDead(val) && IsWithinArenaCaptureRadius(((Component)val).transform.position, sourceCenter)) { Rigidbody component = ((Component)val).GetComponent(); arenaEnemyStates[val] = CaptureArenaEntityState(((Component)val).transform, component); TeleportEnemySafely(val, MapPositionIntoArena(((Component)val).transform.position, sourceCenter, arenaCenter, selectedDomain)); } } GrabbableObject[] array2 = Object.FindObjectsOfType(); foreach (GrabbableObject val2 in array2) { if (!((Object)(object)val2 == (Object)null) && !IsHeldGrabbable(val2) && IsWithinArenaCaptureRadius(((Component)val2).transform.position, sourceCenter)) { Rigidbody component2 = ((Component)val2).GetComponent(); arenaItemStates[val2] = CaptureArenaEntityState(((Component)val2).transform, component2); TeleportGrabbableSafely(val2, MapPositionIntoArena(((Component)val2).transform.position, sourceCenter, arenaCenter, selectedDomain)); } } NetworkObject[] array3 = Object.FindObjectsOfType(); foreach (NetworkObject val3 in array3) { if (!((Object)(object)val3 == (Object)null) && val3.IsSpawned && !((Object)(object)((Component)val3).GetComponentInParent() != (Object)null) && !((Object)(object)((Component)val3).GetComponentInParent() != (Object)null) && !((Object)(object)((Component)val3).GetComponentInParent() != (Object)null)) { Rigidbody component3 = ((Component)val3).GetComponent(); if (!((Object)(object)component3 == (Object)null) && !component3.isKinematic && IsWithinArenaCaptureRadius(((Component)val3).transform.position, sourceCenter) && (val3.IsOwnedByServer || val3.IsOwner)) { arenaNetworkEntityStates[val3] = CaptureArenaEntityState(((Component)val3).transform, component3); TeleportDynamicNetworkObject(val3, MapPositionIntoArena(((Component)val3).transform.position, sourceCenter, arenaCenter, selectedDomain)); } } } Log.LogInfo((object)("Arena capture moved " + arenaEnemyStates.Count + " enemies, " + arenaItemStates.Count + " loose items, and " + arenaNetworkEntityStates.Count + " dynamic network entities.")); } private void RestoreEntitiesFromDomainArena() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) if (localPlayerReturnCaptured) { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; hasLastLocalPlayerPosition = false; if ((Object)(object)val != (Object)null) { Vector3 position = ResolveSafeWorldReturnPosition(val, localPlayerReturnPosition); TeleportPlayerSafely(val, position, localPlayerReturnRotation); } } if (arenaEnemyStates.Count > 0 || arenaItemStates.Count > 0 || arenaNetworkEntityStates.Count > 0) { foreach (KeyValuePair arenaEnemyState in arenaEnemyStates) { if (!((Object)(object)arenaEnemyState.Key == (Object)null)) { TeleportEnemySafely(arenaEnemyState.Key, arenaEnemyState.Value.Position); ((Component)arenaEnemyState.Key).transform.rotation = arenaEnemyState.Value.Rotation; RestoreRigidbodyState(((Component)arenaEnemyState.Key).GetComponent(), arenaEnemyState.Value); } } foreach (KeyValuePair arenaItemState in arenaItemStates) { if (!((Object)(object)arenaItemState.Key == (Object)null) && !IsHeldGrabbable(arenaItemState.Key)) { TeleportGrabbableSafely(arenaItemState.Key, arenaItemState.Value.Position); ((Component)arenaItemState.Key).transform.rotation = arenaItemState.Value.Rotation; RestoreRigidbodyState(((Component)arenaItemState.Key).GetComponent(), arenaItemState.Value); } } foreach (KeyValuePair arenaNetworkEntityState in arenaNetworkEntityStates) { if (!((Object)(object)arenaNetworkEntityState.Key == (Object)null)) { TeleportDynamicNetworkObject(arenaNetworkEntityState.Key, arenaNetworkEntityState.Value.Position); ((Component)arenaNetworkEntityState.Key).transform.rotation = arenaNetworkEntityState.Value.Rotation; RestoreRigidbodyState(((Component)arenaNetworkEntityState.Key).GetComponent(), arenaNetworkEntityState.Value); } } } arenaEnemyStates.Clear(); arenaItemStates.Clear(); arenaNetworkEntityStates.Clear(); localPlayerReturnCaptured = false; localPlayerInDomainArena = false; } private static ArenaEntityState CaptureArenaEntityState(Transform transformToCapture, Rigidbody? body) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_004b: 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_0050: Unknown result type (might be due to invalid IL or missing references) return new ArenaEntityState { Position = transformToCapture.position, Rotation = transformToCapture.rotation, Velocity = (((Object)(object)body != (Object)null) ? body.velocity : Vector3.zero), AngularVelocity = (((Object)(object)body != (Object)null) ? body.angularVelocity : Vector3.zero) }; } private static void RestoreRigidbodyState(Rigidbody? body, ArenaEntityState state) { //IL_000c: 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_0024: 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 (!((Object)(object)body == (Object)null)) { body.position = state.Position; body.rotation = state.Rotation; body.velocity = state.Velocity; body.angularVelocity = state.AngularVelocity; } } private static bool IsWithinArenaCaptureRadius(Vector3 position, Vector3 center) { //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_0002: 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) Vector3 val = position - center; val.y = 0f; return ((Vector3)(ref val)).sqrMagnitude <= 676f; } private static Vector3 MapPositionIntoArena(Vector3 position, Vector3 sourceCenter, Vector3 arenaCenter, DomainKind domain) { //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_0002: 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_0014: 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_002a: 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_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) Vector3 val = position - sourceCenter; val.y = 0f; val *= ((domain == DomainKind.SelfEmbodimentOfPerfection) ? 1.08f : 0.72f); float num = Mathf.Min(GetClosedBarrierRadius(domain) - 6f, GetArenaFloorSize(domain) * 0.5f - 4f); if (((Vector3)(ref val)).magnitude > num) { val = ((Vector3)(ref val)).normalized * num; } return arenaCenter + val + Vector3.up * 0.7f; } private static Vector3 MapPlayerPositionIntoArena(Vector3 position, Vector3 sourceCenter, Vector3 arenaCenter, int playerSlot, DomainKind domain) { //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_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_004b: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a3: 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_00b2: 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_0095: 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_00a0: Unknown result type (might be due to invalid IL or missing references) Vector3 val = MapPositionIntoArena(position, sourceCenter, arenaCenter, domain); float num = ((float)((playerSlot != int.MinValue) ? ((uint)playerSlot) : 0u) * 137.508f + 23f) * (MathF.PI / 180f); Vector3 val2 = val + new Vector3(Mathf.Cos(num), 0f, Mathf.Sin(num)) * 0.85f - arenaCenter; val2.y = 0f; float num2 = Mathf.Min(GetClosedBarrierRadius(domain) - 6f, GetArenaFloorSize(domain) * 0.5f - 4f); if (((Vector3)(ref val2)).magnitude > num2) { val2 = ((Vector3)(ref val2)).normalized * num2; } return arenaCenter + val2 + Vector3.up * 0.7f; } private unsafe Vector3 ResolveSafeWorldReturnPosition(PlayerControllerB player, Vector3 preferredPosition) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0247: 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_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_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0171: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) if (!IsFiniteVector(preferredPosition)) { Log.LogWarning((object)"Captured domain return position was invalid; using the current player position."); return ((Component)player).transform.position + Vector3.up * 0.25f; } Vector3 val = preferredPosition + Vector3.up * 0.25f; bool flag = false; Vector3 val3 = default(Vector3); Vector3 val4; for (int i = 0; i <= 3; i++) { int num = ((i == 0) ? 1 : 8); float num2 = i switch { 2 => 1.25f, 1 => 0.65f, 0 => 0f, _ => 2f, }; for (int j = 0; j < num; j++) { float num3 = ((num == 1) ? 0f : ((float)j * MathF.PI * 2f / (float)num)); Vector3 val2 = preferredPosition + new Vector3(Mathf.Cos(num3) * num2, 0f, Mathf.Sin(num3) * num2); RaycastHit[] array = Physics.RaycastAll(val2 + Vector3.up * 3f, Vector3.down, 7f, -1, (QueryTriggerInteraction)1); Array.Sort(array, (RaycastHit left, RaycastHit right) => Mathf.Abs(((RaycastHit)(ref left)).point.y - preferredPosition.y).CompareTo(Mathf.Abs(((RaycastHit)(ref right)).point.y - preferredPosition.y))); RaycastHit[] array2 = array; for (int num4 = 0; num4 < array2.Length; num4++) { RaycastHit hit = array2[num4]; if (!IsValidPlayerSpawnSurface(hit, preferredPosition)) { continue; } ((Vector3)(ref val3))..ctor(val2.x, ((RaycastHit)(ref hit)).point.y + 0.18f, val2.z); if (!flag) { val = val3; flag = true; } if (IsPlayerSpawnVolumeClear(player, val3, ((RaycastHit)(ref hit)).collider)) { val4 = val3 - preferredPosition; if (((Vector3)(ref val4)).sqrMagnitude > 0.08f) { ManualLogSource log = Log; val4 = val3; log.LogInfo((object)("Adjusted domain return position to nearby valid ground: " + ((object)(*(Vector3*)(&val4))/*cast due to .constrained prefix*/).ToString() + ".")); } return val3; } } } } if (flag) { ManualLogSource log2 = Log; val4 = val; log2.LogWarning((object)("No fully clear return volume was found; using the nearest valid ground surface at " + ((object)(*(Vector3*)(&val4))/*cast due to .constrained prefix*/).ToString() + ".")); return val; } Log.LogWarning((object)"No valid ground was found near the captured return position; applying an upward safety offset."); return preferredPosition + Vector3.up * 0.35f; } private static bool IsValidPlayerSpawnSurface(RaycastHit hit, Vector3 preferredPosition) { //IL_001b: 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_003a: Unknown result type (might be due to invalid IL or missing references) Collider collider = ((RaycastHit)(ref hit)).collider; if ((Object)(object)collider == (Object)null || collider.isTrigger || ((RaycastHit)(ref hit)).normal.y < 0.45f) { return false; } if (Mathf.Abs(((RaycastHit)(ref hit)).point.y - preferredPosition.y) > 3.25f) { return false; } Transform transform = ((Component)collider).transform; if ((Object)(object)((Component)transform).GetComponentInParent() != (Object)null || (Object)(object)((Component)transform).GetComponentInParent() != (Object)null || (Object)(object)((Component)transform).GetComponentInParent() != (Object)null) { return false; } string text = ((Object)collider).name.ToLowerInvariant(); if (!text.Contains("kill") && !text.Contains("outofbounds") && !text.Contains("out of bounds") && !text.Contains("domain exterior")) { return !text.Contains("arena invisible wall"); } return false; } private static bool IsPlayerSpawnVolumeClear(PlayerControllerB player, Vector3 position, Collider surfaceCollider) { //IL_005c: 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_0066: 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_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_0085: 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_00a7: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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_00cd: Unknown result type (might be due to invalid IL or missing references) CharacterController component = ((Component)player).GetComponent(); float num = (((Object)(object)component != (Object)null) ? Mathf.Clamp(component.radius * 0.82f, 0.24f, 0.48f) : 0.34f); float num2 = (((Object)(object)component != (Object)null) ? Mathf.Max(component.height, num * 2f + 0.2f) : 1.8f); Vector3 val = position + (((Object)(object)component != (Object)null) ? component.center : (Vector3.up * (num2 * 0.5f))); Vector3 val2 = val - Vector3.up * Mathf.Max(0f, num2 * 0.5f - num); Vector3 val3 = val + Vector3.up * Mathf.Max(0f, num2 * 0.5f - num); Collider[] array = Physics.OverlapCapsule(val2, val3, num, -1, (QueryTriggerInteraction)1); foreach (Collider val4 in array) { if (!((Object)(object)val4 == (Object)null) && !((Object)(object)val4 == (Object)(object)surfaceCollider)) { Transform transform = ((Component)val4).transform; if (!((Object)(object)transform == (Object)(object)((Component)player).transform) && !transform.IsChildOf(((Component)player).transform)) { return false; } } } return true; } private static bool IsFiniteVector(Vector3 value) { //IL_0000: 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_001a: 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_0034: 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) if (!float.IsNaN(value.x) && !float.IsInfinity(value.x) && !float.IsNaN(value.y) && !float.IsInfinity(value.y) && !float.IsNaN(value.z)) { return !float.IsInfinity(value.z); } return false; } private static void SyncArenaPhysics() { try { Physics.SyncTransforms(); } catch { } } private void TeleportPlayerSafely(PlayerControllerB player, Vector3 position, Quaternion rotation) { //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_00fa: Unknown result type (might be due to invalid IL or missing references) CharacterController component = ((Component)player).GetComponent(); bool flag = (Object)(object)component == (Object)null || ((Collider)component).enabled; bool flag2 = false; MethodInfo[] methods = ((object)player).GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (methodInfo.Name != "TeleportPlayer") { continue; } ParameterInfo[] parameters = methodInfo.GetParameters(); if (parameters.Length == 0 || parameters[0].ParameterType != typeof(Vector3)) { continue; } object[] array = new object[parameters.Length]; for (int j = 0; j < parameters.Length; j++) { Type parameterType = parameters[j].ParameterType; if (parameterType == typeof(Vector3)) { array[j] = position; } else if (parameterType == typeof(Quaternion)) { array[j] = rotation; } else if (parameterType == typeof(float)) { array[j] = ((Quaternion)(ref rotation)).eulerAngles.y; } else if (parameterType == typeof(bool)) { array[j] = j == 1; } else if (parameters[j].HasDefaultValue) { array[j] = parameters[j].DefaultValue; } else { array[j] = (parameterType.IsValueType ? Activator.CreateInstance(parameterType) : null); } } try { methodInfo.Invoke(player, array); flag2 = true; } catch { continue; } break; } if ((Object)(object)component != (Object)null && ((Collider)component).enabled) { ((Collider)component).enabled = false; } ((Component)player).transform.position = position; ((Component)player).transform.rotation = rotation; if ((Object)(object)component != (Object)null && flag) { ((Collider)component).enabled = true; } RestorePlayerMovementState(player, flag); StartRuntimeCoroutine(EnsurePlayerMovementAfterTeleport(player, flag)); if (!flag2) { Log.LogWarning((object)"TeleportPlayer method was unavailable; used transform fallback."); } } private IEnumerator EnsurePlayerMovementAfterTeleport(PlayerControllerB player, bool controllerShouldBeEnabled) { yield return null; RestorePlayerMovementState(player, controllerShouldBeEnabled); yield return (object)new WaitForSeconds(0.2f); RestorePlayerMovementState(player, controllerShouldBeEnabled); } private static void RestorePlayerMovementState(PlayerControllerB player, bool controllerShouldBeEnabled) { //IL_0086: 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) if (!((Object)(object)player == (Object)null) && !IsPlayerDead(player)) { CharacterController component = ((Component)player).GetComponent(); if ((Object)(object)component != (Object)null && controllerShouldBeEnabled) { ((Collider)component).enabled = true; } TrySetMemberValue(player, "disableMoveInput", false); TrySetMemberValue(player, "disableLookInput", false); TrySetMemberValue(player, "inSpecialInteractAnimation", false); TrySetMemberValue(player, "isClimbingLadder", false); TrySetMemberValue(player, "isGrabbingObjectAnimation", false); TrySetMemberValue(player, "externalForces", Vector3.zero); TrySetMemberValue(player, "averageVelocity", 0f); TrySetMemberValue(player, "velocityLastFrame", Vector3.zero); TrySetMemberValue(player, "fallValue", 0f); TrySetMemberValue(player, "fallValueUncapped", 0f); TrySetMemberValue(player, "sinkingValue", 0f); TrySetMemberValue(player, "isSinking", false); } } private static void TeleportEnemySafely(EnemyAI enemy, Vector3 position) { //IL_0006: 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_008f: 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_0035: 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_0067: 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_0075: Unknown result type (might be due to invalid IL or missing references) ((Component)enemy).transform.position = position; SetMemberValue(enemy, "serverPosition", position); Rigidbody component = ((Component)enemy).GetComponent(); if ((Object)(object)component != (Object)null) { component.position = position; component.velocity = Vector3.zero; component.angularVelocity = Vector3.zero; } object? memberValue = GetMemberValue(enemy, "agent"); NavMeshAgent val = (NavMeshAgent)((memberValue is NavMeshAgent) ? memberValue : null); if (val == null || !((Behaviour)val).enabled) { return; } try { if (!val.Warp(position)) { ((Component)enemy).transform.position = position; } val.velocity = Vector3.zero; } catch { ((Component)enemy).transform.position = position; } } private static void TeleportGrabbableSafely(GrabbableObject item, Vector3 position) { //IL_0006: 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_0050: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) ((Component)item).transform.position = position; Rigidbody component = ((Component)item).GetComponent(); if ((Object)(object)component != (Object)null) { component.position = position; component.velocity = Vector3.zero; component.angularVelocity = Vector3.zero; } SetMemberValue(item, "targetFloorPosition", position); SetMemberValue(item, "startFallingPosition", position); SetMemberValue(item, "fallTime", 0f); } private static void TeleportDynamicNetworkObject(NetworkObject networkObject, Vector3 position) { //IL_0006: 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_0025: 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) ((Component)networkObject).transform.position = position; Rigidbody component = ((Component)networkObject).GetComponent(); if (!((Object)(object)component == (Object)null)) { component.position = position; component.velocity = Vector3.zero; component.angularVelocity = Vector3.zero; } } private static bool IsHeldGrabbable(GrabbableObject item) { object memberValue = GetMemberValue(item, "isHeld"); object memberValue2 = GetMemberValue(item, "isHeldByEnemy"); object memberValue3 = GetMemberValue(item, "isPocketed"); bool flag = default(bool); int num; if (memberValue is bool) { flag = (bool)memberValue; num = 1; } else { num = 0; } if (((uint)num & (flag ? 1u : 0u)) == 0) { bool flag2 = default(bool); int num2; if (memberValue2 is bool) { flag2 = (bool)memberValue2; num2 = 1; } else { num2 = 0; } if (((uint)num2 & (flag2 ? 1u : 0u)) == 0) { bool flag3 = default(bool); int num3; if (memberValue3 is bool) { flag3 = (bool)memberValue3; num3 = 1; } else { num3 = 0; } return (byte)((uint)num3 & (flag3 ? 1u : 0u)) != 0; } } return true; } private static bool IsEnemyDead(EnemyAI enemy) { object memberValue = GetMemberValue(enemy, "isEnemyDead"); bool flag = default(bool); int num; if (memberValue is bool) { flag = (bool)memberValue; num = 1; } else { num = 0; } return (byte)((uint)num & (flag ? 1u : 0u)) != 0; } private AudioClip CreateSlotRollClip() { int num = Mathf.CeilToInt(31752.002f); float[] array = new float[num]; for (int i = 0; i < num; i++) { float num2 = (float)i / 44100f; float num3 = Mathf.Clamp01(1f - num2 / 0.72f); float num4 = Mathf.Sin(MathF.PI * 2f * (920f + Mathf.Floor(num2 * 18f) * 95f) * num2); float num5 = Mathf.Sign(Mathf.Sin(MathF.PI * 36f * num2)); array[i] = (num4 * 0.16f + num5 * 0.045f) * num3; } AudioClip obj = AudioClip.Create("Idle Death Gamble Slot Roll", num, 1, 44100, false); obj.SetData(array, 0); return obj; } private void PlaySlotRollSound(Vector3 center) { //IL_0014: 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_001f: 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_0085: Expected O, but got Unknown if (!((Object)(object)slotRollClip == (Object)null)) { GameObject val = new GameObject("Idle Death Gamble Slot Sound"); val.transform.position = center; AudioSource obj = val.AddComponent(); obj.clip = slotRollClip; obj.volume = 0.8f; obj.spatialBlend = 0.65f; obj.minDistance = 6f; obj.maxDistance = 45f; obj.rolloffMode = (AudioRolloffMode)1; obj.Play(); Object.Destroy((Object)val, slotRollClip.length + 0.2f); } } private void StartJackpotSound() { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) StopJackpotSound(); AudioClip val = jackpotSoundClip; if ((Object)(object)val == (Object)null && domainSounds.TryGetValue(DomainKind.IdleDeathGamble, out AudioClip value)) { val = value; } if ((Object)(object)val == (Object)null) { Log.LogWarning((object)("Jackpot sound is not loaded yet: " + GetJackpotSoundFileName())); return; } jackpotSoundObject = new GameObject("Idle Death Gamble Jackpot Sound"); jackpotSoundObject.transform.position = domainCenter; jackpotSoundSource = jackpotSoundObject.AddComponent(); jackpotSoundSource.clip = val; jackpotSoundSource.volume = 1f; jackpotSoundSource.spatialBlend = 0.18f; jackpotSoundSource.minDistance = 14f; jackpotSoundSource.maxDistance = 110f; jackpotSoundSource.rolloffMode = (AudioRolloffMode)1; jackpotSoundSource.loop = true; jackpotSoundSource.Play(); Object.Destroy((Object)(object)jackpotSoundObject, 100.5f); } private void StopJackpotSound() { if ((Object)(object)jackpotSoundSource != (Object)null) { jackpotSoundSource.Stop(); jackpotSoundSource = null; } if ((Object)(object)jackpotSoundObject != (Object)null) { Object.Destroy((Object)(object)jackpotSoundObject); jackpotSoundObject = null; } } private void LoadVisualTextures() { infiniteVoidGalaxyTexture = LoadTextureFromFile("infinite_void_panorama_v2.png") ?? LoadTextureFromFile("infinite_void_galaxy.png") ?? LoadTextureFromFile("infinite_void_galaxy.jpg") ?? CreateInfiniteVoidGalaxyTexture(); infiniteVoidBlackHoleTexture = CreateInfiniteVoidBlackHoleTexture(); infiniteVoidInkTexture = CreateInfiniteVoidInkTexture(); infiniteVoidStreakTexture = CreateInfiniteVoidStreakTexture(); malevolentShrineOpenBarrierTexture = CreateMalevolentShrineBarrierTexture(open: true); malevolentShrineClosedBarrierTexture = LoadTextureFromFile("malevolent_shrine_interior_v2.png") ?? CreateMalevolentShrineBarrierTexture(open: false); idleDeathGambleBarrierTexture = LoadTextureFromFile("idle_death_gamble_interior_v2.png") ?? CreateIdleDeathGambleBarrierTexture(); malevolentShrineGroundSealTexture = LoadTextureFromFile("malevolent_shrine_ground_seal_v2.png"); malevolentShrineSlashTexture = LoadTextureFromFile("malevolent_shrine_slash_v2.png"); malevolentShrineSlashCoreTexture = CreateHighContrastSlashTexture(); softParticleTexture = CreateSoftParticleTexture(); } private Texture2D? LoadTextureFromFile(string fileName) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown string text = Path.Combine(textureDirectory, fileName); if (!File.Exists(text)) { Log.LogWarning((object)("Visual texture not found: " + text)); return null; } try { Texture2D val = new Texture2D(2, 2, (TextureFormat)4, false); if (!ImageConversion.LoadImage(val, File.ReadAllBytes(text))) { Log.LogWarning((object)("Could not decode visual texture: " + text)); return null; } ((Texture)val).wrapMode = (TextureWrapMode)0; ((Texture)val).filterMode = (FilterMode)1; ((Object)val).name = Path.GetFileNameWithoutExtension(fileName); Log.LogInfo((object)("Loaded visual texture: " + fileName)); return val; } catch (Exception ex) { Log.LogWarning((object)("Could not load visual texture " + text + ": " + ex.Message)); return null; } } private static Texture2D CreateSoftParticleTexture() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) Texture2D val = new Texture2D(64, 64, (TextureFormat)4, false); Color[] array = (Color[])(object)new Color[4096]; for (int i = 0; i < 64; i++) { for (int j = 0; j < 64; j++) { float num = ((float)j + 0.5f) / 64f * 2f - 1f; float num2 = ((float)i + 0.5f) / 64f * 2f - 1f; float num3 = Mathf.Sqrt(num * num + num2 * num2); float num4 = Mathf.Pow(Mathf.Clamp01(1f - num3), 2.2f); array[i * 64 + j] = new Color(1f, 1f, 1f, num4); } } val.SetPixels(array); val.Apply(false, false); ((Texture)val).wrapMode = (TextureWrapMode)1; ((Texture)val).filterMode = (FilterMode)1; ((Object)val).name = "Domain Soft Particle Texture"; return val; } private static Texture2D CreateHighContrastSlashTexture() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //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_01c4: 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) Texture2D val = new Texture2D(512, 128, (TextureFormat)4, false); Color[] array = (Color[])(object)new Color[65536]; Color val2 = default(Color); for (int i = 0; i < 128; i++) { float num = (float)i / 127f; for (int j = 0; j < 512; j++) { float num2 = (float)j / 511f; float num3 = Mathf.Abs(num2 * 2f - 1f); float num4 = Mathf.Pow(Mathf.Clamp01(1f - num3), 0.34f); float num5 = 0.5f + Mathf.Sin(num2 * 41f) * 0.012f + Mathf.Sin(num2 * 113f) * 0.006f; float num6 = (0.052f + Mathf.Sin(num2 * 29f) * 0.008f) * num4; float num7 = Mathf.Abs(num - num5); float num8 = num6 * 2.25f; if (num8 <= 0.001f || num7 > num8) { array[i * 512 + j] = Color.clear; continue; } float num9 = Mathf.Clamp01(1f - num7 / num8) * num4; if (num7 < num6 * 0.3f) { ((Color)(ref val2))..ctor(0.002f, 0f, 0f, 1f); } else if (num7 < num6 * 0.58f) { ((Color)(ref val2))..ctor(1f, 0.92f, 0.78f, 1f); } else if (num7 < num6) { ((Color)(ref val2))..ctor(0.95f, 0.025f, 0.008f, 1f); } else { ((Color)(ref val2))..ctor(0.62f, 0f, 0f, num9 * 0.72f); } val2.a *= Mathf.Clamp01(num9 * 1.5f); array[i * 512 + j] = val2; } } val.SetPixels(array); val.Apply(false, false); ((Texture)val).wrapMode = (TextureWrapMode)1; ((Texture)val).filterMode = (FilterMode)1; ((Object)val).name = "Malevolent Shrine High Contrast Slash"; return val; } private static Texture2D CreateMalevolentShrineBarrierTexture(bool open) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_0048: 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_004d: 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_0065: 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_00b9: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: 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) int num = 512; int num2 = 256; Texture2D val = new Texture2D(num, num2, (TextureFormat)4, false); Color val2 = (open ? new Color(0.05f, 0f, 0f, 1f) : new Color(0.015f, 0f, 0f, 1f)); Color val3 = (open ? new Color(0.95f, 0.04f, 0.015f, 1f) : new Color(0.52f, 0f, 0f, 1f)); Color val4 = (open ? new Color(1f, 0.28f, 0.04f, 1f) : new Color(0.9f, 0.02f, 0.01f, 1f)); for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)(num2 - 1); for (int j = 0; j < num; j++) { float num4 = (float)j / (float)(num - 1); float num5 = Mathf.Sin((num4 * 11f + num3 * 2.5f) * MathF.PI * 2f) * 0.5f + 0.5f; float num6 = Mathf.Abs(Mathf.Sin((num4 * 5.7f + num3 * 8.4f) * MathF.PI)); float num7 = Mathf.Abs(Mathf.Sin((num4 * -7.5f + num3 * 9.2f) * MathF.PI)); float num8 = ((num6 > 0.94f || num7 > 0.955f) ? 1f : 0f); float num9 = ((Mathf.Abs(Mathf.Sin(num4 * MathF.PI * 34f)) < 0.035f && num3 > 0.08f && num3 < 0.92f) ? 1f : 0f); Color val5 = Color.Lerp(val2, val3, Mathf.Clamp01(num5 * 0.28f + num8 * 0.78f + num9 * 0.26f)); if (num8 > 0f) { val5 = Color.Lerp(val5, val4, 0.72f); } val.SetPixel(j, i, val5); } } ((Texture)val).wrapMode = (TextureWrapMode)0; ((Texture)val).filterMode = (FilterMode)1; val.Apply(false, false); ((Object)val).name = (open ? "Malevolent Shrine Open Barrier Texture" : "Malevolent Shrine Closed Barrier Texture"); return val; } private static Texture2D CreateInfiniteVoidGalaxyTexture() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_004f: 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_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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: 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_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0335: 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) int num = 1024; int num2 = 512; Texture2D val = new Texture2D(num, num2, (TextureFormat)4, false); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(0.5f, 0.48f); Vector2 val3 = default(Vector2); Color val5 = default(Color); Color val6 = default(Color); Color val7 = default(Color); Color val8 = default(Color); Color val9 = default(Color); for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)(num2 - 1); for (int j = 0; j < num; j++) { float num4 = (float)j / (float)(num - 1); ((Vector2)(ref val3))..ctor((num4 - val2.x) * 1.55f, (num3 - val2.y) * 1.08f); float magnitude = ((Vector2)(ref val3)).magnitude; float num5 = Mathf.Atan2(val3.y, val3.x); float num6 = Mathf.Exp(0f - Mathf.Pow((magnitude - 0.245f) * 28f, 2f)); float num7 = Mathf.Exp(0f - Mathf.Pow((magnitude - 0.34f) * 19f, 2f)); float num8 = Mathf.Exp(0f - Mathf.Pow((val3.y + Mathf.Sin(num5 * 2.6f) * 0.035f) * 14f, 2f)) * Mathf.SmoothStep(0.11f, 0.33f, magnitude) * Mathf.SmoothStep(0.63f, 0.36f, magnitude); float num9 = Mathf.Sin((num4 * 3.7f + num3 * 2.1f) * MathF.PI * 2f) * 0.5f + 0.5f; float num10 = Mathf.Sin((num4 * -5.1f + num3 * 4.4f + Mathf.Sin(num4 * 8f) * 0.12f) * MathF.PI) * 0.5f + 0.5f; float num11 = Mathf.Pow(Mathf.Clamp01(num9 * 0.62f + num10 * 0.55f - magnitude * 0.28f), 2.2f); float num12 = Mathf.Repeat(Mathf.Sin(((float)j * 12.9898f + (float)i * 78.233f) * 0.013f) * 43758.547f, 1f); float num13 = ((num12 > 0.993f) ? 1f : ((num12 > 0.987f) ? 0.45f : 0f)); Color val4 = new Color(0.005f, 0.006f, 0.025f, 1f); ((Color)(ref val5))..ctor(0.02f, 0.12f, 0.38f, 1f); ((Color)(ref val6))..ctor(0.18f, 0.75f, 1f, 1f); ((Color)(ref val7))..ctor(0.5f, 0.08f, 0.92f, 1f); ((Color)(ref val8))..ctor(1f, 0.18f, 0.95f, 1f); ((Color)(ref val9))..ctor(0.92f, 0.98f, 1f, 1f); Color val10 = Color.Lerp(val4, val5, Mathf.Clamp01(num11 * 0.9f)); val10 = Color.Lerp(val10, val7, Mathf.Clamp01(num11 * num10 * 0.8f)); val10 = Color.Lerp(val10, val8, Mathf.Clamp01(num11 * num9 * 0.38f)); val10 = Color.Lerp(val10, val6, Mathf.Clamp01(num7 * 0.78f + num8 * 0.4f)); val10 = Color.Lerp(val10, val9, Mathf.Clamp01(num6 + num13)); if (magnitude < 0.165f) { ((Color)(ref val10))..ctor(0f, 0f, 0.002f, 1f); } val.SetPixel(j, i, val10); } } ((Texture)val).wrapMode = (TextureWrapMode)0; ((Texture)val).filterMode = (FilterMode)1; val.Apply(false, false); ((Object)val).name = "Procedural Infinite Void Galaxy"; return val; } private static Texture2D CreateInfiniteVoidBlackHoleTexture() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_0043: 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_0059: 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_00d2: 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_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) int num = 512; Texture2D val = new Texture2D(num, num, (TextureFormat)4, false); Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(0.5f, 0.5f); Color val4 = default(Color); Color val6 = default(Color); for (int i = 0; i < num; i++) { float num2 = (float)i / (float)(num - 1); for (int j = 0; j < num; j++) { Vector2 val3 = new Vector2((float)j / (float)(num - 1), num2) - val2; float magnitude = ((Vector2)(ref val3)).magnitude; float num3 = Mathf.Atan2(val3.y, val3.x); float num4 = Mathf.Exp(0f - Mathf.Pow((magnitude - 0.315f) * 18f, 2f)); float num5 = Mathf.Exp(0f - Mathf.Pow((magnitude - 0.39f) * 13f, 2f)); float num6 = Mathf.Sin(num3 * 3.2f + magnitude * 34f) * 0.5f + 0.5f; float num7 = Mathf.Exp(0f - Mathf.Pow((val3.y + Mathf.Sin(num3 * 2f) * 0.018f) * 12f, 2f)) * Mathf.SmoothStep(0.1f, 0.46f, magnitude) * Mathf.SmoothStep(0.55f, 0.32f, magnitude); float num8 = Mathf.Clamp01(num4 * 1.1f + num5 * 0.38f + num7 * 0.72f); ((Color)(ref val4))..ctor(0.95f, 1f, 1f, num8); Color val5 = new Color(0.18f, 0.44f, 1f, num8); ((Color)(ref val6))..ctor(0.65f, 0.24f, 1f, num8); Color val7 = Color.Lerp(Color.Lerp(val5, val6, num6), val4, num4); if (magnitude < 0.245f) { ((Color)(ref val7))..ctor(0f, 0f, 0f, 1f); } val.SetPixel(j, i, val7); } } ((Texture)val).wrapMode = (TextureWrapMode)1; ((Texture)val).filterMode = (FilterMode)1; val.Apply(false, false); ((Object)val).name = "Infinite Void Event Horizon Texture"; return val; } private static Texture2D CreateInfiniteVoidInkTexture() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Expected O, but got Unknown //IL_00bc: 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_0167: Unknown result type (might be due to invalid IL or missing references) int num = 512; Texture2D val = new Texture2D(num, num, (TextureFormat)4, false); for (int i = 0; i < num; i++) { float num2 = (float)i / (float)(num - 1); for (int j = 0; j < num; j++) { float num3 = (float)j / (float)(num - 1); float num4 = Mathf.Max(Mathf.Abs(num3 - 0.5f), Mathf.Abs(num2 - 0.5f)) * 2f; float num5 = 0f; for (int k = 0; k < 13; k++) { float num6 = Mathf.Repeat(Mathf.Sin((float)k * 12.9898f) * 43758.547f, 1f); float num7 = Mathf.Repeat(Mathf.Sin((float)k * 78.233f) * 24634.635f, 1f); float num8 = 0.035f + (float)(k % 5) * 0.018f; float num9 = Vector2.Distance(new Vector2(num3, num2), new Vector2(num6, num7)); num5 += Mathf.SmoothStep(num8, 0f, num9); } float num10 = ((Mathf.Abs(Mathf.Sin((num3 * 8f + num2 * 5.2f) * MathF.PI)) < 0.09f) ? 0.22f : 0f); float num11 = Mathf.Clamp01(Mathf.SmoothStep(0.52f, 0.92f, num4) * 0.86f + num5 * 0.55f + num10); val.SetPixel(j, i, new Color(1f, 1f, 1f, num11)); } } ((Texture)val).wrapMode = (TextureWrapMode)0; ((Texture)val).filterMode = (FilterMode)1; val.Apply(false, false); ((Object)val).name = "Infinite Void Ink Splatter Texture"; return val; } private static Texture2D CreateInfiniteVoidStreakTexture() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_011b: 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_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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_0178: Unknown result type (might be due to invalid IL or missing references) int num = 1024; int num2 = 256; Texture2D val = new Texture2D(num, num2, (TextureFormat)4, false); Color val2 = default(Color); Color val4 = default(Color); for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)(num2 - 1); for (int j = 0; j < num; j++) { float num4 = (float)j / (float)(num - 1); float num5 = 0f; for (int k = 0; k < 18; k++) { float num6 = Mathf.Repeat(Mathf.Sin((float)k * 41.17f) * 9283.13f, 1f); float num7 = 0.0035f + (float)(k % 4) * 0.0025f; float num8 = ((Mathf.Sin((num4 * (10f + (float)k) + (float)k * 0.37f) * MathF.PI * 2f) > -0.2f) ? 1f : 0.15f); num5 += Mathf.SmoothStep(num7 * 6f, 0f, Mathf.Abs(num3 - num6)) * num8; } float num9 = Mathf.Clamp01(num5); ((Color)(ref val2))..ctor(1f, 0.06f, 0.9f, num9); Color val3 = new Color(0.1f, 0.15f, 1f, num9); ((Color)(ref val4))..ctor(1f, 0.92f, 1f, num9); Color val5 = Color.Lerp(Color.Lerp(val3, val2, Mathf.Sin(num4 * MathF.PI * 2f) * 0.5f + 0.5f), val4, Mathf.Clamp01(num5 - 0.6f)); val.SetPixel(j, i, val5); } } ((Texture)val).wrapMode = (TextureWrapMode)0; ((Texture)val).filterMode = (FilterMode)1; val.Apply(false, false); ((Object)val).name = "Infinite Void Warp Streak Texture"; return val; } private static Texture2D CreateIdleDeathGambleBarrierTexture() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_00c9: 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_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) int num = 512; int num2 = 256; Texture2D val = new Texture2D(num, num2, (TextureFormat)4, false); Color val3 = default(Color); Color val4 = default(Color); for (int i = 0; i < num2; i++) { float num3 = (float)i / (float)(num2 - 1); for (int j = 0; j < num; j++) { float num4 = (float)j / (float)(num - 1); float num5 = ((Mathf.Abs(Mathf.Sin(num4 * MathF.PI * 42f)) < 0.018f) ? 1f : 0f); float num6 = Mathf.Pow(Mathf.Sin(num3 * MathF.PI), 0.42f); float num7 = ((Mathf.Abs(Mathf.Sin((num4 * 7f + num3 * 3f) * MathF.PI * 2f)) < 0.055f) ? 0.08f : 0f); Color val2 = new Color(1f, 1f, 1f, 1f); ((Color)(ref val3))..ctor(1f, 0.94f, 0.66f, 1f); ((Color)(ref val4))..ctor(0.72f, 1f, 1f, 1f); Color val5 = Color.Lerp(val2, val3, num6 * 0.22f); val5 = Color.Lerp(val5, val4, num5 * 0.16f + num7); val.SetPixel(j, i, val5); } } ((Texture)val).wrapMode = (TextureWrapMode)0; ((Texture)val).filterMode = (FilterMode)1; val.Apply(false, false); ((Object)val).name = "Idle Death Gamble White Barrier Texture"; return val; } private IEnumerator LoadDomainSounds() { foreach (DomainKind value in Enum.GetValues(typeof(DomainKind))) { yield return LoadDomainSound(value); } yield return LoadSelfEmbodimentOpeningSound(); } private IEnumerator LoadDomainSoundsTracked() { yield return LoadDomainSounds(); domainSoundLoadScheduled = false; } private IEnumerator LoadJackpotSound() { string path = Path.Combine(soundDirectory, GetJackpotSoundFileName()); if (!File.Exists(path)) { Log.LogWarning((object)("Jackpot sound not found: " + path)); yield break; } UnityWebRequest request = UnityWebRequestMultimedia.GetAudioClip(new Uri(path).AbsoluteUri, (AudioType)13); try { yield return request.SendWebRequest(); if ((int)request.result != 1) { Log.LogWarning((object)("Could not load jackpot sound " + path + ": " + request.error)); yield break; } jackpotSoundClip = DownloadHandlerAudioClip.GetContent(request); if ((Object)(object)jackpotSoundClip != (Object)null) { ((Object)jackpotSoundClip).name = "Idle Death Gamble Jackpot Sound"; Log.LogInfo((object)("Loaded jackpot sound: " + GetJackpotSoundFileName())); } } finally { ((IDisposable)request)?.Dispose(); } } private IEnumerator LoadJackpotSoundTracked() { yield return LoadJackpotSound(); jackpotSoundLoadScheduled = false; } private IEnumerator LoadDomainSound(DomainKind domain) { string path = Path.Combine(soundDirectory, GetSoundFileName(domain)); if (!File.Exists(path)) { Log.LogWarning((object)("Domain sound not found: " + path)); yield break; } UnityWebRequest request = UnityWebRequestMultimedia.GetAudioClip(new Uri(path).AbsoluteUri, (AudioType)13); try { yield return request.SendWebRequest(); if ((int)request.result != 1) { Log.LogWarning((object)("Could not load domain sound " + path + ": " + request.error)); yield break; } AudioClip content = DownloadHandlerAudioClip.GetContent(request); if ((Object)(object)content != (Object)null) { ((Object)content).name = GetDomainName(domain) + " Sound"; domainSounds[domain] = content; Log.LogInfo((object)("Loaded domain sound: " + GetSoundFileName(domain))); } } finally { ((IDisposable)request)?.Dispose(); } } private IEnumerator LoadSelfEmbodimentOpeningSound() { string path = Path.Combine(soundDirectory, GetSelfEmbodimentOpeningSoundFileName()); if (!File.Exists(path)) { Log.LogWarning((object)("Self-Embodiment opening sound not found: " + path)); yield break; } UnityWebRequest request = UnityWebRequestMultimedia.GetAudioClip(new Uri(path).AbsoluteUri, (AudioType)13); try { yield return request.SendWebRequest(); if ((int)request.result != 1) { Log.LogWarning((object)("Could not load Self-Embodiment opening sound " + path + ": " + request.error)); yield break; } selfEmbodimentOpeningClip = DownloadHandlerAudioClip.GetContent(request); if ((Object)(object)selfEmbodimentOpeningClip != (Object)null) { ((Object)selfEmbodimentOpeningClip).name = "Self-Embodiment Five-Second Opening Cue"; selfEmbodimentOpeningWarningLogged = false; Log.LogInfo((object)("Loaded Self-Embodiment opening sound: " + GetSelfEmbodimentOpeningSoundFileName())); } } finally { ((IDisposable)request)?.Dispose(); } } private void PlayDomainSound(DomainKind domain, Vector3 center) { //IL_0005: 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_0062: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Expected O, but got Unknown if (domain == DomainKind.SelfEmbodimentOfPerfection) { PlaySelfEmbodimentOpeningCue(center); } if (!domainSounds.TryGetValue(domain, out AudioClip value) || (Object)(object)value == (Object)null) { if (missingSoundWarnings.Add(domain)) { Log.LogWarning((object)("Domain sound is not loaded yet: " + GetSoundFileName(domain))); } return; } GameObject val = new GameObject("Domain Sound - " + GetDomainName(domain)); val.transform.position = center; AudioSource val2 = val.AddComponent(); val2.clip = value; bool flag = domain == DomainKind.SelfEmbodimentOfPerfection; val2.volume = (flag ? 0.12f : 1f); val2.spatialBlend = ((domain == DomainKind.MalevolentShrineOpen) ? 0.75f : 0f); val2.minDistance = 8f; val2.maxDistance = 65f; val2.rolloffMode = (AudioRolloffMode)1; float num = (val2.time = Mathf.Clamp(GetSoundStartTime(domain), 0f, Mathf.Max(0f, value.length - 0.05f))); val2.Play(); if (flag) { StartRuntimeCoroutine(FadeInAudioSource(val2, 0.12f, 7f)); } float domainSoundDuration = GetDomainSoundDuration(domain, value.length - num); if (domainSoundDuration + 0.05f < value.length - num) { val2.SetScheduledEndTime(AudioSettings.dspTime + (double)domainSoundDuration); } Object.Destroy((Object)val, Mathf.Max(0.25f, domainSoundDuration + 0.25f)); } private static IEnumerator FadeInAudioSource(AudioSource source, float startingVolume, float duration) { float startedAt = Time.realtimeSinceStartup; while ((Object)(object)source != (Object)null && source.isPlaying) { float num = Mathf.Clamp01((Time.realtimeSinceStartup - startedAt) / Mathf.Max(0.01f, duration)); source.volume = Mathf.SmoothStep(startingVolume, 1f, num); if (num >= 1f) { break; } yield return null; } if ((Object)(object)source != (Object)null) { source.volume = 1f; } } private void PlaySelfEmbodimentOpeningCue(Vector3 center) { //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_0063: 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_00b6: Expected O, but got Unknown AudioClip val = selfEmbodimentOpeningClip; if ((Object)(object)val == (Object)null) { if (!selfEmbodimentOpeningWarningLogged) { selfEmbodimentOpeningWarningLogged = true; Log.LogWarning((object)("Self-Embodiment opening cue is not loaded yet: " + GetSelfEmbodimentOpeningSoundFileName())); } return; } float num = Mathf.Min(5f, val.length); if (!(num <= 0f)) { GameObject val2 = new GameObject("Self-Embodiment Five-Second Opening Cue"); val2.transform.position = center; AudioSource obj = val2.AddComponent(); obj.clip = val; obj.volume = 1f; obj.spatialBlend = 0f; obj.time = 0f; obj.Play(); obj.SetScheduledEndTime(AudioSettings.dspTime + (double)num); Object.Destroy((Object)val2, num + 0.25f); } } private static string GetJackpotSoundFileName() { return "hakari_jackpot.mp3"; } private static string GetSelfEmbodimentOpeningSoundFileName() { return "mahito-domain-expansion.mp3"; } private static string GetSoundFileName(DomainKind domain) { return domain switch { DomainKind.MalevolentShrineOpen => "sukuna_shrine_open.mp3", DomainKind.MalevolentShrineClosed => "incomplete_shrine_closed.mp3", DomainKind.IdleDeathGamble => "hakari_idle_death_gamble.mp3", DomainKind.SelfEmbodimentOfPerfection => "mahito_self_embodiment.mp3", _ => "gojo_infinite_void.mp3", }; } private static float GetSoundStartTime(DomainKind domain) { return domain switch { DomainKind.MalevolentShrineClosed => 4f, DomainKind.SelfEmbodimentOfPerfection => 75f, _ => 0f, }; } private static float GetDomainSoundDuration(DomainKind domain, float remainingLength) { if (domain == DomainKind.IdleDeathGamble) { return Mathf.Min(8f, remainingLength); } return remainingLength; } private void CreateOpeningAnimation() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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) domainRoot = new GameObject("Domain Opening - " + GetDomainName(selectedDomain)); domainRoot.transform.position = domainCenter; openingRoot = new GameObject("Opening Cinematic"); openingRoot.transform.SetParent(domainRoot.transform, false); DomainStyle domainStyle = GetDomainStyle(selectedDomain); CreateSphere("Opening Veil", Vector3.up * 1.35f, Vector3.one * 4.8f, new Color(0f, 0f, 0f, 0.34f), openingRoot.transform); CreateCasterAura(domainStyle, openingRoot.transform); switch (selectedDomain) { case DomainKind.InfiniteVoid: CreateInfiniteVoidOpeningMotif(domainStyle, openingRoot.transform); break; case DomainKind.MalevolentShrineOpen: case DomainKind.MalevolentShrineClosed: CreateMalevolentShrineOpeningMotif(domainStyle, openingRoot.transform); break; case DomainKind.IdleDeathGamble: CreateIdleDeathGambleOpeningMotif(domainStyle, openingRoot.transform); break; case DomainKind.SelfEmbodimentOfPerfection: CreateSelfEmbodimentOpeningMotif(domainStyle, openingRoot.transform); break; } } private void CreateSelfEmbodimentOpeningMotif(DomainStyle style, Transform parent) { //IL_0024: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0060: 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_0094: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: 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_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) Transform playerTransform = GetPlayerTransform(casterClientId); Vector3 val = (((Object)(object)playerTransform != (Object)null && (Object)(object)domainRoot != (Object)null) ? domainRoot.transform.InverseTransformPoint(playerTransform.position) : Vector3.zero); GameObject val2 = new GameObject("Self-Embodiment Opening Hands"); val2.transform.SetParent(parent, false); val2.transform.localPosition = val + new Vector3(0f, 2.1f, 2.2f); CreateSoulHand("Opening Soul Hand Left", new Vector3(-1.4f, 0f, 0f), Quaternion.Euler(0f, 0f, -18f), 0.72f, val2.transform); CreateSoulHand("Opening Soul Hand Right", new Vector3(1.4f, 0f, 0f), Quaternion.Euler(0f, 180f, 18f), 0.72f, val2.transform); openingRotators.Add(val2.transform); openingRotationSpeeds.Add(28f); ParticleSystem val3 = CreateParticleEffect("Self-Embodiment Opening Soul Pulse", parent, val + Vector3.up * 0.4f, Quaternion.Euler(-90f, 0f, 0f), new Color(0.35f, 0.02f, 0.48f, 1f), new Color(1f, 0.72f, 1f, 1f), new Vector2(0.2f, 0.65f), new Vector2(0.08f, 0.25f), new Vector2(5f, 11f), 280, 170f, (ParticleSystemShapeType)4, 0.9f, additive: true, stretched: true); ShapeModule shape = val3.shape; ((ShapeModule)(ref shape)).angle = 22f; TrackOpeningParticles(val3, 0.58f); } private void CreateInfiniteVoidOpeningMotif(DomainStyle style, Transform parent) { //IL_0024: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0060: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: 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_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_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: 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_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) Transform playerTransform = GetPlayerTransform(casterClientId); Vector3 val = (((Object)(object)playerTransform != (Object)null && (Object)(object)domainRoot != (Object)null) ? domainRoot.transform.InverseTransformPoint(playerTransform.position) : Vector3.zero); GameObject val2 = new GameObject("Infinite Void Opening Event Horizon"); val2.transform.SetParent(parent, false); val2.transform.localPosition = val + new Vector3(0f, 2.35f, 2.1f); val2.transform.localRotation = Quaternion.Euler(0f, 180f, 0f); CreateTexturedQuad("Opening Event Horizon Disc", Vector3.zero, new Vector2(5.6f, 5.6f), infiniteVoidBlackHoleTexture, Color.white, val2.transform, 1.35f); CreateSphere("Opening Black Center", Vector3.zero, Vector3.one * 1.72f, Color.black, val2.transform); CreateVerticalLineRing("Opening White Event Ring", 1.95f, 0.08f, Color.white, val2.transform, 0.07f); CreateVerticalLineRing("Opening Violet Event Ring", 2.48f, 0.1f, new Color(0.72f, 0.2f, 1f, 1f), val2.transform, 0.042f); openingRotators.Add(val2.transform); openingRotationSpeeds.Add(74f); ParticleSystem val3 = CreateParticleEffect("Infinite Void Opening Blue Violet Beam", parent, val + Vector3.up * 0.15f, Quaternion.Euler(-90f, 0f, 0f), new Color(0.12f, 0.52f, 1f, 1f), new Color(0.88f, 0.16f, 1f, 1f), new Vector2(0.22f, 0.58f), new Vector2(0.08f, 0.24f), new Vector2(9f, 16f), 420, 260f, (ParticleSystemShapeType)4, 0.42f, additive: true, stretched: true); ShapeModule shape = val3.shape; ((ShapeModule)(ref shape)).angle = 5f; TrackOpeningParticles(val3, 0.42f); CreateBurstParticleEffect("Infinite Void Opening Particle Bloom", parent, val + Vector3.up * 1.2f, Quaternion.identity, new Color(0.16f, 0.4f, 1f, 1f), new Color(0.95f, 0.22f, 1f, 1f), new Vector2(0.42f, 0.95f), new Vector2(0.06f, 0.2f), new Vector2(3.5f, 8f), 150, (ParticleSystemShapeType)0, 1.3f, additive: true, stretched: true); } private void CreateMalevolentShrineOpeningMotif(DomainStyle style, Transform parent) { //IL_0024: 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_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_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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00c4: 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_00f6: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_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_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) Transform playerTransform = GetPlayerTransform(casterClientId); Vector3 val = (((Object)(object)playerTransform != (Object)null && (Object)(object)domainRoot != (Object)null) ? domainRoot.transform.InverseTransformPoint(playerTransform.position) : Vector3.zero); GameObject val2 = CreateTexturedGroundQuad("Malevolent Shrine Opening Seal", val + Vector3.up * 0.08f, 11.5f, malevolentShrineGroundSealTexture, Color.white, parent, 1.2f); openingRotators.Add(val2.transform); openingRotationSpeeds.Add(-38f); ParticleSystem val3 = CreateParticleEffect("Malevolent Shrine Opening Blood Eruption", parent, val + Vector3.up * 0.1f, Quaternion.Euler(-90f, 0f, 0f), new Color(0.18f, 0f, 0f, 1f), new Color(1f, 0.08f, 0.01f, 1f), new Vector2(0.3f, 0.9f), new Vector2(0.08f, 0.3f), new Vector2(6f, 13f), 340, 190f, (ParticleSystemShapeType)4, 1.1f, additive: true, stretched: true); ShapeModule shape = val3.shape; ((ShapeModule)(ref shape)).angle = 18f; TrackOpeningParticles(val3, 0.55f); CreateBurstParticleEffect("Malevolent Shrine Opening Slash Burst", parent, val + Vector3.up * 1.3f, Quaternion.identity, Color.white, new Color(0.55f, 0.02f, 0.01f, 1f), new Vector2(0.22f, 0.62f), new Vector2(1.8f, 5.8f), new Vector2(2f, 7f), 44, (ParticleSystemShapeType)0, 2.4f, additive: false, stretched: false, malevolentShrineSlashTexture); } private void CreateIdleDeathGambleOpeningMotif(DomainStyle style, Transform parent) { //IL_0024: 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_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_0053: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Expected O, but got Unknown //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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0188: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: 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_021b: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: 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_00f0: Unknown result type (might be due to invalid IL or missing references) Transform playerTransform = GetPlayerTransform(casterClientId); Vector3 val = (((Object)(object)playerTransform != (Object)null && (Object)(object)domainRoot != (Object)null) ? domainRoot.transform.InverseTransformPoint(playerTransform.position) : Vector3.zero); CreateCylinder("Idle Death Gamble Opening White Stage", val + Vector3.up * 0.05f, new Vector3(7.5f, 0.025f, 7.5f), Color.white, parent); GameObject val2 = new GameObject("Idle Death Gamble Opening Reels"); val2.transform.SetParent(parent, false); val2.transform.localPosition = val + new Vector3(0f, 2.2f, 2.3f); for (int i = 0; i < 3; i++) { float num = -1.35f + (float)i * 1.35f; Color color = (Color)(i switch { 1 => Color.white, 0 => new Color(0.12f, 1f, 0.42f, 1f), _ => new Color(1f, 0.12f, 0.72f, 1f), }); CreateCube("Idle Death Gamble Opening Reel", new Vector3(num, 0f, 0f), new Vector3(1.05f, 1.45f, 0.22f), color, val2.transform); } openingRotators.Add(val2.transform); openingRotationSpeeds.Add(42f); ParticleSystem val3 = CreateParticleEffect("Idle Death Gamble Opening White Flash", parent, val + Vector3.up * 0.2f, Quaternion.Euler(-90f, 0f, 0f), Color.white, new Color(0.16f, 1f, 0.55f, 1f), new Vector2(0.25f, 0.72f), new Vector2(0.08f, 0.28f), new Vector2(7f, 14f), 380, 220f, (ParticleSystemShapeType)4, 0.9f, additive: true, stretched: true); ShapeModule shape = val3.shape; ((ShapeModule)(ref shape)).angle = 14f; TrackOpeningParticles(val3, 0.62f); CreateBurstParticleEffect("Idle Death Gamble Opening Ticket Burst", parent, val + Vector3.up * 1.2f, Quaternion.identity, Color.white, new Color(1f, 0.16f, 0.72f, 1f), new Vector2(0.45f, 1.1f), new Vector2(0.12f, 0.34f), new Vector2(2.5f, 6f), 120, (ParticleSystemShapeType)0, 2f, additive: true, stretched: false); } private void CreateCasterAura(DomainStyle style, Transform parent) { //IL_0024: 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_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_0053: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_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_00b4: 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_00c8: 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_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_00f1: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) Transform playerTransform = GetPlayerTransform(casterClientId); Vector3 val = (((Object)(object)playerTransform != (Object)null && (Object)(object)domainRoot != (Object)null) ? domainRoot.transform.InverseTransformPoint(playerTransform.position) : Vector3.zero); CreateCapsule("Caster Focus", val + Vector3.up * 1.05f, new Vector3(0.75f, 1.25f, 0.75f), new Color(style.CoreColor.r, style.CoreColor.g, style.CoreColor.b, 0.28f), parent); CreateSphere("Caster Halo", val + Vector3.up * 2.05f, Vector3.one * 0.95f, style.AccentColor, parent); GameObject val2 = new GameObject("Caster Spotlight"); val2.transform.SetParent(parent, false); val2.transform.localPosition = val + Vector3.up * 3.2f; Light obj = val2.AddComponent(); obj.type = (LightType)2; obj.color = style.LightColor; obj.intensity = style.LightIntensity + 4f; obj.range = 12f; } private void CreateOpeningText(DomainStyle style, Transform parent) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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_007d: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Opening Text"); val.transform.SetParent(parent, false); val.transform.localPosition = new Vector3(-2.2f, 3.2f, 1.8f); TextMesh obj = val.AddComponent(); obj.text = "DOMAIN EXPANSION\n" + GetDomainName(selectedDomain).ToUpperInvariant(); obj.fontSize = 42; obj.characterSize = 0.07f; obj.anchor = (TextAnchor)4; obj.alignment = (TextAlignment)1; obj.color = style.TextColor; } private void UpdateOpeningAndDomainVisuals() { //IL_0128: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) if (openingActive) { openingTime = Mathf.Clamp(2.35f - Mathf.Max(0f, openingEndRealtime - Time.realtimeSinceStartup), 0f, 2.35f); float num = Mathf.Clamp01(openingTime / 2.35f); float num2 = Mathf.Lerp(0.72f, 1.08f, EaseOutCubic(num)); if ((Object)(object)openingRoot != (Object)null) { openingRoot.transform.localScale = Vector3.one * num2; } UpdateOpeningCinematic(num); if (num >= 1f) { openingActive = false; if ((Object)(object)openingRoot != (Object)null) { Object.Destroy((Object)(object)openingRoot); openingRoot = null; } ActivateClosedDomainArena(); CreateDomainVisual(domainCenter); domainVisualBuilt = true; statusText = GetDomainName(selectedDomain) + " opened for " + FormatDuration(activeDomainDuration) + "."; ShowTip("Domain opened", statusText); } } else { if (!domainVisualBuilt) { ActivateClosedDomainArena(); CreateDomainVisual(domainCenter); domainVisualBuilt = true; } if ((Object)(object)domainLight != (Object)null) { domainLight.intensity = GetDomainStyle(selectedDomain).LightIntensity + Mathf.Sin(Time.time * 9f) * 1.4f; } UpdateInfiniteVoidAnimatedVisuals(); UpdateMalevolentShrineAnimatedVisuals(); UpdateIdleDeathGambleAnimatedVisuals(); UpdateSelfEmbodimentAnimatedVisuals(); UpdateDomainClosingVisuals(); } } private void UpdateOpeningCinematic(float progress) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < openingRotators.Count; i++) { Transform val = openingRotators[i]; if (!((Object)(object)val == (Object)null)) { val.Rotate(Vector3.forward, openingRotationSpeeds[i] * Time.deltaTime, (Space)1); } } for (int j = 0; j < openingTimedParticles.Count; j++) { ParticleSystem val2 = openingTimedParticles[j]; if (!((Object)(object)val2 == (Object)null)) { EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).enabled = progress < openingParticleStopProgress[j]; } } } private void UpdateIdleDeathGambleAnimatedVisuals() { //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_006b: 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) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0162: 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_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) if (selectedDomain != DomainKind.IdleDeathGamble || !domainOpen) { return; } idleDeathGambleVisualTime += Time.deltaTime; idleDeathGambleRollPulse = Mathf.Max(0f, idleDeathGambleRollPulse - Time.deltaTime * 1.4f); for (int i = 0; i < idleDeathGambleRotators.Count; i++) { Transform val = idleDeathGambleRotators[i]; if (!((Object)(object)val == (Object)null)) { val.Rotate(idleDeathGambleRotationAxes[i], idleDeathGambleRotationSpeeds[i] * Time.deltaTime, (Space)1); } } Color val2 = default(Color); ((Color)(ref val2))..ctor(0.14f, 1f, 0.48f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(1f, 0.12f, 0.72f, 1f); Color white = Color.white; for (int j = 0; j < idleDeathGambleChaseLights.Count; j++) { Renderer val4 = idleDeathGambleChaseLights[j]; if (!((Object)(object)val4 == (Object)null)) { float num = Mathf.Clamp01(Mathf.Pow(Mathf.Clamp01(Mathf.Sin(idleDeathGambleVisualTime * 5.5f - (float)j * 0.52f) * 0.5f + 0.5f), 5f) + idleDeathGambleRollPulse); Color val5 = ((j % 3 == 0) ? white : ((j % 3 == 1) ? val2 : val3)); SetRendererTint(val4, Color.Lerp(val5 * 0.3f, val5, num)); ((Component)val4).transform.localScale = idleDeathGambleChaseScales[j] * Mathf.Lerp(0.72f, 1.45f, num); } } if ((Object)(object)activeDomainInteriorRenderer != (Object)null && (Object)(object)activeDomainInteriorRenderer.material != (Object)null) { activeDomainInteriorRenderer.material.mainTextureOffset = new Vector2(idleDeathGambleVisualTime * 0.0012f, 0f); } } private void UpdateDomainClosingVisuals() { //IL_006a: 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_002f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)domainRoot == (Object)null || openingActive) { return; } if (domainTimeLeft > 1.25f) { domainRoot.transform.localScale = Vector3.one; return; } float num = Mathf.Clamp01(domainTimeLeft / 1.25f); float num2 = Mathf.Lerp(0.08f, 1f, num * num); domainRoot.transform.localScale = Vector3.one * num2; if ((Object)(object)domainLight != (Object)null) { Light? obj = domainLight; obj.intensity *= num; } } private void UpdateInfiniteVoidAnimatedVisuals() { //IL_005a: 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_0151: 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_0179: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) if (selectedDomain != DomainKind.InfiniteVoid || !domainOpen) { return; } infiniteVoidVisualTime += Time.deltaTime; for (int i = 0; i < infiniteVoidRotators.Count; i++) { Transform val = infiniteVoidRotators[i]; if (!((Object)(object)val == (Object)null)) { float num = ((i == 0) ? 0.22f : ((i % 2 == 0) ? 7f : (-10f))); val.Rotate(Vector3.up, num * Time.deltaTime, (Space)0); if (i > 0) { val.Rotate(Vector3.forward, Mathf.Sin(infiniteVoidVisualTime * 0.7f + (float)i) * 1.8f * Time.deltaTime, (Space)1); } } } for (int j = 0; j < infiniteVoidPulseLines.Count; j++) { LineRenderer val2 = infiniteVoidPulseLines[j]; if (!((Object)(object)val2 == (Object)null)) { float num2 = 0.65f + Mathf.Sin(infiniteVoidVisualTime * (2.6f + (float)j * 0.07f) + (float)j) * 0.35f; val2.startWidth = Mathf.Lerp(0.018f, 0.12f, num2); val2.endWidth = val2.startWidth; if ((Object)(object)((Renderer)val2).material != (Object)null && ((Renderer)val2).material.HasProperty("_Color")) { Color color = ((Renderer)val2).material.color; color.a = Mathf.Clamp01(0.45f + num2 * 0.48f); ((Renderer)val2).material.color = color; ((Renderer)val2).material.SetColor("_Color", color); } } } float num3 = Mathf.Pow(Mathf.Clamp01(Mathf.Sin(infiniteVoidVisualTime * 0.72f) * 0.5f + 0.5f), 7f); for (int k = 0; k < infiniteVoidParticleSystems.Count; k++) { ParticleSystem val3 = infiniteVoidParticleSystems[k]; if (!((Object)(object)val3 == (Object)null)) { EmissionModule emission = val3.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(infiniteVoidParticleRates[k] * Mathf.Lerp(0.55f, 2.2f, num3)); } } if ((Object)(object)infiniteVoidGalaxyRenderer != (Object)null && (Object)(object)infiniteVoidGalaxyRenderer.material != (Object)null) { infiniteVoidGalaxyRenderer.material.mainTextureOffset = new Vector2(infiniteVoidVisualTime * 0.0008f, Mathf.Sin(infiniteVoidVisualTime * 0.09f) * 0.002f); } for (int l = 0; l < infiniteVoidOverlayImages.Count; l++) { RawImage val4 = infiniteVoidOverlayImages[l]; if (!((Object)(object)val4 == (Object)null)) { Rect uvRect = val4.uvRect; ((Rect)(ref uvRect)).x = ((Rect)(ref uvRect)).x + Time.deltaTime * (0.015f + (float)l * 0.009f); ((Rect)(ref uvRect)).y = ((Rect)(ref uvRect)).y + Time.deltaTime * ((l % 2 == 0) ? (-0.01f) : 0.012f); val4.uvRect = uvRect; Color color2 = ((Graphic)val4).color; color2.a = Mathf.Clamp01(l switch { 1 => 0.22f, 0 => 0.12f, _ => 0.34f, } + Mathf.Sin(infiniteVoidVisualTime * (1.2f + (float)l * 0.5f)) * 0.06f); ((Graphic)val4).color = color2; } } for (int m = 0; m < infiniteVoidOverlayRects.Count; m++) { RectTransform val5 = infiniteVoidOverlayRects[m]; if (!((Object)(object)val5 == (Object)null)) { ((Transform)val5).localRotation = Quaternion.Euler(0f, 0f, Mathf.Sin(infiniteVoidVisualTime * (0.6f + (float)m * 0.1f)) * 1.8f); } } } private void UpdateMalevolentShrineAnimatedVisuals() { //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0202: 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_021a: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) if ((selectedDomain != DomainKind.MalevolentShrineOpen && selectedDomain != DomainKind.MalevolentShrineClosed) || !domainOpen) { return; } malevolentShrineVisualTime += Time.deltaTime; Camera val = Camera.main; if ((Object)(object)val == (Object)null) { PlayerControllerB val2 = StartOfRound.Instance?.localPlayerController; val = (((Object)(object)val2 != (Object)null) ? val2.gameplayCamera : null); } for (int i = 0; i < malevolentShrineSlashLines.Count; i++) { LineRenderer val3 = malevolentShrineSlashLines[i]; if (!((Object)(object)val3 == (Object)null)) { float num = Mathf.Repeat(malevolentShrineVisualTime * malevolentShrineSlashSpeeds[i] + malevolentShrineSlashPhases[i], 1f); if (((Renderer)val3).enabled = num < 0.34f) { float num2 = Mathf.Sin(Mathf.Clamp01(num / 0.34f) * MathF.PI); float num3 = (val3.startWidth = malevolentShrineSlashWidths[i] * Mathf.Lerp(0.45f, 1.35f, num2)); val3.endWidth = num3 * 0.72f; } } } for (int j = 0; j < malevolentShrineSlashSprites.Count; j++) { AnimatedSlashSprite animatedSlashSprite = malevolentShrineSlashSprites[j]; if ((Object)(object)animatedSlashSprite.Transform == (Object)null || (Object)(object)animatedSlashSprite.Renderer == (Object)null) { continue; } float num5 = Mathf.Repeat(malevolentShrineVisualTime * animatedSlashSprite.Speed + animatedSlashSprite.Phase, 1f); float num6 = Mathf.SmoothStep(0f, 1f, Mathf.Clamp01(num5 / 0.035f)); float num7 = 1f - Mathf.SmoothStep(0f, 1f, Mathf.Clamp01((num5 - 0.22f) / 0.38f)); float num8 = Mathf.Clamp01(num6 * num7); animatedSlashSprite.Renderer.enabled = num8 > 0.015f; animatedSlashSprite.Transform.localPosition = animatedSlashSprite.Anchor + animatedSlashSprite.Drift * num5; animatedSlashSprite.Transform.localScale = animatedSlashSprite.BaseScale * Mathf.Lerp(0.72f, 1.16f, Mathf.Clamp01(num5 / 0.3f)); if (animatedSlashSprite.CameraAttached) { animatedSlashSprite.Transform.localRotation = Quaternion.Euler(0f, 0f, animatedSlashSprite.Roll); } else if ((Object)(object)val != (Object)null) { Vector3 val4 = ((Component)val).transform.position - animatedSlashSprite.Transform.position; if (((Vector3)(ref val4)).sqrMagnitude > 0.001f) { animatedSlashSprite.Transform.rotation = Quaternion.LookRotation(((Vector3)(ref val4)).normalized) * Quaternion.Euler(0f, 0f, animatedSlashSprite.Roll); } } Color tint = animatedSlashSprite.Tint; tint.a = num8; SetRendererTint(animatedSlashSprite.Renderer, tint); } if ((Object)(object)shrineMouthRoot != (Object)null) { float num9 = 1f + Mathf.Sin(malevolentShrineVisualTime * 2.4f) * 0.018f; shrineMouthRoot.localScale = new Vector3(num9, 1f / num9, num9); } } private void FaceOpeningTextToCamera(Transform root) { //IL_005c: 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_0071: Unknown result type (might be due to invalid IL or missing references) Camera val = Camera.main; if ((Object)(object)val == (Object)null) { PlayerControllerB val2 = StartOfRound.Instance?.localPlayerController; val = (((Object)(object)val2 != (Object)null) ? val2.gameplayCamera : null); } if (!((Object)(object)val == (Object)null)) { TextMesh[] componentsInChildren = ((Component)root).GetComponentsInChildren(); foreach (TextMesh val3 in componentsInChildren) { ((Component)val3).transform.rotation = Quaternion.LookRotation(((Component)val3).transform.position - ((Component)val).transform.position); } } } private void CreateDomainVisual(Vector3 center) { //IL_0059: 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_002e: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)domainRoot == (Object)null) { domainRoot = new GameObject("Domain - " + GetDomainName(selectedDomain)); } ((Object)domainRoot).name = "Domain - " + GetDomainName(selectedDomain); domainRoot.transform.position = center; DomainStyle domainStyle = GetDomainStyle(selectedDomain); if (HasClosedBarrier()) { CreateDomainBarrierShell(selectedDomain, domainStyle, GetDomainVisualRadius(selectedDomain)); if (localPlayerInDomainArena) { CreateCameraSafeDomainInterior(selectedDomain, domainStyle); } } switch (selectedDomain) { case DomainKind.InfiniteVoid: CreateVoidMotifs(domainStyle); break; case DomainKind.MalevolentShrineOpen: CreateShrineMotifs(domainStyle, closed: false); break; case DomainKind.MalevolentShrineClosed: CreateShrineMotifs(domainStyle, closed: true); break; case DomainKind.IdleDeathGamble: CreateGambleMotifs(domainStyle); break; case DomainKind.SelfEmbodimentOfPerfection: CreateSelfEmbodimentMotifs(domainStyle); break; } if (HasClosedBarrier()) { CreateClosedDomainCenterPoint(domainStyle); } domainLight = domainRoot.AddComponent(); domainLight.type = (LightType)2; domainLight.color = domainStyle.LightColor; domainLight.intensity = domainStyle.LightIntensity; domainLight.range = 44.2f; if (!HasClosedBarrier() || localPlayerInDomainArena) { ApplyDomainAtmosphere(domainStyle); } } private void CreateClosedBarrierVisual(DomainStyle style) { //IL_000f: 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_0025: 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_005f: 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_008b: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0200: 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) //IL_021c: 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_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color color = default(Color); ((Color)(ref color))..ctor(style.TextColor.r, style.TextColor.g, style.TextColor.b, 1f); CreateBarrierRing("Closed Barrier Ring Ground Glow", 0.14f, 23.4f, color); CreateBarrierRing("Closed Barrier Ring Low", 0.45f, 23.4f, color); CreateBarrierRing("Closed Barrier Ring Mid", 2.6f, 23.4f, color); CreateBarrierRing("Closed Barrier Ring High", 5.2f, 23.4f, color); CreateBarrierRing("Closed Barrier Crown", 7.2f, 19.188f, color); CreateLineRing("Closed Barrier Line Ground", 23.4f, 0.22f, color, transform, 0.26f); CreateLineRing("Closed Barrier Line Mid", 23.4f, 2.8f, color, transform, 0.32f); CreateLineRing("Closed Barrier Line High", 23.4f, 5.4f, color, transform, 0.32f); CreateLineRing("Closed Barrier Line Crown", 18.251999f, 7.5f, color, transform, 0.24f); CreateLineCage("Closed Barrier Line Cage", 23.4f, 48, 7.6f, color, transform, 0.22f); CreateLineCage("Closed Barrier Inner Line Cage", 12.87f, 24, 5.2f, color, transform, 0.16f); CreateBarrierSpokes(color); int num = 64; Vector3 localPosition = default(Vector3); for (int i = 0; i < num; i++) { float num2 = (float)i * MathF.PI * 2f / (float)num; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num2) * 23.4f, 2.8f, Mathf.Sin(num2) * 23.4f); CreateCube("Closed Barrier Beam", localPosition, new Vector3(0.62f, 8.2f, 0.62f), color, domainRoot.transform).transform.localRotation = Quaternion.Euler(0f, (0f - num2) * 57.29578f, 0f); } GameObject val = new GameObject("Closed Barrier Glow Light"); val.transform.SetParent(domainRoot.transform, false); val.transform.localPosition = Vector3.up * 3.2f; Light obj = val.AddComponent(); obj.type = (LightType)2; obj.color = style.LightColor; obj.intensity = style.LightIntensity + 7f; obj.range = 31.59f; } private void CreateDomainBarrierShell(DomainKind domain, DomainStyle style, float visualRadius) { //IL_0026: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: 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_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_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_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) Color color = default(Color); float num; float num2; float num3; switch (domain) { case DomainKind.InfiniteVoid: _ = infiniteVoidGalaxyTexture; _ = Color.white; color = Color.black; num = 24.335999f; num2 = 17f; num3 = 5.1f; break; case DomainKind.MalevolentShrineOpen: _ = malevolentShrineOpenBarrierTexture; new Color(1f, 0.18f, 0.08f, 1f); ((Color)(ref color))..ctor(0.12f, 0f, 0f, 1f); num = 57.199997f; num2 = 25f; num3 = 6.5f; break; case DomainKind.MalevolentShrineClosed: _ = malevolentShrineClosedBarrierTexture; _ = Color.white; color = Color.black; num = 24.335999f; num2 = 17f; num3 = 5.1f; break; case DomainKind.IdleDeathGamble: _ = idleDeathGambleBarrierTexture; _ = Color.white; color = Color.black; num = 24.335999f; num2 = 17f; num3 = 5.1f; break; case DomainKind.SelfEmbodimentOfPerfection: new Color(0.3f, 0.04f, 0.42f, 1f); color = Color.black; num = GetClosedBarrierRadius(domain) * 1.04f; num2 = 25.5f; num3 = 7.7f; break; default: color = new Color(style.LightColor.r, style.LightColor.g, style.LightColor.b, 1f); num = visualRadius; num2 = 17f; num3 = 5.1f; break; } Vector3 localScale = default(Vector3); ((Vector3)(ref localScale))..ctor(num * 2f, num2, num * 2f); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)obj).name = GetDomainName(domain) + " Fixed Black Outer Barrier"; obj.transform.SetParent(domainRoot.transform, false); obj.transform.localPosition = Vector3.up * num3; obj.transform.localScale = localScale; Object.Destroy((Object)(object)obj.GetComponent()); ApplyOutsideOnlyOpaqueMaterial(obj.GetComponent(), color); } private void CreateCameraSafeDomainInterior(DomainKind domain, DomainStyle style) { //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = StartOfRound.Instance?.localPlayerController; Camera val2 = (((Object)(object)val != (Object)null) ? val.gameplayCamera : Camera.main); if ((Object)(object)val2 == (Object)null) { Log.LogWarning((object)"Could not create the opaque domain interior because no gameplay camera was found."); return; } Texture2D texture; Color lightColor = default(Color); float brightness; switch (domain) { case DomainKind.InfiniteVoid: texture = infiniteVoidGalaxyTexture; ((Color)(ref lightColor))..ctor(0.002f, 0.002f, 0.018f, 1f); brightness = 0.27f; break; case DomainKind.MalevolentShrineClosed: texture = malevolentShrineClosedBarrierTexture; ((Color)(ref lightColor))..ctor(0.035f, 0f, 0f, 1f); brightness = 0.42f; break; case DomainKind.IdleDeathGamble: texture = idleDeathGambleBarrierTexture; ((Color)(ref lightColor))..ctor(0.94f, 0.96f, 0.98f, 1f); brightness = 0.38f; break; case DomainKind.SelfEmbodimentOfPerfection: texture = null; ((Color)(ref lightColor))..ctor(0.055f, 0.012f, 0.075f, 1f); brightness = 1f; break; default: texture = null; lightColor = style.LightColor; brightness = 0.3f; break; } if (!skyboxCaptured) { originalSkybox = RenderSettings.skybox; skyboxCaptured = true; } if (!domainCameraCaptured) { domainGameplayCamera = val2; originalCameraClearFlags = val2.clearFlags; originalCameraBackgroundColor = val2.backgroundColor; domainCameraCaptured = true; } val2.clearFlags = (CameraClearFlags)2; val2.backgroundColor = lightColor; RenderSettings.skybox = null; domainCameraBackdropRoot = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)domainCameraBackdropRoot).name = GetDomainName(domain) + " Fixed HDRP Textured Interior"; domainCameraBackdropRoot.transform.SetParent(domainRoot.transform, false); bool flag = domain == DomainKind.SelfEmbodimentOfPerfection; float closedBarrierRadius = GetClosedBarrierRadius(domain); domainCameraBackdropRoot.transform.localPosition = Vector3.up * (flag ? 7.7f : 5.1f); domainCameraBackdropRoot.transform.localRotation = Quaternion.Euler(0f, 180f, 0f); domainCameraBackdropRoot.transform.localScale = new Vector3(closedBarrierRadius * 2.02f, flag ? 25.5f : 16.6f, closedBarrierRadius * 2.02f); Object.Destroy((Object)(object)domainCameraBackdropRoot.GetComponent()); InvertMesh(domainCameraBackdropRoot.GetComponent()); activeDomainInteriorRenderer = domainCameraBackdropRoot.GetComponent(); ApplyCameraBackdropMaterial(activeDomainInteriorRenderer, texture, lightColor, brightness); Log.LogInfo((object)("Fixed world-space HDRP interior created for " + GetDomainName(domain) + ".")); } private void CreateOpaqueDomainRoom(DomainKind domain, DomainStyle style) { //IL_00c8: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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_0148: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_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_01a7: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: 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_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Texture2D texture; Color color = default(Color); switch (domain) { default: return; case DomainKind.InfiniteVoid: texture = infiniteVoidGalaxyTexture; ((Color)(ref color))..ctor(0.001f, 0.002f, 0.012f, 1f); break; case DomainKind.MalevolentShrineClosed: texture = malevolentShrineClosedBarrierTexture; ((Color)(ref color))..ctor(0.028f, 0f, 0f, 1f); break; case DomainKind.IdleDeathGamble: texture = idleDeathGambleBarrierTexture; ((Color)(ref color))..ctor(0.92f, 0.95f, 0.96f, 1f); break; case DomainKind.MalevolentShrineOpen: return; } float num = 24.335999f; float num2 = ((domain == DomainKind.InfiniteVoid) ? 15.5f : 13.5f); float num3 = num * 2.16f; float num4 = num2 * 0.5f; GameObject val = CreateCube("Domain Room North Solid Wall", new Vector3(0f, num4, num), new Vector3(num3, num2, 0.3f), color, transform); GameObject val2 = CreateCube("Domain Room South Solid Wall", new Vector3(0f, num4, 0f - num), new Vector3(num3, num2, 0.3f), color, transform); GameObject val3 = CreateCube("Domain Room East Solid Wall", new Vector3(num, num4, 0f), new Vector3(0.3f, num2, num3), color, transform); GameObject val4 = CreateCube("Domain Room West Solid Wall", new Vector3(0f - num, num4, 0f), new Vector3(0.3f, num2, num3), color, transform); GameObject val5 = CreateCube("Domain Room Solid Floor", new Vector3(0f, 0.08f, 0f), new Vector3(num3, 0.18f, num3), color, transform); GameObject obj = CreateCube("Domain Room Solid Ceiling", new Vector3(0f, num2, 0f), new Vector3(num3, 0.18f, num3), color, transform); ApplyOpaqueUnlitMaterial(val.GetComponent(), color); ApplyOpaqueUnlitMaterial(val2.GetComponent(), color); ApplyOpaqueUnlitMaterial(val3.GetComponent(), color); ApplyOpaqueUnlitMaterial(val4.GetComponent(), color); ApplyOpaqueUnlitMaterial(val5.GetComponent(), color); ApplyOpaqueUnlitMaterial(obj.GetComponent(), color); CreateOpaqueTexturedQuad("Domain Room North Texture", new Vector3(0f, num4, num - 0.18f), new Vector2(num3, num2), texture, transform).transform.localRotation = Quaternion.Euler(0f, 180f, 0f); CreateOpaqueTexturedQuad("Domain Room South Texture", new Vector3(0f, num4, 0f - num + 0.18f), new Vector2(num3, num2), texture, transform).transform.localRotation = Quaternion.identity; CreateOpaqueTexturedQuad("Domain Room East Texture", new Vector3(num - 0.18f, num4, 0f), new Vector2(num3, num2), texture, transform).transform.localRotation = Quaternion.Euler(0f, -90f, 0f); CreateOpaqueTexturedQuad("Domain Room West Texture", new Vector3(0f - num + 0.18f, num4, 0f), new Vector2(num3, num2), texture, transform).transform.localRotation = Quaternion.Euler(0f, 90f, 0f); CreateOpaqueTexturedQuad("Domain Room Ceiling Texture", new Vector3(0f, num2 - 0.1f, 0f), new Vector2(num3, num3), texture, transform).transform.localRotation = Quaternion.Euler(90f, 0f, 0f); Log.LogInfo((object)("Opaque six-sided domain room created for " + GetDomainName(domain) + ".")); } private void CreateVisibleDomainFrame(DomainStyle style) { //IL_0003: 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_0019: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) Color color = default(Color); ((Color)(ref color))..ctor(style.TextColor.r, style.TextColor.g, style.TextColor.b, 1f); Color color2 = default(Color); ((Color)(ref color2))..ctor(style.AccentColor.r, style.AccentColor.g, style.AccentColor.b, 1f); float radius = GetDomainVisualRadius(selectedDomain) * 0.94f; CreateLineRing("Domain Visible Ground Ring", radius, 0.18f, color, domainRoot.transform, 0.18f); CreateLineRing("Domain Visible Mid Ring", radius, 2.8f, color2, domainRoot.transform, 0.16f); CreateLineRing("Domain Visible High Ring", radius, 5.8f, color, domainRoot.transform, 0.14f); CreateLineCage("Domain Visible Outer Lines", radius, 28, 6.2f, color2, domainRoot.transform, 0.09f); } private void CreateBarrierCage(float radius, int count, float height, float thickness, Color color) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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) Vector3 localPosition = default(Vector3); for (int i = 0; i < count; i++) { float num = (float)i * MathF.PI * 2f / (float)count; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num) * radius, height * 0.5f, Mathf.Sin(num) * radius); CreateCube("Closed Barrier Visible Cage", localPosition, new Vector3(thickness, height, thickness), color, domainRoot.transform).transform.localRotation = Quaternion.Euler(0f, (0f - num) * 57.29578f, 0f); } } private void CreateBarrierSpokes(Color color) { //IL_0055: 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_006b: 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_00ae: 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_00ba: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) int num = 24; Vector3 localPosition = default(Vector3); for (int i = 0; i < num; i++) { float num2 = (float)i * MathF.PI * 2f / (float)num; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num2) * 23.4f * 0.5f, 7.1f, Mathf.Sin(num2) * 23.4f * 0.5f); CreateCube("Closed Barrier Ceiling Spoke", localPosition, new Vector3(23.4f, 0.08f, 0.14f), color, domainRoot.transform).transform.localRotation = Quaternion.Euler(0f, (0f - num2) * 57.29578f, 0f); } int num3 = 32; Color color2 = default(Color); ((Color)(ref color2))..ctor(color.r, color.g, color.b, 0.9f); Vector3 localPosition2 = default(Vector3); for (int j = 0; j < num3; j++) { float num4 = (float)j * MathF.PI * 2f / (float)num3; ((Vector3)(ref localPosition2))..ctor(Mathf.Cos(num4) * 23.4f, 3.2f, Mathf.Sin(num4) * 23.4f); CreateCube("Closed Barrier Wall Panel", localPosition2, new Vector3(3.6f, 7.1f, 0.18f), color2, domainRoot.transform).transform.localRotation = Quaternion.Euler(0f, (0f - num4) * 57.29578f, 0f); } } private void CreateBarrierRing(string name, float height, float radius, Color color) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) int num = 72; float num2 = MathF.PI * 2f * radius / (float)num * 0.82f; Vector3 localPosition = default(Vector3); for (int i = 0; i < num; i++) { float num3 = (float)i * MathF.PI * 2f / (float)num; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num3) * radius, height, Mathf.Sin(num3) * radius); CreateCube(name, localPosition, new Vector3(num2, 0.32f, 0.34f), color, domainRoot.transform).transform.localRotation = Quaternion.Euler(0f, (0f - num3) * 57.29578f, 0f); } } private void CreateVoidMotifs(DomainStyle style) { CreateInfiniteVoidDomainSeal(style); CreateInfiniteVoidEventHorizonSetpiece(style); CreateInfiniteVoidParticleField(); } private void CreateInfiniteVoidDomainSeal(DomainStyle style) { //IL_0020: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; new Color(0.92f, 1f, 1f, 1f); new Color(0.14f, 0.82f, 1f, 1f); new Color(0.82f, 0.28f, 1f, 1f); Color color = default(Color); ((Color)(ref color))..ctor(0.002f, 0.002f, 0.018f, 1f); CreateCylinder("Infinite Void Dark Ground Plane", Vector3.up * 0.13f, new Vector3(55.119995f, 0.045f, 55.119995f), color, transform); } private void CreateInfiniteVoidInteriorBarrier(DomainStyle style) { //IL_0071: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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) Transform transform = domainRoot.transform; Color val = default(Color); ((Color)(ref val))..ctor(0.92f, 1f, 1f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.18f, 0.74f, 1f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.72f, 0.3f, 1f, 1f); float num = 30.16f; CreateLineRing("Infinite Void Barrier Ground Edge", num, 0.62f, val, transform, 0.16f); CreateLineRing("Infinite Void Barrier Low Halo", num * 0.98f, 2.6f, val2, transform, 0.095f); CreateLineRing("Infinite Void Barrier Mid Halo", num * 0.84f, 5.9f, val3, transform, 0.08f); CreateLineRing("Infinite Void Barrier Crown Halo", num * 0.48f, 10.2f, val, transform, 0.11f); for (int i = 0; i < 64; i++) { float num2 = (float)i * MathF.PI * 2f / 64f; float num3 = Mathf.Cos(num2) * num; float num4 = Mathf.Sin(num2) * num; Color color = ((i % 3 == 0) ? val : ((i % 3 == 1) ? val2 : val3)); LineRenderer component = CreateLine("Infinite Void Barrier Rib", new Vector3(num3, 0.62f, num4), new Vector3(num3 * 0.45f, 10.6f, num4 * 0.45f), color, transform, 0.036f + (float)(i % 4) * 0.012f).GetComponent(); infiniteVoidPulseLines.Add(component); } } private void CreateInfiniteVoidEventHorizonSetpiece(DomainStyle style) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Expected O, but got Unknown //IL_008d: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: 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_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color val = default(Color); ((Color)(ref val))..ctor(0.92f, 1f, 1f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.62f, 0.9f, 1f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.75f, 0.24f, 1f, 1f); GameObject val4 = new GameObject("Infinite Void Event Horizon Root"); val4.transform.SetParent(transform, false); val4.transform.localPosition = new Vector3(0f, 5.1f, 14.8f); val4.transform.localRotation = Quaternion.Euler(0f, 180f, 0f); infiniteVoidRotators.Add(val4.transform); CreateTexturedQuad("Infinite Void Event Horizon Texture Disc", Vector3.zero, new Vector2(13.5f, 13.5f), infiniteVoidBlackHoleTexture, Color.white, val4.transform, 1.35f); CreateSphere("Infinite Void Singularity Core", Vector3.zero, Vector3.one * 4.5f, Color.black, val4.transform); infiniteVoidPulseLines.Add(CreateVerticalLineRing("Infinite Void Event Horizon White Ring", 4.5f, 0.08f, val, val4.transform, 0.095f).GetComponent()); infiniteVoidPulseLines.Add(CreateVerticalLineRing("Infinite Void Event Horizon Blue Ring", 5.2f, 0.1f, val2, val4.transform, 0.052f).GetComponent()); infiniteVoidPulseLines.Add(CreateVerticalLineRing("Infinite Void Event Horizon Violet Ring", 5.9f, 0.12f, val3, val4.transform, 0.034f).GetComponent()); Vector3 start = default(Vector3); Vector3 end = default(Vector3); for (int i = 0; i < 10; i++) { float num = (float)i * MathF.PI * 2f / 10f; float num2 = 4.7f; float num3 = 7.6f + (float)(i % 3) * 0.55f; ((Vector3)(ref start))..ctor(Mathf.Cos(num) * num2, Mathf.Sin(num) * num2, 0.06f); ((Vector3)(ref end))..ctor(Mathf.Cos(num + 0.1f) * num3, Mathf.Sin(num + 0.1f) * num3, 0.06f); LineRenderer component = CreateLine("Infinite Void Accretion Ray", start, end, (i % 3 == 0) ? val : ((i % 3 == 1) ? val2 : val3), val4.transform, 0.028f + (float)(i % 3) * 0.012f).GetComponent(); infiniteVoidPulseLines.Add(component); } } private void CreateInfiniteVoidParticleField() { //IL_0013: 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_0027: 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_004f: 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_006d: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: 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_0185: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: 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_01cb: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; ParticleSystem item = CreateParticleEffect("Infinite Void Living Star Field", transform, Vector3.up * 3.2f, Quaternion.identity, Color.white, new Color(0.3f, 0.62f, 1f, 1f), new Vector2(7f, 16f), new Vector2(0.025f, 0.14f), new Vector2(0.03f, 0.32f), 900, 72f, (ParticleSystemShapeType)0, 23.92f, additive: true, stretched: false); infiniteVoidParticleSystems.Add(item); infiniteVoidParticleRates.Add(72f); ParticleSystem item2 = CreateParticleEffect("Infinite Void Blue Information Surge", transform, Vector3.up * 2.2f, Quaternion.identity, new Color(0.1f, 0.28f, 1f, 1f), new Color(0.46f, 0.92f, 1f, 1f), new Vector2(0.45f, 1.25f), new Vector2(0.035f, 0.12f), new Vector2(7f, 15f), 420, 32f, (ParticleSystemShapeType)0, 4.2f, additive: true, stretched: true); infiniteVoidParticleSystems.Add(item2); infiniteVoidParticleRates.Add(32f); ParticleSystem item3 = CreateParticleEffect("Infinite Void Violet Information Surge", transform, Vector3.up * 2.4f, Quaternion.identity, new Color(0.78f, 0.08f, 1f, 1f), new Color(1f, 0.42f, 0.9f, 1f), new Vector2(0.35f, 0.95f), new Vector2(0.025f, 0.1f), new Vector2(9f, 18f), 330, 22f, (ParticleSystemShapeType)0, 3.1f, additive: true, stretched: true); infiniteVoidParticleSystems.Add(item3); infiniteVoidParticleRates.Add(22f); } private void CreateInfiniteVoidWarpField(DomainStyle style) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: 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_01b0: 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_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color val = default(Color); ((Color)(ref val))..ctor(1f, 0.08f, 0.95f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.58f, 0.15f, 1f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.08f, 0.22f, 1f, 1f); Color val4 = default(Color); ((Color)(ref val4))..ctor(1f, 0.9f, 1f, 1f); GameObject val5 = new GameObject("Infinite Void Warp Corridor"); val5.transform.SetParent(transform, false); val5.transform.localPosition = Vector3.up * 2.3f; val5.transform.localRotation = Quaternion.Euler(0f, -8f, 0f); infiniteVoidRotators.Add(val5.transform); Vector3 start = default(Vector3); Vector3 end = default(Vector3); for (int i = 0; i < 32; i++) { float num = -4.8f + (float)(i % 16) * 0.64f; float num2 = 1.4f + (float)(i * 7 % 11) * 0.42f; float num3 = -20.279999f + (float)(i % 8) * 0.72f; float num4 = 10f + (float)(i % 6) * 1.4f; ((Vector3)(ref start))..ctor((0f - num4) * 0.5f, num2, num3 + num * 0.16f); ((Vector3)(ref end))..ctor(num4 * 0.5f, num2 + Mathf.Sin((float)i) * 0.45f, num3 + num * 0.16f + 0.8f); Color color = ((i % 4 == 0) ? val4 : ((i % 4 == 1) ? val : ((i % 4 == 2) ? val2 : val3))); LineRenderer component = CreateLine("Infinite Void Warp Line", start, end, color, val5.transform, 0.018f + (float)(i % 5) * 0.008f).GetComponent(); infiniteVoidPulseLines.Add(component); } Vector3 start2 = default(Vector3); Vector3 end2 = default(Vector3); for (int j = 0; j < 10; j++) { float num5 = (float)j * MathF.PI * 2f / 10f; ((Vector3)(ref start2))..ctor(Mathf.Cos(num5) * 3.2f, 1.4f + (float)(j % 4) * 0.25f, Mathf.Sin(num5) * 3.2f); ((Vector3)(ref end2))..ctor(Mathf.Cos(num5) * 26f * 0.92f, 4.8f + (float)(j % 5) * 0.42f, Mathf.Sin(num5) * 26f * 0.92f); LineRenderer component2 = CreateLine("Infinite Void Radial Information Beam", start2, end2, (j % 2 == 0) ? val4 : val3, transform, 0.035f).GetComponent(); infiniteVoidPulseLines.Add(component2); } } private void CreateInfiniteVoidInformationField(DomainStyle style) { //IL_00e3: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_021a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color val = default(Color); ((Color)(ref val))..ctor(0.96f, 1f, 1f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.34f, 0.72f, 1f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.78f, 0.38f, 1f, 1f); Vector3 val4 = default(Vector3); for (int i = 0; i < 170; i++) { float num = (float)i * 2.399963f; float num2 = 2.2f + (float)(i % 37) * 22.759998f / 37f; float num3 = 0.65f + (float)(i * 11 % 23) * 0.36f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num) * num2, num3, Mathf.Sin(num) * num2); float num4 = 0.035f + (float)(i % 5) * 0.018f; Color color = ((i % 6 == 0) ? val : ((i % 3 == 0) ? val3 : val2)); CreateSphere("Infinite Void Information Spark", val4, Vector3.one * num4, color, transform); if (i % 7 == 0) { LineRenderer component = CreateLine("Infinite Void Spark Glint", val4 - Vector3.right * num4 * 2.6f, val4 + Vector3.right * num4 * 2.6f, color, transform, 0.008f).GetComponent(); infiniteVoidPulseLines.Add(component); } } string[] array = new string[5] { "0", "1", "?", "INF", "..." }; Vector3 localPosition = default(Vector3); for (int j = 0; j < 24; j++) { float num5 = (float)j * MathF.PI * 2f / 24f; float num6 = 6.5f + (float)(j % 6) * 2.25f; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num5) * num6, 1.9f + (float)(j % 7) * 0.45f, Mathf.Sin(num5) * num6); CreateFloatingText("Infinite Void Information Fragment", array[j % array.Length], localPosition, 0.046f, (j % 2 == 0) ? val : val2, transform); } } private void CreateInfiniteVoidScreenOverlay() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)infiniteVoidOverlayRoot != (Object)null) { Object.Destroy((Object)(object)infiniteVoidOverlayRoot); } infiniteVoidOverlayRoot = new GameObject("Infinite Void Cinematic Overlay"); infiniteVoidOverlayRoot.transform.SetParent(domainRoot.transform, false); Canvas obj = infiniteVoidOverlayRoot.AddComponent(); obj.renderMode = (RenderMode)0; obj.sortingOrder = 32720; CanvasScaler obj2 = infiniteVoidOverlayRoot.AddComponent(); obj2.uiScaleMode = (ScaleMode)1; obj2.referenceResolution = new Vector2(1920f, 1080f); obj2.matchWidthOrHeight = 0.5f; CreateInfiniteVoidOverlayLayer("Infinite Void Warp Overlay", infiniteVoidStreakTexture, new Color(1f, 0.85f, 1f, 0.24f), new Vector2(-160f, -120f), new Vector2(160f, 120f)); CreateInfiniteVoidOverlayLayer("Infinite Void Ink Tear Overlay", infiniteVoidInkTexture, new Color(1f, 1f, 1f, 0.34f), new Vector2(-90f, -70f), new Vector2(90f, 70f)); CreateInfiniteVoidOverlayLayer("Infinite Void Event Horizon Overlay", infiniteVoidBlackHoleTexture, new Color(0.8f, 0.95f, 1f, 0.16f), new Vector2(260f, 80f), new Vector2(-260f, -80f)); } private void CreateInfiniteVoidOverlayLayer(string name, Texture2D? texture, Color color, Vector2 offsetMin, Vector2 offsetMax) { //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_002c: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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) if (!((Object)(object)infiniteVoidOverlayRoot == (Object)null)) { GameObject val = new GameObject(name); val.transform.SetParent(infiniteVoidOverlayRoot.transform, false); RawImage val2 = val.AddComponent(); val2.texture = (Texture)(object)texture; ((Graphic)val2).color = color; ((Graphic)val2).raycastTarget = false; RectTransform component = val.GetComponent(); component.anchorMin = Vector2.zero; component.anchorMax = Vector2.one; component.offsetMin = offsetMin; component.offsetMax = offsetMax; infiniteVoidOverlayImages.Add(val2); infiniteVoidOverlayRects.Add(component); } } private void CreateShrineMotifs(DomainStyle style, bool closed) { CreateMalevolentShrineWorldspaceDomain(style, closed); CreateMalevolentShrineMouth(style, closed); CreateMalevolentShrineAnimatedSlashes(closed); CreateMalevolentShrineAtmosphere(closed); } private void CreateMalevolentShrineWorldspaceDomain(DomainStyle style, bool closed) { //IL_004e: 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_0053: 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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_0108: 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_018b: 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_018e: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; float num = (closed ? 23.868f : 52.8f); Color color = (closed ? new Color(0.012f, 0f, 0f, 1f) : new Color(0.026f, 0f, 0f, 1f)); Color bone = default(Color); ((Color)(ref bone))..ctor(0.8f, 0.69f, 0.52f, 1f); Color black = default(Color); ((Color)(ref black))..ctor(0.01f, 0f, 0f, 1f); Color glow = default(Color); ((Color)(ref glow))..ctor(0.78f, 0.015f, 0.005f, 1f); CreateCylinder(closed ? "Closed Shrine Abyss Floor" : "Open Shrine Blood Radius", Vector3.up * 0.11f, new Vector3(num * 2.02f, 0.04f, num * 2.02f), color, transform); if (!closed) { CreateTexturedGroundQuad("Open Shrine Cursed Seal", Vector3.up * 0.2f, num * 1.78f, malevolentShrineGroundSealTexture, Color.white, transform, 1.1f); CreateOpenDomainBoundaryLines(transform); } int num2 = (closed ? 8 : 12); float num3 = num * (closed ? 0.74f : 0.68f); Vector3 localPosition = default(Vector3); for (int i = 0; i < num2; i++) { float num4 = (float)i * MathF.PI * 2f / (float)num2; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num4) * num3, 0.4f, Mathf.Sin(num4) * num3); CreateShrineSkullTotem(closed ? "Closed Shrine Bone Arch" : "Open Shrine Bone Marker", localPosition, num4, bone, black, glow, transform); } } private void CreateMalevolentShrineAnimatedSlashes(bool closed) { //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0202: 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_0213: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_037d: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; float num = (closed ? 20.592f : 50.050003f); int num2 = (closed ? 52 : 84); Texture2D texture = malevolentShrineSlashCoreTexture ?? malevolentShrineSlashTexture; Vector3 val = default(Vector3); Vector2 val2 = default(Vector2); for (int i = 0; i < num2; i++) { float num3 = (float)i * 2.399963f; float num4 = 0.08f + Mathf.Repeat(Mathf.Sin((float)i * 17.371f) * 3487.42f, 1f) * 0.92f; float num5 = Mathf.Lerp(num * 0.08f, num, Mathf.Sqrt(num4)); float num6 = Mathf.Repeat(Mathf.Sin((float)i * 29.717f) * 9281.63f, 1f); float num7 = Mathf.Lerp(0.9f, closed ? 8.2f : 7.2f, num6); float num8 = Mathf.Lerp(closed ? 3.2f : 4.5f, closed ? 8.4f : 12.5f, Mathf.Repeat(Mathf.Sin((float)i * 53.89f) * 3711.3f, 1f)); ((Vector3)(ref val))..ctor(Mathf.Cos(num3) * num5, num7, Mathf.Sin(num3) * num5); ((Vector2)(ref val2))..ctor(num8 * 1.35f, num8 * 0.3f); GameObject val3 = CreateTexturedQuad("Malevolent Shrine Animated Textured Slash", val, val2, texture, Color.white, transform, 0.72f); Renderer component = val3.GetComponent(); ApplySlashVfxMaterial(component, texture, Color.white); component.sortingOrder = 32000; component.enabled = false; malevolentShrineSlashSprites.Add(new AnimatedSlashSprite { Transform = val3.transform, Renderer = component, Anchor = val, Drift = new Vector3(Mathf.Cos(num3 + 1.57f), 0.08f + (float)(i % 3) * 0.05f, Mathf.Sin(num3 + 1.57f)) * Mathf.Lerp(1.5f, 4.5f, num4), BaseScale = new Vector3(val2.x, val2.y, 1f), Tint = (Color)((i % 5 == 0) ? new Color(1f, 0.7f, 0.62f, 1f) : Color.white), Phase = Mathf.Repeat((float)i * 0.173f, 1f), Speed = Mathf.Lerp(0.34f, 0.72f, Mathf.Repeat(Mathf.Sin((float)i * 19.19f) * 713.4f, 1f)), Roll = -78f + Mathf.Repeat(Mathf.Sin((float)i * 41.133f) * 7812.19f, 1f) * 156f, CameraAttached = false }); Vector3 val4 = new Vector3(Mathf.Cos(num3 + 0.72f), (float)(i % 5 - 2) * 0.08f, Mathf.Sin(num3 + 0.72f)); Vector3 normalized = ((Vector3)(ref val4)).normalized; float num9 = num8 * 0.72f; Color color = ((i % 4 == 0) ? new Color(0.92f, 0.025f, 0.008f, 1f) : new Color(0.002f, 0f, 0f, 1f)); float num10 = 0.13f + (float)(i % 4) * 0.045f; LineRenderer component2 = CreateLine("Malevolent Shrine Reliable Animated Slash", val - normalized * num9, val + normalized * num9, color, transform, num10).GetComponent(); ((Renderer)component2).enabled = false; malevolentShrineSlashLines.Add(component2); malevolentShrineSlashPhases.Add(Mathf.Repeat((float)i * 0.137f, 1f)); malevolentShrineSlashSpeeds.Add(0.42f + (float)(i % 7) * 0.055f); malevolentShrineSlashWidths.Add(num10); } CreateMalevolentShrineNearCameraSlashes(); Log.LogInfo((object)("Malevolent Shrine slash VFX built: " + malevolentShrineSlashSprites.Count + " visible slash layers.")); } private void CreateOpenDomainBoundaryLines(Transform parent) { //IL_0063: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010f: 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) float num = 55f; Color val = default(Color); ((Color)(ref val))..ctor(1f, 0.035f, 0.012f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(1f, 0.28f, 0.035f, 1f); Color color = default(Color); ((Color)(ref color))..ctor(0.32f, 0.002f, 0f, 1f); CreateLineRing("Open Domain Exact Damage Edge", num, 0.18f, val, parent, 0.34f); CreateLineRing("Open Domain Outer Warning Edge", num + 0.65f, 0.22f, val2, parent, 0.16f); CreateLineRing("Open Domain Inner Warning Edge", num - 0.65f, 0.16f, color, parent, 0.2f); Vector3 val3 = default(Vector3); for (int i = 0; i < 32; i++) { float num2 = (float)i * MathF.PI * 2f / 32f; ((Vector3)(ref val3))..ctor(Mathf.Cos(num2) * num, 0.16f, Mathf.Sin(num2) * num); CreateLine("Open Domain Edge Marker", val3, val3 + Vector3.up * 1.45f, (i % 2 == 0) ? val : val2, parent, 0.09f); } } private void CreateClosedDomainCenterPoint(DomainStyle style) { //IL_000f: 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_0025: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0070: 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_007f: 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) Transform transform = domainRoot.transform; Color color = default(Color); ((Color)(ref color))..ctor(style.AccentColor.r, style.AccentColor.g, style.AccentColor.b, 1f); CreateCylinder("Closed Domain Center Point", Vector3.up * 0.24f, new Vector3(0.42f, 0.035f, 0.42f), color, transform); CreateSphere("Closed Domain Center Glow", Vector3.up * 0.31f, Vector3.one * 0.18f, color, transform); } private void CreateSelfEmbodimentMotifs(DomainStyle style) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: 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_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_0182: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; float closedBarrierRadius = GetClosedBarrierRadius(DomainKind.SelfEmbodimentOfPerfection); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, 5.6f, closedBarrierRadius * 0.34f); GameObject val2 = new GameObject("Self-Embodiment 3D Hand Shrine"); val2.transform.SetParent(transform, false); val2.transform.localPosition = val; Color val3 = default(Color); ((Color)(ref val3))..ctor(0.32f, 0.24f, 0.34f, 1f); Color baseColor = default(Color); ((Color)(ref baseColor))..ctor(0.52f, 0.34f, 0.56f, 1f); selfEmbodimentHandMaterial = CreateSelfEmbodimentSculptureMaterial(val3, new Color(0.028f, 0.006f, 0.04f, 1f)); selfEmbodimentHandAccentMaterial = CreateSelfEmbodimentSculptureMaterial(baseColor, new Color(0.08f, 0.018f, 0.11f, 1f)); CreateSelfEmbodimentCrystal(val2.transform); for (int i = 0; i < 18; i++) { float num = (float)i * MathF.PI * 2f / 18f; Vector3 val4 = new Vector3(Mathf.Cos(num), 0f, Mathf.Sin(num)) * (6.3f + (float)(i % 3) * 0.22f) + Vector3.up * (((float)(i % 6) - 2.5f) * 0.24f); Vector3 val5 = -val4 + Vector3.up * ((float)(i % 3) - 1f) * 0.06f; Vector3 normalized = ((Vector3)(ref val5)).normalized; Quaternion localRotation = Quaternion.FromToRotation(Vector3.up, normalized) * Quaternion.Euler(0f, 0f, (i % 2 == 0) ? (-11f) : 11f); float num2 = 0.94f + (float)(i % 3) * 0.06f; CreateSculptedSoulHand("Self-Embodiment Shrine Hand", val4, localRotation, num2, val2.transform, selfEmbodimentHandMaterial, selfEmbodimentHandAccentMaterial); Vector3 start = val4 - normalized * (1.9f * num2); Vector3 end = new Vector3(Mathf.Cos(num) * closedBarrierRadius * 0.86f, 3.2f + (float)(i % 5) * 1.45f, Mathf.Sin(num) * closedBarrierRadius * 0.86f) - val; CreateSoulCapsuleBetween("Self-Embodiment Radial Forearm", start, end, 0.42f + (float)(i % 3) * 0.07f, val3, val2.transform, selfEmbodimentHandMaterial); } GameObject val6 = new GameObject("Self-Embodiment Shrine Violet Light"); val6.transform.SetParent(val2.transform, false); Light obj = val6.AddComponent(); obj.type = (LightType)2; obj.color = new Color(0.58f, 0.12f, 0.78f, 1f); obj.intensity = 7.5f; obj.range = 24f; } private void CreateSelfEmbodimentCrystal(Transform parent) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown //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_0040: 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_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0202: 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_021c: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0252: 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_0256: 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_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: 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_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject("Self-Embodiment Floating Pink Crystal"); val.transform.SetParent(parent, false); selfEmbodimentCrystalRoot = val.transform; GameObject val2 = new GameObject("Self-Embodiment Faceted Pink Crystal Mesh"); val2.transform.SetParent(val.transform, false); MeshFilter val3 = val2.AddComponent(); MeshRenderer obj = val2.AddComponent(); val3.mesh = CreateFacetedCrystalMesh(); selfEmbodimentCrystalMaterial = CreateSelfEmbodimentSculptureMaterial(new Color(1f, 0.08f, 0.58f, 1f), new Color(1.8f, 0.06f, 0.82f, 1f)); if (selfEmbodimentCrystalMaterial.HasProperty("_Smoothness")) { selfEmbodimentCrystalMaterial.SetFloat("_Smoothness", 0.82f); } if (selfEmbodimentCrystalMaterial.HasProperty("_Metallic")) { selfEmbodimentCrystalMaterial.SetFloat("_Metallic", 0.12f); } ((Renderer)obj).sharedMaterial = selfEmbodimentCrystalMaterial; Color color = default(Color); ((Color)(ref color))..ctor(1f, 0.32f, 0.78f, 1f); Vector3 start = Vector3.up * 3f; Vector3 end = Vector3.down * 3f; Vector3 val4 = default(Vector3); Vector3 val5 = default(Vector3); Vector3 end2 = default(Vector3); Vector3 end3 = default(Vector3); for (int i = 0; i < 6; i++) { float num = (float)i * MathF.PI * 2f / 6f; float num2 = (float)(i + 1) * MathF.PI * 2f / 6f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num) * 1.45f, 1.65f, Mathf.Sin(num) * 1.45f); ((Vector3)(ref val5))..ctor(Mathf.Cos(num) * 1.45f, -1.65f, Mathf.Sin(num) * 1.45f); ((Vector3)(ref end2))..ctor(Mathf.Cos(num2) * 1.45f, 1.65f, Mathf.Sin(num2) * 1.45f); ((Vector3)(ref end3))..ctor(Mathf.Cos(num2) * 1.45f, -1.65f, Mathf.Sin(num2) * 1.45f); CreateLine("Self-Embodiment Crystal Upper Facet", start, val4, color, val.transform, 0.075f); CreateLine("Self-Embodiment Crystal Upper Ring", val4, end2, color, val.transform, 0.075f); CreateLine("Self-Embodiment Crystal Body Edge", val4, val5, color, val.transform, 0.075f); CreateLine("Self-Embodiment Crystal Lower Ring", val5, end3, color, val.transform, 0.075f); CreateLine("Self-Embodiment Crystal Lower Facet", val5, end, color, val.transform, 0.075f); } CreateParticleEffect("Self-Embodiment Crystal Pink Glow", val.transform, Vector3.zero, Quaternion.identity, new Color(1f, 0.05f, 0.55f, 0.75f), new Color(0.72f, 0.08f, 1f, 0.25f), new Vector2(0.8f, 1.8f), new Vector2(0.08f, 0.24f), new Vector2(0.05f, 0.22f), 96, 18f, (ParticleSystemShapeType)0, 2.6f, additive: true, stretched: false); GameObject val6 = new GameObject("Self-Embodiment Crystal Pink Light"); val6.transform.SetParent(val.transform, false); Light obj2 = val6.AddComponent(); obj2.type = (LightType)2; obj2.color = new Color(1f, 0.08f, 0.58f, 1f); obj2.intensity = 11f; obj2.range = 15f; } private static Mesh CreateFacetedCrystalMesh() { //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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_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_008b: 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_0147: 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_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Expected O, but got Unknown Vector3[] array = (Vector3[])(object)new Vector3[14] { Vector3.up * 3f, Vector3.down * 3f, default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3), default(Vector3) }; for (int i = 0; i < 6; i++) { float num = (float)i * MathF.PI * 2f / 6f; float num2 = Mathf.Cos(num) * 1.45f; float num3 = Mathf.Sin(num) * 1.45f; array[2 + i] = new Vector3(num2, 1.65f, num3); array[8 + i] = new Vector3(num2, -1.65f, num3); } int[] array2 = new int[72]; int num4 = 0; for (int j = 0; j < 6; j++) { int num5 = (j + 1) % 6; int num6 = 2 + j; int num7 = 2 + num5; int num8 = 8 + j; int num9 = 8 + num5; array2[num4++] = 0; array2[num4++] = num7; array2[num4++] = num6; array2[num4++] = num6; array2[num4++] = num7; array2[num4++] = num9; array2[num4++] = num6; array2[num4++] = num9; array2[num4++] = num8; array2[num4++] = 1; array2[num4++] = num8; array2[num4++] = num9; } Mesh val = new Mesh { name = "Self-Embodiment Double-Point Crystal", vertices = array, triangles = array2 }; val.RecalculateNormals(); val.RecalculateBounds(); return val; } private void UpdateSelfEmbodimentAnimatedVisuals() { //IL_0032: 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_0066: 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_009a: Unknown result type (might be due to invalid IL or missing references) if (selectedDomain == DomainKind.SelfEmbodimentOfPerfection && !((Object)(object)selfEmbodimentCrystalRoot == (Object)null)) { float unscaledDeltaTime = Time.unscaledDeltaTime; selfEmbodimentVisualTime += unscaledDeltaTime; selfEmbodimentCrystalRoot.Rotate(Vector3.up, 22f * unscaledDeltaTime, (Space)1); selfEmbodimentCrystalRoot.localPosition = Vector3.up * (Mathf.Sin(selfEmbodimentVisualTime * 1.45f) * 0.22f); float num = 1f + Mathf.Sin(selfEmbodimentVisualTime * 2.8f) * 0.035f; selfEmbodimentCrystalRoot.localScale = Vector3.one * num; } } private void CreateSoulHand(string name, Vector3 localPosition, Quaternion localRotation, float scale, Transform parent) { //IL_0002: 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) CreateSculptedSoulHand(name, localPosition, localRotation, scale, parent, null, null); } private void CreateSculptedSoulHand(string name, Vector3 localPosition, Quaternion localRotation, float scale, Transform parent, Material? palmMaterial, Material? accentMaterial) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001b: 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_0033: 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_0087: 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_00a0: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: 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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: 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_01d6: 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_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); val.transform.localPosition = localPosition; val.transform.localRotation = localRotation; val.transform.localScale = Vector3.one * scale; Color fallbackColor = default(Color); ((Color)(ref fallbackColor))..ctor(0.32f, 0.24f, 0.34f, 1f); Color fallbackColor2 = default(Color); ((Color)(ref fallbackColor2))..ctor(0.52f, 0.34f, 0.56f, 1f); CreateSoulPrimitive(name + " Palm", (PrimitiveType)0, Vector3.zero, new Vector3(1.65f, 1.95f, 0.48f), fallbackColor, val.transform, palmMaterial); CreateSoulPrimitive(name + " Wrist", (PrimitiveType)1, new Vector3(0f, -1.75f, 0f), new Vector3(0.72f, 1.35f, 0.72f), fallbackColor, val.transform, palmMaterial); float[] array = new float[5] { 1.45f, 1.82f, 2.05f, 1.82f, 1.48f }; for (int i = 0; i < 5; i++) { float num = -0.66f + (float)i * 0.33f; float num2 = array[i]; float num3 = num2 * 0.58f; float num4 = num2 - num3; float num5 = (float)(i - 2) * -5.5f; CreateSoulPrimitive(name + " Knuckle", (PrimitiveType)0, new Vector3(num, 0.92f, 0f), Vector3.one * 0.34f, fallbackColor2, val.transform, accentMaterial); CreateSoulPrimitive(name + " Finger Lower", (PrimitiveType)1, new Vector3(num, 1.05f + num3 * 0.5f, 0f), new Vector3(0.24f, num3 * 0.5f, 0.24f), fallbackColor2, val.transform, accentMaterial).transform.localRotation = Quaternion.Euler(-5f, 0f, num5); CreateSoulPrimitive(name + " Finger Upper", (PrimitiveType)1, new Vector3(num - num5 * 0.008f, 1.08f + num3 + num4 * 0.46f, -0.08f), new Vector3(0.22f, num4 * 0.52f, 0.22f), fallbackColor2, val.transform, accentMaterial).transform.localRotation = Quaternion.Euler(18f + (float)(i % 2) * 7f, 0f, num5 * 1.15f); } CreateSoulPrimitive(name + " Thumb Base", (PrimitiveType)1, new Vector3(-1.02f, -0.05f, 0f), new Vector3(0.3f, 0.72f, 0.3f), fallbackColor2, val.transform, accentMaterial).transform.localRotation = Quaternion.Euler(0f, -12f, 58f); CreateSoulPrimitive(name + " Thumb Tip", (PrimitiveType)1, new Vector3(-1.5f, 0.42f, -0.06f), new Vector3(0.26f, 0.5f, 0.26f), fallbackColor2, val.transform, accentMaterial).transform.localRotation = Quaternion.Euler(12f, -18f, 46f); } private GameObject CreateSoulPrimitive(string name, PrimitiveType primitiveType, Vector3 localPosition, Vector3 localScale, Color fallbackColor, Transform parent, Material? material) { //IL_0000: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive(primitiveType); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale; Object.Destroy((Object)(object)obj.GetComponent()); Renderer component = obj.GetComponent(); if ((Object)(object)material != (Object)null) { component.sharedMaterial = material; return obj; } ApplyMaterial(component, fallbackColor); return obj; } private GameObject CreateSoulCapsuleBetween(string name, Vector3 start, Vector3 end, float thickness, Color fallbackColor, Transform parent, Material? material) { //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_0002: 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_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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_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_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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) Vector3 val = end - start; float magnitude = ((Vector3)(ref val)).magnitude; GameObject val2 = CreateSoulPrimitive(name, (PrimitiveType)1, (start + end) * 0.5f, new Vector3(thickness, Mathf.Max(0.2f, magnitude * 0.5f), thickness), fallbackColor, parent, material); if (magnitude > 0.001f) { val2.transform.localRotation = Quaternion.FromToRotation(Vector3.up, val / magnitude); } return val2; } private static Material CreateSelfEmbodimentSculptureMaterial(Color baseColor, Color emissionColor) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_004d: 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_00b9: 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_011a: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Shader.Find("HDRP/Lit") ?? Shader.Find("Standard") ?? Shader.Find("Diffuse") ?? Shader.Find("Unlit/Color")); if (val.HasProperty("_Color")) { val.SetColor("_Color", baseColor); } if (val.HasProperty("_BaseColor")) { val.SetColor("_BaseColor", baseColor); } if (val.HasProperty("_Smoothness")) { val.SetFloat("_Smoothness", 0.28f); } if (val.HasProperty("_Metallic")) { val.SetFloat("_Metallic", 0f); } if (val.HasProperty("_EmissiveColor")) { val.SetColor("_EmissiveColor", emissionColor); } if (val.HasProperty("_EmissionColor")) { val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", emissionColor); } if (val.HasProperty("_DoubleSidedEnable")) { val.SetFloat("_DoubleSidedEnable", 1f); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 0); } val.color = baseColor; return val; } private void CreateMalevolentShrineNearCameraSlashes() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) Camera val = Camera.main; if ((Object)(object)val == (Object)null) { PlayerControllerB val2 = StartOfRound.Instance?.localPlayerController; val = (((Object)(object)val2 != (Object)null) ? val2.gameplayCamera : null); } if (!((Object)(object)val == (Object)null)) { shrineCameraVfxRoot = new GameObject("Malevolent Shrine Near Camera Slash VFX"); shrineCameraVfxRoot.transform.SetParent(((Component)val).transform, false); Texture2D texture = malevolentShrineSlashCoreTexture ?? malevolentShrineSlashTexture; Vector3 val3 = default(Vector3); Vector2 val4 = default(Vector2); for (int i = 0; i < 12; i++) { float num = -2.6f + Mathf.Repeat(Mathf.Sin((float)i * 17.11f) * 819.3f, 1f) * 5.2f; float num2 = -1.35f + Mathf.Repeat(Mathf.Sin((float)i * 31.73f) * 417.8f, 1f) * 2.7f; float num3 = 3.1f + (float)(i % 4) * 0.45f; float num4 = 1.5f + (float)(i % 5) * 0.42f; ((Vector3)(ref val3))..ctor(num, num2, num3); ((Vector2)(ref val4))..ctor(num4 * 1.7f, num4 * 0.38f); GameObject val5 = CreateTexturedQuad("Malevolent Shrine Foreground Slash", val3, val4, texture, Color.white, shrineCameraVfxRoot.transform, 0.9f); Renderer component = val5.GetComponent(); ApplySlashVfxMaterial(component, texture, Color.white); component.sortingOrder = 32700; component.enabled = false; malevolentShrineSlashSprites.Add(new AnimatedSlashSprite { Transform = val5.transform, Renderer = component, Anchor = val3, Drift = new Vector3((i % 2 == 0) ? 0.7f : (-0.7f), 0.12f, 0f), BaseScale = new Vector3(val4.x, val4.y, 1f), Tint = (Color)((i % 4 == 0) ? new Color(1f, 0.52f, 0.42f, 1f) : Color.white), Phase = Mathf.Repeat((float)i * 0.247f, 1f), Speed = 0.46f + (float)(i % 4) * 0.06f, Roll = -72f + (float)(i % 7) * 24f, CameraAttached = true }); } } } private void CreateMalevolentShrineAtmosphere(bool closed) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0073: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; float num = (closed ? 18.72f : 47.3f); CreateParticleEffect("Malevolent Shrine Floating Embers", transform, Vector3.up * 0.5f, Quaternion.identity, new Color(0.42f, 0f, 0f, 0.9f), new Color(1f, 0.2f, 0.02f, 1f), new Vector2(2.2f, 5.5f), new Vector2(0.035f, 0.13f), new Vector2(0.25f, 1.15f), closed ? 420 : 650, closed ? 34f : 52f, (ParticleSystemShapeType)0, num, additive: true, stretched: false); MainModule main = CreateParticleEffect("Malevolent Shrine Blood Mist", transform, Vector3.up * 0.45f, Quaternion.identity, new Color(0.09f, 0f, 0f, 0.22f), new Color(0.45f, 0.01f, 0f, 0.3f), new Vector2(3.5f, 7f), new Vector2(0.7f, 2.1f), new Vector2(0.05f, 0.28f), closed ? 180 : 260, closed ? 12f : 18f, (ParticleSystemShapeType)0, num * 0.9f, additive: false, stretched: false).main; ((MainModule)(ref main)).startRotation = new MinMaxCurve(0f, MathF.PI * 2f); } private void CreateOpenMalevolentShrineVfx(DomainStyle style) { //IL_0071: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0108: 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_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: 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_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: 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_0209: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_03d2: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0406: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04bc: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color val = default(Color); ((Color)(ref val))..ctor(1f, 0.03f, 0.01f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(1f, 0.34f, 0.08f, 1f); Color color = default(Color); ((Color)(ref color))..ctor(0.12f, 0f, 0f, 1f); float num = 50.600002f; CreateLineRing("Open Shrine Outer Kill Range", num, 0.18f, val2, transform, 0.28f); CreateLineRing("Open Shrine Cleave Halo Low", num * 0.72f, 0.55f, val, transform, 0.18f); CreateLineRing("Open Shrine Cleave Halo Mid", num * 0.52f, 2.3f, val2, transform, 0.14f); CreateLineRing("Open Shrine Cleave Halo High", num * 0.35f, 4.8f, val, transform, 0.12f); CreateCylinder("Open Shrine Blood-Stained Ground", Vector3.up * 0.035f, new Vector3(num * 1.85f, 0.022f, num * 1.85f), new Color(0.18f, 0f, 0f, 0.82f), transform); Vector3 val3 = default(Vector3); for (int i = 0; i < 64; i++) { float num2 = (float)i * 2.399963f; float num3 = 5.5f + (float)(i % 12) * (num - 5.5f) / 12f; float num4 = 0.75f + (float)(i % 7) * 0.38f; ((Vector3)(ref val3))..ctor(Mathf.Cos(num2) * num3, num4, Mathf.Sin(num2) * num3); Vector3 val4 = new Vector3(Mathf.Cos(num2 + 1.35f), 0.12f + (float)(i % 3) * 0.07f, Mathf.Sin(num2 + 1.35f)); Vector3 normalized = ((Vector3)(ref val4)).normalized; float num5 = 7f + (float)(i % 6) * 2.2f; Color color2 = ((i % 3 == 0) ? val2 : val); CreateLine("Open Shrine Dismantle Slash", val3 - normalized * num5 * 0.5f, val3 + normalized * num5 * 0.5f, color2, transform, 0.07f + (float)(i % 4) * 0.025f); } Vector3 val5 = default(Vector3); Vector3 val6 = default(Vector3); for (int j = 0; j < 30; j++) { float num6 = (float)j * MathF.PI * 2f / 30f; float num7 = num * (0.18f + (float)(j % 10) * 0.075f); ((Vector3)(ref val5))..ctor(Mathf.Cos(num6), 0f, Mathf.Sin(num6)); ((Vector3)(ref val6))..ctor(0f - val5.z, 0f, val5.x); Vector3 val7 = val5 * num7 + Vector3.up * 0.12f; CreateLine("Open Shrine Ground Cleave Scar", val7 - val6 * 7.5f, val7 + val6 * 7.5f, color, transform, 0.18f); CreateLine("Open Shrine Hot Cleave Scar", val7 - val6 * 4.2f + Vector3.up * 0.04f, val7 + val6 * 4.2f + Vector3.up * 0.04f, val2, transform, 0.07f); } Vector3 val8 = default(Vector3); for (int k = 0; k < 24; k++) { float num8 = (float)k * MathF.PI * 2f / 24f; float num9 = num * (0.38f + (float)(k % 4) * 0.13f); ((Vector3)(ref val8))..ctor(Mathf.Cos(num8) * num9, 0.35f, Mathf.Sin(num8) * num9); Vector3 start = val8 + Vector3.up * (5.2f + (float)(k % 5) * 0.55f); CreateLine("Open Shrine Falling Cleave", start, val8, (k % 2 == 0) ? val : val2, transform, 0.1f); } Vector3 start2 = default(Vector3); Vector3 end = default(Vector3); for (int l = 0; l < 10; l++) { float num10 = (float)l * MathF.PI * 2f / 10f; ((Vector3)(ref start2))..ctor(Mathf.Cos(num10) * (0f - num) * 0.78f, 1.7f + (float)l * 0.12f, Mathf.Sin(num10) * (0f - num) * 0.78f); ((Vector3)(ref end))..ctor(Mathf.Cos(num10) * num * 0.78f, 1.7f + (float)l * 0.12f, Mathf.Sin(num10) * num * 0.78f); CreateLine("Open Shrine Wide Cleave Arc", start2, end, val2, transform, 0.16f); } } private void CreateNormalMalevolentShrineVideoVfx(DomainStyle style) { //IL_00a0: 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_00c4: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0136: 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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0233: 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_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04c2: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Unknown result type (might be due to invalid IL or missing references) //IL_0525: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Unknown result type (might be due to invalid IL or missing references) //IL_0551: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color val = default(Color); ((Color)(ref val))..ctor(0.72f, 0f, 0f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(1f, 0.04f, 0.02f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(1f, 0.28f, 0.05f, 1f); Color black = default(Color); ((Color)(ref black))..ctor(0.015f, 0f, 0f, 1f); Color bone = default(Color); ((Color)(ref bone))..ctor(0.92f, 0.78f, 0.58f, 1f); float num = 20.124f; CreateCylinder("Normal Shrine Blood Floor", Vector3.up * 0.055f, new Vector3(num * 2f, 0.024f, num * 2f), new Color(0.18f, 0f, 0f, 0.94f), transform); CreateLineRing("Normal Shrine Closed Blood Ring", num, 0.28f, val, transform, 0.3f); CreateLineRing("Normal Shrine Inner Cleave Ring", num * 0.72f, 1.15f, val2, transform, 0.2f); CreateLineRing("Normal Shrine Teeth Crown Ring", num * 0.52f, 3.4f, val3, transform, 0.16f); CreateLineRing("Normal Shrine High Barrier Ring", num * 0.92f, 6.6f, val2, transform, 0.18f); CreateLineCage("Normal Shrine Red Prison Lines", num, 40, 6.8f, val2, transform, 0.12f); Vector3 val4 = default(Vector3); for (int i = 0; i < 44; i++) { float num2 = (float)i * MathF.PI * 2f / 44f; float num3 = 3.2f + (float)(i % 11) * (num - 3.2f) / 11f; float num4 = 0.85f + (float)(i % 6) * 0.42f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num2) * num3, num4, Mathf.Sin(num2) * num3); Vector3 val5 = new Vector3(0f - Mathf.Sin(num2), 0.18f + (float)(i % 2) * 0.08f, Mathf.Cos(num2)); Vector3 normalized = ((Vector3)(ref val5)).normalized; float num5 = 5.2f + (float)(i % 5) * 1.35f; CreateLine("Normal Shrine Cleave Slash", val4 - normalized * num5, val4 + normalized * num5, (i % 3 == 0) ? val3 : val2, transform, 0.08f + (float)(i % 3) * 0.025f); } Vector3 start = default(Vector3); Vector3 end = default(Vector3); for (int j = 0; j < 18; j++) { float num6 = (float)j * MathF.PI * 2f / 18f; ((Vector3)(ref start))..ctor(Mathf.Cos(num6) * (0f - num) * 0.76f, 1.25f + (float)(j % 4) * 0.22f, Mathf.Sin(num6) * (0f - num) * 0.76f); ((Vector3)(ref end))..ctor(Mathf.Cos(num6) * num * 0.76f, 1.4f + (float)(j % 5) * 0.22f, Mathf.Sin(num6) * num * 0.76f); CreateLine("Normal Shrine Crossing Dismantle", start, end, val2, transform, 0.12f); } Vector3 val6 = default(Vector3); for (int k = 0; k < 12; k++) { float num7 = (float)k * MathF.PI * 2f / 12f; ((Vector3)(ref val6))..ctor(Mathf.Cos(num7) * num * 0.74f, 0.25f, Mathf.Sin(num7) * num * 0.74f); Vector3 start2 = val6 + Vector3.up * (4.4f + (float)(k % 4) * 0.55f); CreateLine("Normal Shrine Falling Blood Slash", start2, val6, (k % 2 == 0) ? val : val3, transform, 0.14f); } Vector3 localPosition = default(Vector3); for (int l = 0; l < 8; l++) { float num8 = (float)l * MathF.PI * 2f / 8f; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num8) * num * 0.62f, 0.95f, Mathf.Sin(num8) * num * 0.62f); CreateShrineSkullTotem("Normal Shrine Skull Totem", localPosition, num8, bone, black, val2, transform); } Vector3 val7 = default(Vector3); Vector3 val8 = default(Vector3); for (int m = 0; m < 10; m++) { float num9 = (float)m * MathF.PI * 2f / 10f; ((Vector3)(ref val7))..ctor(Mathf.Cos(num9), 0f, Mathf.Sin(num9)); ((Vector3)(ref val8))..ctor(0f - val7.z, 0f, val7.x); Vector3 val9 = val7 * (num * (0.2f + (float)m * 0.055f)) + Vector3.up * 0.13f; CreateLine("Normal Shrine Ground Blood Scar", val9 - val8 * 5.8f, val9 + val8 * 5.8f, val, transform, 0.18f); CreateLine("Normal Shrine Ground Hot Scar", val9 - val8 * 3.4f + Vector3.up * 0.045f, val9 + val8 * 3.4f + Vector3.up * 0.045f, val3, transform, 0.075f); } CreateFloatingText("Normal Shrine Domain Warning", "MALEVOLENT\nSHRINE", new Vector3(0f, 6.4f, -5.5f), 0.16f, val2, transform); } private void CreateShrineSkullTotem(string name, Vector3 localPosition, float angle, Color bone, Color black, Color glow, Transform parent) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001b: 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_0055: 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_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0092: 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_00b0: 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_00de: 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_00f7: 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_0134: 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_0162: 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_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: 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_0213: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); val.transform.localPosition = localPosition; val.transform.localRotation = Quaternion.Euler(0f, (0f - angle) * 57.29578f + 180f, 0f); CreateCube(name + " Pillar", Vector3.up * 0.35f, new Vector3(0.42f, 0.7f, 0.42f), black, val.transform); CreateSphere(name + " Skull", Vector3.up * 1.15f, new Vector3(0.86f, 0.72f, 0.68f), bone, val.transform); CreateCube(name + " Jaw", new Vector3(0f, 0.78f, -0.08f), new Vector3(0.66f, 0.22f, 0.42f), bone, val.transform); CreateCube(name + " Left Eye", new Vector3(-0.2f, 1.18f, -0.36f), new Vector3(0.16f, 0.12f, 0.08f), black, val.transform); CreateCube(name + " Right Eye", new Vector3(0.2f, 1.18f, -0.36f), new Vector3(0.16f, 0.12f, 0.08f), black, val.transform); CreateLine(name + " Eye Glow", new Vector3(-0.33f, 1.2f, -0.43f), new Vector3(0.33f, 1.2f, -0.43f), glow, val.transform, 0.035f); for (int i = 0; i < 5; i++) { float num = -0.28f + (float)i * 0.14f; CreateCone(name + " Tooth", new Vector3(num, 0.66f, -0.28f), new Vector3(0.09f, 0.24f, 0.09f), bone, val.transform); } } private void CreateGambleMotifs(DomainStyle style) { CreateCinematicIdleDeathGambleDomain(style); } private void CreateCinematicIdleDeathGambleDomain(DomainStyle style) { //IL_0084: 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_00a6: 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_00d1: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_018f: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_034b: 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_0249: 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_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Expected O, but got Unknown //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_0596: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05c3: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; float num = 21.528f; Color val = default(Color); ((Color)(ref val))..ctor(0.98f, 1f, 1f, 1f); Color color = default(Color); ((Color)(ref color))..ctor(0.012f, 0.014f, 0.016f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.12f, 1f, 0.44f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(1f, 0.12f, 0.72f, 1f); CreateCylinder("Idle Death Gamble Luminous Station Floor", Vector3.up * 0.1f, new Vector3(num * 2.08f, 0.035f, num * 2.08f), new Color(0.72f, 0.77f, 0.8f, 1f), transform); CreateCylinder("Idle Death Gamble White Platform", Vector3.up * 0.2f, new Vector3(num * 0.76f, 0.025f, num * 0.76f), val, transform); int num2 = 12; for (int i = 0; i < num2; i++) { float num3 = (float)i * MathF.PI * 2f / (float)num2; GameObject val4 = new GameObject("Idle Death Gamble Station Door Frame"); val4.transform.SetParent(transform, false); val4.transform.localPosition = new Vector3(Mathf.Cos(num3) * num * 0.82f, 0.25f, Mathf.Sin(num3) * num * 0.82f); val4.transform.localRotation = Quaternion.Euler(0f, (0f - num3) * 57.29578f + 90f, 0f); CreateCube("Station Door Left", new Vector3(-1.45f, 2.05f, 0f), new Vector3(0.16f, 4.1f, 0.18f), val, val4.transform); CreateCube("Station Door Right", new Vector3(1.45f, 2.05f, 0f), new Vector3(0.16f, 4.1f, 0.18f), val, val4.transform); CreateCube("Station Door Header", new Vector3(0f, 4.05f, 0f), new Vector3(3.05f, 0.18f, 0.18f), (i % 2 == 0) ? val2 : val3, val4.transform); CreateCube("Station Door Glass", new Vector3(0f, 2.05f, 0.08f), new Vector3(2.55f, 3.55f, 0.08f), new Color(0.015f, 0.14f, 0.11f, 0.86f), val4.transform); } GameObject val5 = new GameObject("Idle Death Gamble Central Pachinko Reels"); val5.transform.SetParent(transform, false); val5.transform.localPosition = new Vector3(0f, 2.8f, 7.2f); CreateCube("Idle Death Gamble Reel Cabinet", Vector3.zero, new Vector3(7.4f, 4.4f, 0.5f), color, val5.transform); CreateCube("Idle Death Gamble Reel Header", new Vector3(0f, 2.35f, -0.08f), new Vector3(7.8f, 0.28f, 0.62f), val2, val5.transform); for (int j = 0; j < 3; j++) { GameObject val6 = new GameObject("Idle Death Gamble Animated Reel"); val6.transform.SetParent(val5.transform, false); val6.transform.localPosition = new Vector3(-2.2f + (float)j * 2.2f, 0f, -0.36f); CreateCylinder("Idle Death Gamble Reel Wheel", Vector3.zero, new Vector3(0.82f, 0.72f, 0.82f), (Color)(j switch { 0 => val2, 1 => val, _ => val3, }), val6.transform).transform.localRotation = Quaternion.Euler(0f, 0f, 90f); CreateFloatingText("Idle Death Gamble Reel Number", j switch { 1 => "1", 0 => "1", _ => "1", }, new Vector3(0f, 0f, -0.96f), 0.26f, color, val6.transform); idleDeathGambleRotators.Add(val6.transform); idleDeathGambleRotationSpeeds.Add(150f + (float)j * 45f); idleDeathGambleRotationAxes.Add(Vector3.right); } int num4 = 30; Vector3 localPosition = default(Vector3); for (int k = 0; k < num4; k++) { float num5 = (float)k * MathF.PI * 2f / (float)num4; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num5) * num * 0.55f, 0.42f, Mathf.Sin(num5) * num * 0.55f); GameObject val7 = CreateCube("Idle Death Gamble Chasing Platform Light", localPosition, new Vector3(0.42f, 0.08f, 1.15f), (k % 3 == 0) ? val : ((k % 3 == 1) ? val2 : val3), transform); val7.transform.localRotation = Quaternion.Euler(0f, (0f - num5) * 57.29578f, 0f); idleDeathGambleChaseLights.Add(val7.GetComponent()); idleDeathGambleChaseScales.Add(val7.transform.localScale); } CreateParticleEffect("Idle Death Gamble White Ticket Storm", transform, Vector3.up * 1.8f, Quaternion.identity, Color.white, new Color(0.7f, 1f, 0.86f, 1f), new Vector2(1.8f, 4.2f), new Vector2(0.08f, 0.24f), new Vector2(0.25f, 1.1f), 420, 32f, (ParticleSystemShapeType)0, num * 0.72f, additive: true, stretched: false); CreateParticleEffect("Idle Death Gamble Probability Sparks", transform, Vector3.up * 0.8f, Quaternion.identity, val2, val3, new Vector2(0.7f, 1.8f), new Vector2(0.035f, 0.11f), new Vector2(1.2f, 3.8f), 260, 24f, (ParticleSystemShapeType)0, num * 0.5f, additive: true, stretched: true); } private void CreateIdleDeathGambleWorldspaceDomain(DomainStyle style) { //IL_00ba: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0134: 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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: 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_0237: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_033f: 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_0369: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; float num = 24.102f; Color val = default(Color); ((Color)(ref val))..ctor(1f, 1f, 1f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(1f, 0.82f, 0.12f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(0.12f, 1f, 0.36f, 1f); Color val4 = default(Color); ((Color)(ref val4))..ctor(1f, 0.14f, 0.72f, 1f); Color val5 = default(Color); ((Color)(ref val5))..ctor(0.1f, 0.95f, 1f, 1f); Color color = default(Color); ((Color)(ref color))..ctor(0.012f, 0.012f, 0.006f, 1f); CreateCylinder("Idle Death Gamble Raised Casino Floor", Vector3.up * 0.18f, new Vector3(num * 2.05f, 0.05f, num * 2.05f), color, transform); CreateLineRing("Idle Death Gamble White Barrier Seal", num, 0.5f, val, transform, 0.36f); CreateLineRing("Idle Death Gamble Jackpot Gold Seal", num * 0.82f, 0.58f, val2, transform, 0.24f); CreateLineRing("Idle Death Gamble Probability Green Seal", num * 0.62f, 0.66f, val3, transform, 0.18f); CreateLineRing("Idle Death Gamble Richii Pink Seal", num * 0.42f, 0.74f, val4, transform, 0.16f); CreateLineRing("Idle Death Gamble Slot Core Seal", num * 0.22f, 0.82f, val5, transform, 0.2f); int num2 = 36; Vector3 val6 = default(Vector3); for (int i = 0; i < num2; i++) { float num3 = (float)i * MathF.PI * 2f / (float)num2; ((Vector3)(ref val6))..ctor(Mathf.Cos(num3), 0f, Mathf.Sin(num3)); Color color2 = ((i % 4 == 0) ? val : ((i % 4 == 1) ? val2 : ((i % 4 == 2) ? val3 : val4))); float num4 = num * ((i % 3 == 0) ? 0.18f : 0.36f); float num5 = num * ((i % 2 == 0) ? 0.95f : 0.74f); CreateLine("Idle Death Gamble Floor Probability Spoke", val6 * num4 + Vector3.up * 0.9f, val6 * num5 + Vector3.up * 0.9f, color2, transform, (i % 3 == 0) ? 0.08f : 0.05f); } int num6 = 56; Vector3 localPosition = default(Vector3); for (int j = 0; j < num6; j++) { float num7 = (float)j * MathF.PI * 2f / (float)num6; float num8 = Mathf.Cos(num7) * num; float num9 = Mathf.Sin(num7) * num; Color color3 = ((j % 4 == 0) ? val : ((j % 4 == 1) ? val2 : ((j % 4 == 2) ? val3 : val5))); CreateLine("Idle Death Gamble White Barrier Rib", new Vector3(num8, 0.7f, num9), new Vector3(num8 * 0.7f, 8.8f, num9 * 0.7f), color3, transform, (j % 5 == 0) ? 0.095f : 0.055f); if (j % 7 == 0) { ((Vector3)(ref localPosition))..ctor(num8 * 0.94f, 3.2f, num9 * 0.94f); CreateCube("Idle Death Gamble Barrier Light Panel", localPosition, new Vector3(1.5f, 2.4f, 0.16f), new Color(1f, 1f, 1f, 1f), transform).transform.localRotation = Quaternion.Euler(0f, (0f - num7) * 57.29578f, 0f); } } CreateLineRing("Idle Death Gamble White Crown", num * 0.72f, 8.9f, val, transform, 0.18f); CreateLineRing("Idle Death Gamble Jackpot Crown", num * 0.48f, 6.4f, val2, transform, 0.15f); } private void CreateIdleDeathGambleJjsVfx(DomainStyle style) { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_0194: 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_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: 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) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0240: 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_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_0517: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04b2: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_05a4: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_05d5: Unknown result type (might be due to invalid IL or missing references) //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_066f: Unknown result type (might be due to invalid IL or missing references) //IL_0671: Unknown result type (might be due to invalid IL or missing references) //IL_0687: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06d9: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Unknown result type (might be due to invalid IL or missing references) //IL_06aa: Unknown result type (might be due to invalid IL or missing references) //IL_06ec: Unknown result type (might be due to invalid IL or missing references) //IL_06e9: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color val = default(Color); ((Color)(ref val))..ctor(1f, 0.82f, 0.12f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.14f, 1f, 0.36f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(1f, 0.18f, 0.82f, 1f); Color color = default(Color); ((Color)(ref color))..ctor(0.12f, 0.95f, 1f, 1f); new Color(1f, 0.08f, 0.05f, 1f); Color color2 = default(Color); ((Color)(ref color2))..ctor(0.035f, 0.035f, 0.02f, 1f); CreateCylinder("Idle Death Gamble Casino Floor", Vector3.up * 0.045f, new Vector3(32f, 0.028f, 32f), new Color(0.08f, 0.05f, 0.02f, 0.78f), transform); CreateLineRing("Idle Death Gamble Rainbow Ring Gold", 15.5f, 0.2f, val, transform, 0.24f); CreateLineRing("Idle Death Gamble Rainbow Ring Green", 13.2f, 0.52f, val2, transform, 0.18f); CreateLineRing("Idle Death Gamble Rainbow Ring Pink", 10.4f, 1.1f, val3, transform, 0.16f); CreateLineRing("Idle Death Gamble Rainbow Ring Cyan", 7.4f, 1.72f, color, transform, 0.14f); CreateCube("Idle Death Gamble Slot Cabinet", new Vector3(0f, 2.7f, 7.6f), new Vector3(8.8f, 4.4f, 0.52f), color2, transform); CreateCube("Idle Death Gamble Slot Glow", new Vector3(0f, 2.7f, 7.28f), new Vector3(8.2f, 3.7f, 0.16f), new Color(0.04f, 0.92f, 0.24f, 0.86f), transform); CreateLine("Idle Death Gamble Slot Top Edge", new Vector3(-4.4f, 5f, 7.02f), new Vector3(4.4f, 5f, 7.02f), val, transform, 0.16f); CreateLine("Idle Death Gamble Slot Bottom Edge", new Vector3(-4.4f, 0.55f, 7.02f), new Vector3(4.4f, 0.55f, 7.02f), val, transform, 0.16f); CreateFloatingText("Idle Death Gamble Title", "IDLE DEATH\nGAMBLE", new Vector3(0f, 5.25f, 6.95f), 0.18f, val, transform); string[] array = new string[7] { "111", "222", "333", "444", "555", "666", "777" }; for (int i = 0; i < array.Length; i++) { float num = -3.15f + (float)i * 1.05f; CreateCube("Idle Death Gamble Number Panel", new Vector3(num, 3.05f, 6.92f), new Vector3(0.86f, 0.8f, 0.1f), new Color(0.94f, 0.94f, 0.9f, 1f), transform); CreateFloatingText("Idle Death Gamble Number", array[i], new Vector3(num, 3.08f, 6.78f), 0.105f, Color.black, transform); } CreateFloatingText("Idle Death Gamble Mechanics", "SPIN - RICHII - JACKPOT", new Vector3(0f, 1.38f, 6.82f), 0.092f, color, transform); CreateFloatingText("Idle Death Gamble Jackpot Text A", "IN THE NEXT 1 MINUTE AND 40 SECONDS...", new Vector3(-7.6f, 3.75f, -4.9f), 0.085f, val, transform); CreateFloatingText("Idle Death Gamble Jackpot Text B", "THEY ARE EFFECTIVELY IMMORTAL.", new Vector3(7.6f, 3.2f, -4.9f), 0.095f, val2, transform); Vector3 val4 = default(Vector3); for (int j = 0; j < 18; j++) { float num2 = (float)j * MathF.PI * 2f / 18f; float num3 = 11.5f + (float)(j % 3) * 1.25f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num2) * num3, 2.3f + (float)(j % 4) * 0.38f, Mathf.Sin(num2) * num3); CreateFloatingText("Idle Death Gamble Floating Symbol", array[j % array.Length], val4, 0.075f, Color.black, transform); CreateLine("Idle Death Gamble Symbol Trail", val4 - Vector3.up * 0.7f, val4 + Vector3.up * 0.7f, (j % 2 == 0) ? val2 : val3, transform, 0.045f); } CreateRichiiStage("Transit Card Richii", "TRANSIT CARD\nRICHII", new Vector3(-9.6f, 1.9f, 2.2f), color, transform); CreateRichiiStage("Travel Emergency Richii", "TRAVEL EMERGENCY\nRICHII", new Vector3(9.6f, 1.9f, 2.2f), val3, transform); for (int k = 0; k < 12; k++) { float num4 = -5.5f + (float)k; CreateLine("Idle Death Gamble Train Track", new Vector3(num4, 0.18f, -9.8f), new Vector3(num4 + 0.35f, 0.18f, -3.8f), color, transform, 0.055f); } CreateCube("Idle Death Gamble Checkpoint Gate L", new Vector3(-1.6f, 1.6f, -8.2f), new Vector3(0.25f, 3.2f, 0.25f), val, transform); CreateCube("Idle Death Gamble Checkpoint Gate R", new Vector3(1.6f, 1.6f, -8.2f), new Vector3(0.25f, 3.2f, 0.25f), val, transform); CreateLine("Idle Death Gamble Checkpoint Beam", new Vector3(-1.9f, 3.25f, -8.2f), new Vector3(1.9f, 3.25f, -8.2f), val, transform, 0.12f); Vector3 val5 = default(Vector3); for (int l = 0; l < 20; l++) { float num5 = (float)l * MathF.PI * 2f / 20f; float num6 = 4.2f + (float)(l % 5) * 1.75f; ((Vector3)(ref val5))..ctor(Mathf.Cos(num5) * num6, 0.5f, Mathf.Sin(num5) * num6); Vector3 val6 = val5 + Vector3.up * (2.2f + (float)(l % 4) * 0.35f); CreateLine("Idle Death Gamble Music Note Trail", val5, val6, (l % 3 == 0) ? val2 : ((l % 3 == 1) ? val : val3), transform, 0.07f); CreateFloatingText("Idle Death Gamble Music Note", "NOTE", val6 + Vector3.up * 0.18f, 0.055f, (l % 2 == 0) ? val2 : val, transform); } } private void CreateRichiiStage(string name, string label, Vector3 center, Color color, Transform parent) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_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_012f: 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_0139: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) CreateCube(name + " Backdrop", center + new Vector3(0f, 0.8f, 0f), new Vector3(4.9f, 2.8f, 0.22f), new Color(0.02f, 0.02f, 0.02f, 0.92f), parent); CreateLine(name + " Top", center + new Vector3(-2.5f, 2.35f, -0.18f), center + new Vector3(2.5f, 2.35f, -0.18f), color, parent, 0.12f); CreateLine(name + " Bottom", center + new Vector3(-2.5f, -0.05f, -0.18f), center + new Vector3(2.5f, -0.05f, -0.18f), color, parent, 0.12f); CreateLine(name + " Left", center + new Vector3(-2.5f, -0.05f, -0.18f), center + new Vector3(-2.5f, 2.35f, -0.18f), color, parent, 0.12f); CreateLine(name + " Right", center + new Vector3(2.5f, -0.05f, -0.18f), center + new Vector3(2.5f, 2.35f, -0.18f), color, parent, 0.12f); CreateFloatingText(name + " Label", label, center + new Vector3(0f, 1.15f, -0.35f), 0.085f, color, parent); } private GameObject CreateFloatingText(string name, string text, Vector3 localPosition, float characterSize, Color color, Transform parent) { //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_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_0020: 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_0053: Expected O, but got Unknown GameObject val = new GameObject(name); val.transform.SetParent(parent, false); val.transform.localPosition = localPosition; TextMesh obj = val.AddComponent(); obj.text = text; obj.fontSize = 48; obj.characterSize = characterSize; obj.anchor = (TextAnchor)4; obj.alignment = (TextAlignment)1; obj.color = color; return val; } private void CreateInfiniteVoidBlackHole(DomainStyle style) { //IL_001e: 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_0034: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_008e: 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_0162: 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_017a: Unknown result type (might be due to invalid IL or missing references) Color color = default(Color); ((Color)(ref color))..ctor(0f, 0f, 0f, 1f); Color color2 = default(Color); ((Color)(ref color2))..ctor(style.TextColor.r, style.TextColor.g, style.TextColor.b, 1f); CreateSphere("Infinite Void Black Hole Core", Vector3.up * 2.25f, Vector3.one * 3.2f, color, domainRoot.transform); CreateLineRing("Infinite Void Black Hole Rim", 2.45f, 2.25f, color2, domainRoot.transform, 0.08f); CreateLineRing("Infinite Void Black Hole Outer Rim", 3.35f, 2.28f, new Color(0.15f, 0.42f, 1f, 1f), domainRoot.transform, 0.045f); Vector3 start = default(Vector3); Vector3 end = default(Vector3); for (int i = 0; i < 8; i++) { float num = (float)i * MathF.PI * 2f / 8f; ((Vector3)(ref start))..ctor(Mathf.Cos(num) * 1.7f, 2.25f, Mathf.Sin(num) * 1.7f); ((Vector3)(ref end))..ctor(Mathf.Cos(num) * 4.7f, 2.25f + Mathf.Sin((float)i * 1.7f) * 0.22f, Mathf.Sin(num) * 4.7f); CreateLine("Infinite Void Gravity Ray", start, end, new Color(0.62f, 0.9f, 1f, 1f), domainRoot.transform, 0.025f); } } private void CreateInfiniteVoidGalaxyDome(DomainStyle style) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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) Vector3 localPosition = Vector3.up * 4.8f; Vector3 localScale = default(Vector3); ((Vector3)(ref localScale))..ctor(73.32f, 39.52f, 73.32f); Vector3 localScale2 = default(Vector3); ((Vector3)(ref localScale2))..ctor(71.24f, 38.22f, 71.24f); GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)obj).name = "Infinite Void Outside Black Dome"; obj.transform.SetParent(domainRoot.transform, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale; Object.Destroy((Object)(object)obj.GetComponent()); ApplyOutsideOnlyOpaqueMaterial(obj.GetComponent(), new Color(0f, 0f, 0f, 1f)); GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)val).name = "Infinite Void Inside Galaxy Dome"; val.transform.SetParent(domainRoot.transform, false); val.transform.localPosition = localPosition; val.transform.localScale = localScale2; Object.Destroy((Object)(object)val.GetComponent()); InvertMesh(val.GetComponent()); infiniteVoidGalaxyRenderer = val.GetComponent(); ApplyGalaxyDomeMaterial(infiniteVoidGalaxyRenderer, infiniteVoidGalaxyTexture); infiniteVoidRotators.Add(val.transform); } private static void CreateOpaqueDoubleSidedSphere(string name, Vector3 localPosition, Vector3 localScale, Color color, Transform parent) { //IL_002b: 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_004d: 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_008a: 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_00b5: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)obj).name = name + " Outside"; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale; Object.Destroy((Object)(object)obj.GetComponent()); ApplyOpaqueUnlitMaterial(obj.GetComponent(), color); GameObject obj2 = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)obj2).name = name + " Inside"; obj2.transform.SetParent(parent, false); obj2.transform.localPosition = localPosition; obj2.transform.localScale = localScale * 0.992f; Object.Destroy((Object)(object)obj2.GetComponent()); InvertMesh(obj2.GetComponent()); ApplyOpaqueUnlitMaterial(obj2.GetComponent(), color); } private void CreateTexturedDoubleSidedSphere(string name, Vector3 localPosition, Vector3 localScale, Texture2D? texture, Color insideTint, Color outsideTint, Transform parent) { //IL_002b: 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_003d: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)obj).name = name + " Outside"; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale * 1.012f; Object.Destroy((Object)(object)obj.GetComponent()); ApplyOutsideOnlyOpaqueMaterial(obj.GetComponent(), outsideTint); GameObject val = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)val).name = name + " Inside"; val.transform.SetParent(parent, false); val.transform.localPosition = localPosition; val.transform.localScale = localScale; Object.Destroy((Object)(object)val.GetComponent()); InvertMesh(val.GetComponent()); activeDomainInteriorRenderer = val.GetComponent(); ApplyBarrierTextureMaterial(activeDomainInteriorRenderer, texture, insideTint, 1.15f); } private static GameObject CreateTexturedQuad(string name, Vector3 localPosition, Vector2 localSize, Texture2D? texture, Color tint, Transform parent, float emissionStrength) { //IL_0021: 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_0033: 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_005a: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)5); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = new Vector3(localSize.x, localSize.y, 1f); Object.Destroy((Object)(object)obj.GetComponent()); ApplyTransparentTextureMaterial(obj.GetComponent(), texture, tint, emissionStrength); return obj; } private static GameObject CreateOpaqueTexturedQuad(string name, Vector3 localPosition, Vector2 localSize, Texture2D? texture, Transform parent) { //IL_0021: 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_0033: 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_005a: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)5); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = new Vector3(localSize.x, localSize.y, 1f); Object.Destroy((Object)(object)obj.GetComponent()); ApplyBarrierTextureMaterial(obj.GetComponent(), texture, Color.white, 0.65f); return obj; } private static GameObject CreateTexturedGroundQuad(string name, Vector3 localPosition, float size, Texture2D? texture, Color tint, Transform parent, float emissionStrength) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) GameObject obj = CreateTexturedQuad(name, localPosition, new Vector2(size, size), texture, tint, parent, emissionStrength); obj.transform.localRotation = Quaternion.Euler(-90f, 0f, 0f); return obj; } private ParticleSystem CreateParticleEffect(string name, Transform parent, Vector3 localPosition, Quaternion localRotation, Color colorA, Color colorB, Vector2 lifetime, Vector2 size, Vector2 speed, int maxParticles, float rate, ParticleSystemShapeType shapeType, float shapeRadius, bool additive, bool stretched, Texture2D? texture = null) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001a: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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_00a7: 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_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: 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_020c: 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_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Expected O, but got Unknown //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); val.transform.localPosition = localPosition; val.transform.localRotation = localRotation; ParticleSystem val2 = val.AddComponent(); MainModule main = val2.main; ((MainModule)(ref main)).loop = true; ((MainModule)(ref main)).playOnAwake = true; ((MainModule)(ref main)).duration = 5f; ((MainModule)(ref main)).startLifetime = new MinMaxCurve(lifetime.x, lifetime.y); ((MainModule)(ref main)).startSpeed = new MinMaxCurve(speed.x, speed.y); ((MainModule)(ref main)).startSize = new MinMaxCurve(size.x, size.y); ((MainModule)(ref main)).startColor = new MinMaxGradient(colorA, colorB); ((MainModule)(ref main)).startRotation = new MinMaxCurve(0f, MathF.PI * 2f); ((MainModule)(ref main)).maxParticles = maxParticles; ((MainModule)(ref main)).simulationSpace = (ParticleSystemSimulationSpace)0; ((MainModule)(ref main)).scalingMode = (ParticleSystemScalingMode)0; EmissionModule emission = val2.emission; ((EmissionModule)(ref emission)).enabled = true; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(rate); ShapeModule shape = val2.shape; ((ShapeModule)(ref shape)).enabled = true; ((ShapeModule)(ref shape)).shapeType = shapeType; ((ShapeModule)(ref shape)).radius = shapeRadius; Gradient val3 = new Gradient(); val3.SetKeys((GradientColorKey[])(object)new GradientColorKey[2] { new GradientColorKey(Color.white, 0f), new GradientColorKey(Color.white, 1f) }, (GradientAlphaKey[])(object)new GradientAlphaKey[4] { new GradientAlphaKey(0f, 0f), new GradientAlphaKey(1f, 0.12f), new GradientAlphaKey(0.82f, 0.72f), new GradientAlphaKey(0f, 1f) }); ColorOverLifetimeModule colorOverLifetime = val2.colorOverLifetime; ((ColorOverLifetimeModule)(ref colorOverLifetime)).enabled = true; ((ColorOverLifetimeModule)(ref colorOverLifetime)).color = new MinMaxGradient(val3); AnimationCurve val4 = new AnimationCurve((Keyframe[])(object)new Keyframe[4] { new Keyframe(0f, 0.25f), new Keyframe(0.18f, 1f), new Keyframe(0.82f, 0.72f), new Keyframe(1f, 0f) }); SizeOverLifetimeModule sizeOverLifetime = val2.sizeOverLifetime; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).enabled = true; ((SizeOverLifetimeModule)(ref sizeOverLifetime)).size = new MinMaxCurve(1f, val4); NoiseModule noise = val2.noise; ((NoiseModule)(ref noise)).enabled = true; ((NoiseModule)(ref noise)).strength = MinMaxCurve.op_Implicit(stretched ? 0.12f : 0.3f); ((NoiseModule)(ref noise)).frequency = 0.35f; ((NoiseModule)(ref noise)).scrollSpeed = MinMaxCurve.op_Implicit(0.12f); ParticleSystemRenderer component = val.GetComponent(); component.renderMode = (ParticleSystemRenderMode)(stretched ? 1 : 0); component.lengthScale = (stretched ? 5.2f : 1f); component.velocityScale = (stretched ? 0.32f : 0f); component.cameraVelocityScale = 0f; ((Renderer)component).material = CreateParticleMaterial(texture ?? softParticleTexture, additive); val2.Play(true); return val2; } private ParticleSystem CreateBurstParticleEffect(string name, Transform parent, Vector3 localPosition, Quaternion localRotation, Color colorA, Color colorB, Vector2 lifetime, Vector2 size, Vector2 speed, int count, ParticleSystemShapeType shapeType, float shapeRadius, bool additive, bool stretched, Texture2D? texture = null) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: 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_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: 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_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0045: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) ParticleSystem val = CreateParticleEffect(name, parent, localPosition, localRotation, colorA, colorB, lifetime, size, speed, count, 0f, shapeType, shapeRadius, additive, stretched, texture); val.Stop(true, (ParticleSystemStopBehavior)0); MainModule main = val.main; ((MainModule)(ref main)).loop = false; ((MainModule)(ref main)).duration = Mathf.Max(0.1f, lifetime.y); EmissionModule emission = val.emission; ((EmissionModule)(ref emission)).rateOverTime = MinMaxCurve.op_Implicit(0f); ((EmissionModule)(ref emission)).SetBursts((Burst[])(object)new Burst[1] { new Burst(0f, (short)Mathf.Clamp(count, 1, 32767)) }); val.Play(true); return val; } private void TrackOpeningParticles(ParticleSystem particles, float stopProgress) { openingTimedParticles.Add(particles); openingParticleStopProgress.Add(stopProgress); } private Material CreateParticleMaterial(Texture2D? texture, bool additive) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Shader.Find("Particles/Standard Unlit") ?? Shader.Find(additive ? "Legacy Shaders/Particles/Additive" : "Legacy Shaders/Particles/Alpha Blended") ?? Shader.Find("Unlit/Transparent") ?? Shader.Find("Sprites/Default")); if ((Object)(object)texture != (Object)null) { val.mainTexture = (Texture)(object)texture; if (val.HasProperty("_MainTex")) { val.SetTexture("_MainTex", (Texture)(object)texture); } } if (val.HasProperty("_Color")) { val.SetColor("_Color", Color.white); } if (val.HasProperty("_Mode")) { val.SetFloat("_Mode", 2f); } if (val.HasProperty("_SrcBlend")) { val.SetInt("_SrcBlend", 5); } if (val.HasProperty("_DstBlend")) { val.SetInt("_DstBlend", additive ? 1 : 10); } if (val.HasProperty("_ZWrite")) { val.SetInt("_ZWrite", 0); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 0); } val.renderQueue = 3100; return val; } private static void ApplySlashVfxMaterial(Renderer renderer, Texture2D? texture, Color tint) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_0064: 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) Material val = new Material(Shader.Find("Sprites/Default") ?? Shader.Find("Unlit/Transparent") ?? Shader.Find("Particles/Standard Unlit") ?? Shader.Find("Standard")); if ((Object)(object)texture != (Object)null) { val.mainTexture = (Texture)(object)texture; if (val.HasProperty("_MainTex")) { val.SetTexture("_MainTex", (Texture)(object)texture); } } val.color = tint; if (val.HasProperty("_Color")) { val.SetColor("_Color", tint); } if (val.HasProperty("_SrcBlend")) { val.SetInt("_SrcBlend", 5); } if (val.HasProperty("_DstBlend")) { val.SetInt("_DstBlend", 10); } if (val.HasProperty("_ZWrite")) { val.SetInt("_ZWrite", 0); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 0); } val.SetInt("_ZTest", 8); val.SetInt("unity_GUIZTestMode", 8); val.renderQueue = 32700; renderer.shadowCastingMode = (ShadowCastingMode)0; renderer.receiveShadows = false; renderer.material = val; } private static void SetRendererTint(Renderer renderer, Color tint) { //IL_0008: 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_0045: 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_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_0066: 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) Material material = renderer.material; material.color = tint; if (material.HasProperty("_Color")) { material.SetColor("_Color", tint); } if (material.HasProperty("_EmissionColor")) { material.EnableKeyword("_EMISSION"); material.SetColor("_EmissionColor", new Color(tint.r, tint.g, tint.b, 1f) * (1.25f * tint.a)); } } private void CreateInfiniteVoidJjsVfx(DomainStyle style) { //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_00c2: 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_0168: 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_0169: 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_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0401: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: 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_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: 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_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color val = default(Color); ((Color)(ref val))..ctor(0.08f, 0.55f, 1f, 1f); Color val2 = default(Color); ((Color)(ref val2))..ctor(0.72f, 0.96f, 1f, 1f); Color val3 = default(Color); ((Color)(ref val3))..ctor(1f, 1f, 1f, 1f); Color color = default(Color); ((Color)(ref color))..ctor(0.18f, 0.85f, 1f, 0.72f); CreateLineRing("Infinite Void White Horizon", 22.36f, 0.38f, val3, transform, 0.1f); CreateLineRing("Infinite Void Blue Horizon", 18.199999f, 1.45f, val, transform, 0.08f); CreateLineRing("Infinite Void Galaxy Halo", 14.3f, 4.8f, val2, transform, 0.07f); CreateLineRing("Infinite Void Upper Reality Ring", 8.32f, 7.2f, val3, transform, 0.06f); Vector3 val4 = default(Vector3); for (int i = 0; i < 120; i++) { float num = (float)i * 2.399963f; float num2 = 4f + (float)(i % 29) * 16.800001f / 29f; float num3 = 0.9f + (float)(i * 7 % 18) * 0.38f; ((Vector3)(ref val4))..ctor(Mathf.Cos(num) * num2, num3, Mathf.Sin(num) * num2); float num4 = 0.055f + (float)(i % 4) * 0.03f; Color color2 = ((i % 5 == 0) ? val3 : val2); CreateSphere("Infinite Void Star", val4, Vector3.one * num4, color2, transform); if (i % 3 == 0) { CreateLine("Infinite Void Star Glint", val4 - Vector3.right * num4 * 1.8f, val4 + Vector3.right * num4 * 1.8f, color2, transform, 0.014f); CreateLine("Infinite Void Star Glint Vertical", val4 - Vector3.forward * num4 * 1.8f, val4 + Vector3.forward * num4 * 1.8f, color2, transform, 0.014f); } } Vector3 val5 = default(Vector3); for (int j = 0; j < 4; j++) { float num5 = (float)j * MathF.PI * 0.5f; Vector3 start = Vector3.zero; for (int k = 0; k < 42; k++) { float num6 = (float)k / 41f; float num7 = num5 + num6 * MathF.PI * 3.6f; float num8 = Mathf.Lerp(2.5f, 18.720001f, num6); float num9 = 2.1f + Mathf.Sin(num6 * MathF.PI * 2f + (float)j) * 0.9f; ((Vector3)(ref val5))..ctor(Mathf.Cos(num7) * num8, num9, Mathf.Sin(num7) * num8); if (k > 0) { CreateLine("Infinite Void Galaxy Spiral", start, val5, (j % 2 == 0) ? val : val2, transform, 0.06f); } start = val5; } } Vector3 val6 = default(Vector3); for (int l = 0; l < 18; l++) { float num10 = (float)l * MathF.PI * 2f / 18f; float num11 = 6.5f + (float)(l % 6) * 2.4f; float num12 = 1.5f + (float)(l % 5) * 0.75f; ((Vector3)(ref val6))..ctor(Mathf.Cos(num10) * num11, num12, Mathf.Sin(num10) * num11); CreateCube("Infinite Void Information Panel", val6, new Vector3(1.2f, 0.04f, 0.62f), color, transform).transform.localRotation = Quaternion.Euler(18f + (float)l * 7f, (0f - num10) * 57.29578f, 72f); CreateLine("Infinite Void Data Strip", val6 - Vector3.right * 0.72f, val6 + Vector3.right * 0.72f, val3, transform, 0.035f); } Vector3 start2 = default(Vector3); Vector3 end = default(Vector3); for (int m = 0; m < 16; m++) { float num13 = (float)m * MathF.PI * 2f / 16f; ((Vector3)(ref start2))..ctor(Mathf.Cos(num13) * 2.8f, 1.65f, Mathf.Sin(num13) * 2.8f); ((Vector3)(ref end))..ctor(Mathf.Cos(num13) * 26f * 0.82f, 5.6f + (float)(m % 4) * 0.42f, Mathf.Sin(num13) * 26f * 0.82f); CreateLine("Infinite Void Information Beam", start2, end, (m % 2 == 0) ? val3 : val, transform, 0.075f); } } private void CreateMalevolentShrineMouth(DomainStyle style, bool closed) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Expected O, but got Unknown //IL_00b6: 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_00da: 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_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f7: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04dc: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) Transform transform = domainRoot.transform; Color color = default(Color); ((Color)(ref color))..ctor(0.08f, 0.012f, 0.009f, 1f); Color color2 = default(Color); ((Color)(ref color2))..ctor(0.22f, 0.018f, 0.012f, 1f); Color color3 = default(Color); ((Color)(ref color3))..ctor(0.52f, 0.012f, 0.008f, 1f); Color color4 = default(Color); ((Color)(ref color4))..ctor(0.86f, 0.76f, 0.57f, 1f); float num = (closed ? 1f : 1.28f); GameObject val = new GameObject("Malevolent Shrine Monument"); val.transform.SetParent(transform, false); shrineMouthRoot = val.transform; CreateCube("Malevolent Shrine Stone Plinth", Vector3.up * 0.35f, new Vector3(9.8f * num, 0.7f, 7.4f * num), color, val.transform); CreateCube("Malevolent Shrine Blood Base", Vector3.up * 0.85f, new Vector3(8.5f * num, 0.75f, 6.2f * num), color2, val.transform); for (int i = -1; i <= 1; i += 2) { float num2 = (float)i * 3.4f * num; CreateCylinder("Malevolent Shrine Bone Pillar", new Vector3(num2, 3f, 0.5f), new Vector3(0.65f, 2.5f, 0.65f), color4, val.transform); CreateCone("Malevolent Shrine Side Horn", new Vector3((float)i * 4.25f * num, 4.25f, 0.2f), new Vector3(0.8f, 3f, 0.8f), color4, val.transform).transform.localRotation = Quaternion.Euler(0f, 0f, (float)i * -58f); } CreateCube("Malevolent Shrine Lower Roof", new Vector3(0f, 4.45f, 0.5f), new Vector3(10.2f * num, 0.38f, 6.6f * num), color2, val.transform); CreateCube("Malevolent Shrine Upper Roof", new Vector3(0f, 5.05f, 0.65f), new Vector3(8.4f * num, 0.32f, 5.4f * num), color, val.transform); CreateCube("Malevolent Shrine Crown", new Vector3(0f, 5.55f, 0.85f), new Vector3(5.6f * num, 0.28f, 3.7f * num), color2, val.transform); CreateCube("Malevolent Shrine Jaw Top", new Vector3(0f, 3.35f, -2.25f * num), new Vector3(7.5f * num, 0.58f, 1.35f), color3, val.transform); CreateCube("Malevolent Shrine Jaw Bottom", new Vector3(0f, 1.5f, -2.25f * num), new Vector3(7.5f * num, 0.58f, 1.35f), color3, val.transform); CreateCube("Malevolent Shrine Mouth Void", new Vector3(0f, 2.42f, -2.65f * num), new Vector3(6.8f * num, 1.35f, 0.24f), Color.black, val.transform); int num3 = (closed ? 15 : 19); for (int j = 0; j < num3; j++) { float num4 = Mathf.Lerp(-3.1f * num, 3.1f * num, (num3 == 1) ? 0.5f : ((float)j / (float)(num3 - 1))); float num5 = 0.26f + (float)(j % 3) * 0.045f; CreateCone("Shrine Upper Tooth", new Vector3(num4, 3.02f, -2.87f * num), new Vector3(num5, 0.76f, num5), color4, val.transform).transform.localRotation = Quaternion.Euler(180f, 0f, 0f); CreateCone("Shrine Lower Tooth", new Vector3(num4, 1.84f, -2.87f * num), new Vector3(num5, 0.76f, num5), color4, val.transform); } Vector3 localPosition = default(Vector3); for (int k = 0; k < 8; k++) { float num6 = (float)k * MathF.PI * 2f / 8f; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num6) * 3.8f * num, 5.75f + (float)(k % 2) * 0.25f, Mathf.Sin(num6) * 2.2f * num); CreateCone("Malevolent Shrine Crown Tooth", localPosition, new Vector3(0.34f, 1.25f, 0.34f), color4, val.transform).transform.localRotation = Quaternion.Euler((k % 2 == 0) ? 0f : 180f, 0f, 0f); } } private GameObject CreateLineRing(string name, float radius, float height, Color color, Transform parent, float width) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001d: 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) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); LineRenderer val2 = val.AddComponent(); ConfigureLineRenderer(val2, color, width); val2.loop = true; val2.positionCount = 128; for (int i = 0; i < 128; i++) { float num = (float)i * MathF.PI * 2f / 128f; val2.SetPosition(i, new Vector3(Mathf.Cos(num) * radius, height, Mathf.Sin(num) * radius)); } return val; } private GameObject CreateVerticalLineRing(string name, float radius, float z, Color color, Transform parent, float width) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_001d: 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) GameObject val = new GameObject(name); val.transform.SetParent(parent, false); LineRenderer val2 = val.AddComponent(); ConfigureLineRenderer(val2, color, width); val2.loop = true; val2.positionCount = 128; for (int i = 0; i < 128; i++) { float num = (float)i * MathF.PI * 2f / 128f; val2.SetPosition(i, new Vector3(Mathf.Cos(num) * radius, Mathf.Sin(num) * radius, z)); } return val; } private GameObject CreateLine(string name, Vector3 start, Vector3 end, Color color, Transform parent, float width) { //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_0014: 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_002d: 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_003b: Expected O, but got Unknown GameObject val = new GameObject(name); val.transform.SetParent(parent, false); LineRenderer obj = val.AddComponent(); ConfigureLineRenderer(obj, color, width); obj.positionCount = 2; obj.SetPosition(0, start); obj.SetPosition(1, end); return val; } private void CreateLineCage(string name, float radius, int count, float height, Color color, Transform parent, float width) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); Vector3 end = default(Vector3); for (int i = 0; i < count; i++) { float num = (float)i * MathF.PI * 2f / (float)count; ((Vector3)(ref val))..ctor(Mathf.Cos(num) * radius, 0.15f, Mathf.Sin(num) * radius); ((Vector3)(ref end))..ctor(val.x, height, val.z); CreateLine(name, val, end, color, parent, width); } } private static void ConfigureLineRenderer(LineRenderer line, Color color, float width) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) Color val = default(Color); ((Color)(ref val))..ctor(color.r, color.g, color.b, 1f); line.useWorldSpace = false; line.startWidth = width; line.endWidth = width; line.numCapVertices = 4; line.numCornerVertices = 4; line.startColor = val; line.endColor = val; Material val2 = new Material(Shader.Find("Sprites/Default") ?? Shader.Find("Unlit/Color") ?? Shader.Find("Diffuse")); if (val2.HasProperty("_Color")) { val2.SetColor("_Color", val); } ((Renderer)line).material = val2; } private static void ConfigureSlashRendererForAnimation(LineRenderer line) { //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_0030: 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_0068: Unknown result type (might be due to invalid IL or missing references) line.numCapVertices = 0; line.numCornerVertices = 0; line.textureMode = (LineTextureMode)0; line.alignment = (LineAlignment)0; Color startColor = line.startColor; startColor.a = 0f; line.startColor = startColor; line.endColor = startColor; if ((Object)(object)((Renderer)line).material != (Object)null && ((Renderer)line).material.HasProperty("_Color")) { ((Renderer)line).material.SetColor("_Color", startColor); } ((Renderer)line).enabled = false; } private GameObject CreateSphere(string name, Vector3 localPosition, Vector3 localScale, Color color, Transform parent) { //IL_0021: 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_003f: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)0); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale; Object.Destroy((Object)(object)obj.GetComponent()); ApplyMaterial(obj, color); return obj; } private GameObject CreateCube(string name, Vector3 localPosition, Vector3 localScale, Color color, Transform parent) { //IL_0021: 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_003f: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)3); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale; Object.Destroy((Object)(object)obj.GetComponent()); ApplyMaterial(obj, color); return obj; } private GameObject CreateCylinder(string name, Vector3 localPosition, Vector3 localScale, Color color, Transform parent) { //IL_0021: 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_003f: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)2); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale; Object.Destroy((Object)(object)obj.GetComponent()); ApplyMaterial(obj, color); return obj; } private GameObject CreateCone(string name, Vector3 localPosition, Vector3 localScale, Color color, Transform parent) { //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_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_0020: 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_002c: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown GameObject val = new GameObject(name); val.transform.SetParent(parent, false); val.transform.localPosition = localPosition; val.transform.localScale = localScale; MeshFilter val2 = val.AddComponent(); MeshRenderer renderer = val.AddComponent(); val2.mesh = CreateConeMesh(18); ApplyMaterial((Renderer)(object)renderer, color); return val; } private GameObject CreateCapsule(string name, Vector3 localPosition, Vector3 localScale, Color color, Transform parent) { //IL_0021: 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_003f: Unknown result type (might be due to invalid IL or missing references) GameObject obj = GameObject.CreatePrimitive((PrimitiveType)1); ((Object)obj).name = name; obj.transform.SetParent(parent, false); obj.transform.localPosition = localPosition; obj.transform.localScale = localScale; Object.Destroy((Object)(object)obj.GetComponent()); ApplyMaterial(obj, color); return obj; } private static void ApplyMaterial(GameObject obj, Color color) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) ApplyMaterial(obj.GetComponent(), color); } private static void ApplyMaterial(Renderer renderer, Color color) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0046: 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_00a5: 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_0070: 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_0081: 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_009b: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Shader.Find("Unlit/Color") ?? Shader.Find("Standard") ?? Shader.Find("Diffuse")); if (val.HasProperty("_Color")) { val.SetColor("_Color", color); } val.color = color; if (val.HasProperty("_EmissionColor")) { val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", new Color(color.r, color.g, color.b, 1f) * Mathf.Lerp(0.65f, 2.2f, color.a)); } if (color.a < 0.99f) { val.SetFloat("_Mode", 3f); val.SetInt("_SrcBlend", 5); val.SetInt("_DstBlend", 10); val.SetInt("_ZWrite", 0); val.DisableKeyword("_ALPHATEST_ON"); val.EnableKeyword("_ALPHABLEND_ON"); val.renderQueue = 3000; } renderer.material = val; } private static void ApplyOpaqueUnlitMaterial(Renderer renderer, Color color) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0046: 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) Material val = new Material(Shader.Find("Unlit/Color") ?? Shader.Find("Standard") ?? Shader.Find("Diffuse")); if (val.HasProperty("_Color")) { val.SetColor("_Color", color); } val.color = color; if (val.HasProperty("_Mode")) { val.SetFloat("_Mode", 0f); } if (val.HasProperty("_SrcBlend")) { val.SetInt("_SrcBlend", 1); } if (val.HasProperty("_DstBlend")) { val.SetInt("_DstBlend", 0); } if (val.HasProperty("_ZWrite")) { val.SetInt("_ZWrite", 1); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 0); } val.renderQueue = 2000; renderer.material = val; } private static void ApplyOutsideOnlyOpaqueMaterial(Renderer renderer, Color color) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0046: 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) Material val = new Material(Shader.Find("Unlit/Color") ?? Shader.Find("Standard") ?? Shader.Find("Diffuse")); if (val.HasProperty("_Color")) { val.SetColor("_Color", color); } val.color = color; if (val.HasProperty("_Mode")) { val.SetFloat("_Mode", 0f); } if (val.HasProperty("_SrcBlend")) { val.SetInt("_SrcBlend", 1); } if (val.HasProperty("_DstBlend")) { val.SetInt("_DstBlend", 0); } if (val.HasProperty("_ZWrite")) { val.SetInt("_ZWrite", 1); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 2); } val.renderQueue = 1990; renderer.material = val; } private static void ApplyOpaqueBarrierMaterial(Renderer renderer) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Expected O, but got Unknown //IL_0091: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) Shader val = Shader.Find("HDRP/Unlit") ?? Shader.Find("HDRP/Lit") ?? Shader.Find("Unlit/Color") ?? Shader.Find("Standard") ?? Shader.Find("Diffuse"); if ((Object)(object)val == (Object)null) { Log.LogError((object)"No shader was available for the exterior domain barrier."); return; } Material val2 = new Material(val); Color val3 = default(Color); ((Color)(ref val3))..ctor(0f, 0f, 0f, 1f); if (val2.HasProperty("_Color")) { val2.SetColor("_Color", val3); } if (val2.HasProperty("_BaseColor")) { val2.SetColor("_BaseColor", val3); } if (val2.HasProperty("_UnlitColor")) { val2.SetColor("_UnlitColor", val3); } if (val2.HasProperty("_EmissiveColor")) { val2.SetColor("_EmissiveColor", Color.black); } if (val2.HasProperty("_Mode")) { val2.SetFloat("_Mode", 0f); } if (val2.HasProperty("_SurfaceType")) { val2.SetFloat("_SurfaceType", 0f); } if (val2.HasProperty("_SrcBlend")) { val2.SetInt("_SrcBlend", 1); } if (val2.HasProperty("_DstBlend")) { val2.SetInt("_DstBlend", 0); } if (val2.HasProperty("_ZWrite")) { val2.SetInt("_ZWrite", 1); } if (val2.HasProperty("_Cull")) { val2.SetInt("_Cull", 2); } if (val2.HasProperty("_CullMode")) { val2.SetInt("_CullMode", 2); } if (val2.HasProperty("_CullModeForward")) { val2.SetInt("_CullModeForward", 2); } val2.DisableKeyword("_ALPHABLEND_ON"); val2.DisableKeyword("_SURFACE_TYPE_TRANSPARENT"); val2.renderQueue = 1990; renderer.material = val2; renderer.enabled = true; } private static void ApplyGalaxyDomeMaterial(Renderer renderer, Texture2D? texture) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_008d: 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_0092: 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_00a6: 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) Material val = new Material(Shader.Find("Unlit/Texture") ?? Shader.Find("Standard") ?? Shader.Find("Diffuse")); if ((Object)(object)texture != (Object)null) { val.mainTexture = (Texture)(object)texture; if (val.HasProperty("_MainTex")) { val.SetTexture("_MainTex", (Texture)(object)texture); } } Color val2 = (((Object)(object)texture != (Object)null) ? new Color(1f, 1f, 1f, 1f) : new Color(0.025f, 0.02f, 0.08f, 1f)); if (val.HasProperty("_Color")) { val.SetColor("_Color", val2); } val.color = val2; if (val.HasProperty("_Mode")) { val.SetFloat("_Mode", 0f); } if (val.HasProperty("_SrcBlend")) { val.SetInt("_SrcBlend", 1); } if (val.HasProperty("_DstBlend")) { val.SetInt("_DstBlend", 0); } if (val.HasProperty("_ZWrite")) { val.SetInt("_ZWrite", 1); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 0); } if (val.HasProperty("_EmissionColor")) { val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", new Color(0.16f, 0.1f, 0.35f, 1f)); } val.renderQueue = 2000; renderer.material = val; } private static void ApplyCameraBackdropMaterial(Renderer renderer, Texture2D? texture, Color fallback, float brightness) { //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0219: 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) Shader val = Shader.Find("HDRP/Unlit") ?? Shader.Find("HDRP/Lit") ?? Shader.Find("Unlit/Texture") ?? Shader.Find("Standard"); if ((Object)(object)val == (Object)null) { Renderer[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { Material[] sharedMaterials = array[i].sharedMaterials; foreach (Material val2 in sharedMaterials) { if (!((Object)(object)val2 == (Object)null) && !((Object)(object)val2.shader == (Object)null) && (val2.HasProperty("_BaseColorMap") || val2.HasProperty("_BaseMap") || val2.HasProperty("_MainTex"))) { val = val2.shader; break; } } if ((Object)(object)val != (Object)null) { break; } } } if ((Object)(object)val == (Object)null) { Log.LogError((object)"No textured shader was available for the domain interior."); renderer.enabled = false; return; } Material val3 = new Material(val); if ((Object)(object)texture != (Object)null) { val3.mainTexture = (Texture)(object)texture; if (val3.HasProperty("_MainTex")) { val3.SetTexture("_MainTex", (Texture)(object)texture); } if (val3.HasProperty("_BaseColorMap")) { val3.SetTexture("_BaseColorMap", (Texture)(object)texture); } if (val3.HasProperty("_BaseMap")) { val3.SetTexture("_BaseMap", (Texture)(object)texture); } if (val3.HasProperty("_UnlitColorMap")) { val3.SetTexture("_UnlitColorMap", (Texture)(object)texture); } } Color val4 = (((Object)(object)texture != (Object)null) ? new Color(brightness, brightness, brightness, 1f) : new Color(fallback.r * brightness, fallback.g * brightness, fallback.b * brightness, 1f)); if (val3.HasProperty("_Color")) { val3.SetColor("_Color", val4); } if (val3.HasProperty("_BaseColor")) { val3.SetColor("_BaseColor", val4); } if (val3.HasProperty("_UnlitColor")) { val3.SetColor("_UnlitColor", val4); } if (val3.HasProperty("_EmissiveColor")) { val3.SetColor("_EmissiveColor", Color.black); } val3.color = val4; if (val3.HasProperty("_Mode")) { val3.SetFloat("_Mode", 0f); } if (val3.HasProperty("_SurfaceType")) { val3.SetFloat("_SurfaceType", 0f); } if (val3.HasProperty("_DoubleSidedEnable")) { val3.SetFloat("_DoubleSidedEnable", 1f); } if (val3.HasProperty("_SrcBlend")) { val3.SetInt("_SrcBlend", 1); } if (val3.HasProperty("_DstBlend")) { val3.SetInt("_DstBlend", 0); } if (val3.HasProperty("_ZWrite")) { val3.SetInt("_ZWrite", 1); } if (val3.HasProperty("_Cull")) { val3.SetInt("_Cull", 0); } if (val3.HasProperty("_CullMode")) { val3.SetInt("_CullMode", 0); } if (val3.HasProperty("_CullModeForward")) { val3.SetInt("_CullModeForward", 0); } val3.DisableKeyword("_EMISSION"); val3.renderQueue = 1990; renderer.shadowCastingMode = (ShadowCastingMode)0; renderer.receiveShadows = false; renderer.material = val3; renderer.enabled = true; Log.LogInfo((object)("Domain interior shader: " + ((Object)val).name + ", texture=" + (((Object)(object)texture != (Object)null) ? ((Object)texture).name : "fallback") + ".")); } private static void ApplyBarrierTextureMaterial(Renderer renderer, Texture2D? texture, Color tint, float emissionStrength) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_00a0: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Shader.Find("Unlit/Texture") ?? Shader.Find("Standard") ?? Shader.Find("Diffuse")); if ((Object)(object)texture != (Object)null) { val.mainTexture = (Texture)(object)texture; if (val.HasProperty("_MainTex")) { val.SetTexture("_MainTex", (Texture)(object)texture); } if (val.HasProperty("_MainTex_ST")) { val.SetVector("_MainTex_ST", new Vector4(1f, 1f, 0f, 0f)); } } if (val.HasProperty("_Color")) { val.SetColor("_Color", tint); } val.color = tint; if (val.HasProperty("_Mode")) { val.SetFloat("_Mode", 0f); } if (val.HasProperty("_SrcBlend")) { val.SetInt("_SrcBlend", 1); } if (val.HasProperty("_DstBlend")) { val.SetInt("_DstBlend", 0); } if (val.HasProperty("_ZWrite")) { val.SetInt("_ZWrite", 1); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 0); } if (val.HasProperty("_EmissionColor")) { val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", tint * emissionStrength); } val.renderQueue = 1990; renderer.material = val; } private static void ApplyOutsideOnlyBarrierTextureMaterial(Renderer renderer, Texture2D? texture, Color tint, float emissionStrength) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_00a0: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) Material val = new Material(Shader.Find("Unlit/Texture") ?? Shader.Find("Standard") ?? Shader.Find("Diffuse")); if ((Object)(object)texture != (Object)null) { val.mainTexture = (Texture)(object)texture; if (val.HasProperty("_MainTex")) { val.SetTexture("_MainTex", (Texture)(object)texture); } if (val.HasProperty("_MainTex_ST")) { val.SetVector("_MainTex_ST", new Vector4(2.25f, 1.1f, 0f, 0f)); } } if (val.HasProperty("_Color")) { val.SetColor("_Color", tint); } val.color = tint; if (val.HasProperty("_Mode")) { val.SetFloat("_Mode", 0f); } if (val.HasProperty("_SrcBlend")) { val.SetInt("_SrcBlend", 1); } if (val.HasProperty("_DstBlend")) { val.SetInt("_DstBlend", 0); } if (val.HasProperty("_ZWrite")) { val.SetInt("_ZWrite", 1); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 2); } if (val.HasProperty("_EmissionColor")) { val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", tint * emissionStrength); } val.renderQueue = 1985; renderer.material = val; } private static void ApplyTransparentTextureMaterial(Renderer renderer, Texture2D? texture, Color tint, float emissionStrength) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown //IL_007d: 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_0139: 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) Material val = new Material(Shader.Find("Standard") ?? Shader.Find("Unlit/Transparent") ?? Shader.Find("Unlit/Texture") ?? Shader.Find("Diffuse")); if ((Object)(object)texture != (Object)null) { val.mainTexture = (Texture)(object)texture; if (val.HasProperty("_MainTex")) { val.SetTexture("_MainTex", (Texture)(object)texture); } } if (val.HasProperty("_Color")) { val.SetColor("_Color", tint); } val.color = tint; if (val.HasProperty("_Mode")) { val.SetFloat("_Mode", 3f); } if (val.HasProperty("_SrcBlend")) { val.SetInt("_SrcBlend", 5); } if (val.HasProperty("_DstBlend")) { val.SetInt("_DstBlend", 10); } if (val.HasProperty("_ZWrite")) { val.SetInt("_ZWrite", 0); } if (val.HasProperty("_Cull")) { val.SetInt("_Cull", 0); } val.DisableKeyword("_ALPHATEST_ON"); val.EnableKeyword("_ALPHABLEND_ON"); if (val.HasProperty("_EmissionColor")) { val.EnableKeyword("_EMISSION"); val.SetColor("_EmissionColor", tint * emissionStrength); } val.renderQueue = 3100; renderer.material = val; } private static void InvertMesh(MeshFilter? meshFilter) { if (!((Object)(object)meshFilter == (Object)null) && !((Object)(object)meshFilter.sharedMesh == (Object)null)) { Mesh val = Object.Instantiate(meshFilter.sharedMesh); int[] triangles = val.triangles; for (int i = 0; i < triangles.Length; i += 3) { int num = triangles[i]; triangles[i] = triangles[i + 1]; triangles[i + 1] = num; } val.triangles = triangles; val.RecalculateNormals(); val.RecalculateBounds(); meshFilter.mesh = val; } } private static Mesh CreateConeMesh(int segments) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //IL_001a: 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_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) Mesh val = new Mesh(); Vector3[] array = (Vector3[])(object)new Vector3[segments + 2]; int[] array2 = new int[segments * 6]; array[0] = Vector3.up * 0.5f; array[segments + 1] = Vector3.down * 0.5f; for (int i = 0; i < segments; i++) { float num = (float)i * MathF.PI * 2f / (float)segments; array[i + 1] = new Vector3(Mathf.Cos(num) * 0.5f, -0.5f, Mathf.Sin(num) * 0.5f); } int num2 = 0; for (int j = 0; j < segments; j++) { int num3 = j + 1; int num4 = ((j == segments - 1) ? 1 : (j + 2)); array2[num2++] = 0; array2[num2++] = num3; array2[num2++] = num4; array2[num2++] = segments + 1; array2[num2++] = num4; array2[num2++] = num3; } val.vertices = array; val.triangles = array2; val.RecalculateNormals(); val.RecalculateBounds(); return val; } private void ApplyInfiniteVoidPlayerSlow() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) if (selectedDomain != DomainKind.InfiniteVoid || openingActive || IsLocalCaster()) { hasLastLocalPlayerPosition = false; return; } PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if ((Object)(object)val == (Object)null) { hasLastLocalPlayerPosition = false; return; } Vector3 val2 = ((Component)val).transform.position - domainCenter; val2.y = 0f; if (((Vector3)(ref val2)).magnitude > 23.4f) { hasLastLocalPlayerPosition = false; return; } if (!hasLastLocalPlayerPosition) { lastLocalPlayerPosition = ((Component)val).transform.position; hasLastLocalPlayerPosition = true; return; } Vector3 position = ((Component)val).transform.position; Vector3 position2 = lastLocalPlayerPosition + (position - lastLocalPlayerPosition) * 0.015f; ((Component)val).transform.position = position2; lastLocalPlayerPosition = position2; SetMemberValue(val, "externalForces", Vector3.zero); } private void ApplyClosedBarrierContainment() { if (HasClosedBarrier() && !openingActive) { if (localPlayerInDomainArena) { ContainLocalPlayerInBarrier(); } if (domainAffectsGameplay) { ContainEnemiesInBarrier(); } } } private bool HasClosedBarrier() { return selectedDomain != DomainKind.MalevolentShrineOpen; } private static float GetDomainVisualRadius(DomainKind domain) { return domain switch { DomainKind.MalevolentShrineOpen => 55f, DomainKind.SelfEmbodimentOfPerfection => 39f, _ => 26f, }; } private static float GetClosedBarrierRadius(DomainKind domain) { if (domain != DomainKind.SelfEmbodimentOfPerfection) { return 23.4f; } return 39f; } private static float GetArenaFloorSize(DomainKind domain) { if (domain != DomainKind.SelfEmbodimentOfPerfection) { return 62f; } return 93f; } private unsafe void ContainLocalPlayerInBarrier() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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_0079: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0099: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_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_0174: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if ((Object)(object)val == (Object)null || IsPlayerDead(val)) { return; } Vector3 position = ((Component)val).transform.position; if (!IsFiniteVector(position) || position.y < domainCenter.y - 1.25f || position.y > domainCenter.y + 16f) { Vector3 val2 = MapPlayerPositionIntoArena(domainCenter, domainCenter, domainCenter, GetPlayerSlot(val), selectedDomain); TeleportPlayerSafely(val, val2, ((Component)val).transform.rotation); ManualLogSource log = Log; string[] obj = new string[5] { "Recovered local player from an invalid closed-domain position: ", null, null, null, null }; Vector3 val3 = position; obj[1] = ((object)(*(Vector3*)(&val3))/*cast due to .constrained prefix*/).ToString(); obj[2] = " -> "; val3 = val2; obj[3] = ((object)(*(Vector3*)(&val3))/*cast due to .constrained prefix*/).ToString(); obj[4] = "."; log.LogWarning((object)string.Concat(obj)); return; } Vector3 val4 = position - domainCenter; val4.y = 0f; float magnitude = ((Vector3)(ref val4)).magnitude; float closedBarrierRadius = GetClosedBarrierRadius(selectedDomain); if (!(magnitude <= closedBarrierRadius)) { Vector3 val5 = ((magnitude > 0.01f) ? (val4 / magnitude) : Vector3.forward); Vector3 val6 = domainCenter + val5 * Mathf.Max(2f, closedBarrierRadius - 1.5f); val6.y = Mathf.Max(position.y, domainCenter.y + 0.7f); ((Component)val).transform.position = Vector3.Lerp(position, val6, 0.72f); SetMemberValue(val, "externalForces", Vector3.zero); if (Time.time >= barrierTipCooldown) { barrierTipCooldown = Time.time + 3.5f; ShowTip("Closed Barrier", "You cannot leave this domain."); } } } private void ContainEnemiesInBarrier() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_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_00b0: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) foreach (EnemyAI key in arenaEnemyStates.Keys) { if ((Object)(object)key == (Object)null) { continue; } Vector3 val = ((Component)key).transform.position - domainCenter; val.y = 0f; float magnitude = ((Vector3)(ref val)).magnitude; float closedBarrierRadius = GetClosedBarrierRadius(selectedDomain); if (magnitude <= closedBarrierRadius) { continue; } Vector3 val2 = ((magnitude > 0.01f) ? (val / magnitude) : Vector3.forward); Vector3 val3 = domainCenter + val2 * Mathf.Max(2f, closedBarrierRadius - 1.5f); val3.y = ((Component)key).transform.position.y; ((Component)key).transform.position = Vector3.Lerp(((Component)key).transform.position, val3, 0.62f); object memberValue = GetMemberValue(key, "agent"); MethodInfo methodInfo = memberValue?.GetType().GetMethod("Warp", new Type[1] { typeof(Vector3) }); if (methodInfo != null) { try { methodInfo.Invoke(memberValue, new object[1] { ((Component)key).transform.position }); } catch { } } } } private void ApplyDomainEffect() { switch (selectedDomain) { case DomainKind.InfiniteVoid: if (domainAffectsGameplay) { FreezeEnemiesInRadius(26f, 1f); } if (IsLocalCaster()) { RefillSprint(); } break; case DomainKind.MalevolentShrineOpen: if (domainAffectsGameplay) { DamageEnemiesInRadius(55f, 3); } if (domainAffectsGameplay) { DamagePlayersInRadiusFromHost(55f, 3); } break; case DomainKind.MalevolentShrineClosed: if (domainAffectsGameplay) { DamageEnemiesInRadius(19.5f, 8); } if (domainAffectsGameplay) { DamagePlayersInRadiusFromHost(19.5f, 8); } break; case DomainKind.IdleDeathGamble: if (domainAffectsGameplay) { ApplyGambleEffect(); } break; case DomainKind.SelfEmbodimentOfPerfection: if (domainAffectsGameplay) { ApplyLocalSoulDrain(); } break; } } private void InitializeLocalSoulState() { localDirectEnemySoulValues.Clear(); localEnemySoulValues.Clear(); foreach (EnemyAI key in arenaEnemyStates.Keys) { if (!((Object)(object)key == (Object)null) && !IsEnemyDead(key)) { localDirectEnemySoulValues[key] = 100f; localEnemySoulValues[GetLocalEnemyVisualId(key)] = 100f; } } } private void ApplyLocalSoulDrain() { //IL_005e: 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_010b: Unknown result type (might be due to invalid IL or missing references) Transform playerTransform = GetPlayerTransform(casterClientId); if ((Object)(object)playerTransform == (Object)null) { return; } PlayerControllerB player = FindPlayerByActualClientId(casterClientId); foreach (EnemyAI item in new List(localDirectEnemySoulValues.Keys)) { if ((Object)(object)item == (Object)null || IsEnemyDead(item)) { continue; } float num = GetSoulDrainRate(GetHorizontalDistance(playerTransform.position, ((Component)item).transform.position)) * 0.35f; float num2 = Mathf.Max(0f, localDirectEnemySoulValues[item] - num); localDirectEnemySoulValues[item] = num2; localEnemySoulValues[GetLocalEnemyVisualId(item)] = num2; if (num2 <= 0f) { TryKillEnemyFromSoul(item, player); if ((Object)(object)item != (Object)null && !IsEnemyDead(item)) { localDirectEnemySoulValues.Remove(item); localEnemySoulValues.Remove(GetLocalEnemyVisualId(item)); arenaEnemyStates.Remove(item); ForceExileSoulEnemy(item, domainCenter); } } } } private static ulong GetLocalEnemyVisualId(EnemyAI enemy) { if (TryGetEnemyNetworkObjectId(enemy, out var networkObjectId)) { return networkObjectId; } return (ulong)(long.MinValue | (uint)((Object)enemy).GetInstanceID()); } private void ApplyGambleEffect() { if (IsLocalCaster()) { RefillSprint(); } gambleTimer -= 0.35f; if (!(gambleTimer > 0f)) { gambleTimer = 4.2f; jackpotRoll = RollIdleDeathGambleNumber(); HandleGambleRoll(jackpotRoll); } } private void HandleGambleRoll(int roll) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) PlaySlotRollSound(domainCenter); bool flag = IsJackpotRoll(roll); ShowGambleRoll(roll, flag); TriggerIdleDeathGambleRollVisual(roll, flag); if (flag) { StartJackpotRegeneration(roll); if (domainAffectsGameplay) { FreezeEnemiesInRadius(26f, 1.2f); } statusText = "JACKPOT " + roll + ": regeneration for 1m 40s."; ShowTip("JACKPOT", statusText); if (domainAffectsGameplay) { CloseIdleDeathGambleAfterJackpot(); } else if (domainOpen || (Object)(object)domainRoot != (Object)null) { ShatterDomainOnJackpot(); } } else if (roll % 7 == 0) { if (IsLocalCaster()) { HealLocalPlayer(20); } statusText = "Lucky roll " + roll + ": small heal."; } else { statusText = "Idle Death Gamble roll: " + roll + "."; } } private void TriggerIdleDeathGambleRollVisual(int roll, bool jackpot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //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_0040: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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) idleDeathGambleRollPulse = (jackpot ? 1.7f : 1f); GameObject val = new GameObject(jackpot ? "Idle Death Gamble Jackpot World Visual" : "Idle Death Gamble Roll World Visual"); val.transform.position = domainCenter + Vector3.up * 3.6f; TextMesh val2 = val.AddComponent(); val2.richText = true; val2.text = (jackpot ? ("JACKPOT\n" + roll + "") : ("" + roll + "")); val2.fontSize = 72; val2.characterSize = (jackpot ? 0.22f : 0.18f); val2.anchor = (TextAnchor)4; val2.alignment = (TextAlignment)1; val2.color = Color.white; CreateBurstParticleEffect(jackpot ? "Jackpot Gold White Burst" : "Gamble Roll White Burst", val.transform, Vector3.zero, Quaternion.identity, (Color)(jackpot ? new Color(1f, 0.72f, 0.08f, 1f) : Color.white), (Color)(jackpot ? Color.white : new Color(0.12f, 1f, 0.46f, 1f)), new Vector2(0.35f, jackpot ? 1.4f : 0.8f), new Vector2(0.05f, jackpot ? 0.22f : 0.13f), new Vector2(2f, jackpot ? 8f : 4.5f), jackpot ? 190 : 70, (ParticleSystemShapeType)0, jackpot ? 1.8f : 0.9f, additive: true, stretched: true); StartRuntimeCoroutine(AnimateGambleRollVisual(val, val2, jackpot)); } private IEnumerator AnimateGambleRollVisual(GameObject visual, TextMesh mesh, bool jackpot) { float duration = (jackpot ? 2.2f : 1.45f); float time = 0f; Vector3 start = visual.transform.position; while ((Object)(object)visual != (Object)null && time < duration) { time += Time.deltaTime; float num = Mathf.Clamp01(time / duration); float num2 = Mathf.Sin(Mathf.Min(1f, num * 2.4f) * MathF.PI * 0.5f); visual.transform.position = start + Vector3.up * (num * (jackpot ? 2.2f : 1.25f)); visual.transform.localScale = Vector3.one * Mathf.Lerp(0.35f, jackpot ? 1.55f : 1.05f, num2); Camera main = Camera.main; if ((Object)(object)main != (Object)null) { Vector3 val = visual.transform.position - ((Component)main).transform.position; if (((Vector3)(ref val)).sqrMagnitude > 0.001f) { visual.transform.rotation = Quaternion.LookRotation(((Vector3)(ref val)).normalized); } } Color color = mesh.color; color.a = 1f - Mathf.SmoothStep(0.62f, 1f, num); mesh.color = color; yield return null; } if ((Object)(object)visual != (Object)null) { Object.Destroy((Object)(object)visual); } } private int RollIdleDeathGambleNumber() { int result = Random.Range(1, 778); if (Random.value < 0.065f) { return Random.Range(1, 8) * 111; } return result; } private static bool IsJackpotRoll(int roll) { if (roll >= 111 && roll <= 777) { return roll % 111 == 0; } return false; } private void CloseIdleDeathGambleAfterJackpot() { ShatterDomainOnJackpot(); } private void ShatterDomainOnJackpot() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_0019: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_0141: 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_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: 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_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) DomainStyle domainStyle = GetDomainStyle(DomainKind.IdleDeathGamble); GameObject val = new GameObject("Idle Death Gamble Jackpot Shatter"); val.transform.position = domainCenter; List list = new List(); List list2 = new List(); Vector3 localPosition = default(Vector3); for (int i = 0; i < 64; i++) { float num = (float)i * MathF.PI * 2f / 64f; float num2 = 3.5f + (float)(i % 8) * 2.5f; float num3 = 0.6f + (float)(i % 7) * 0.72f; ((Vector3)(ref localPosition))..ctor(Mathf.Cos(num) * num2, num3, Mathf.Sin(num) * num2); GameObject val2 = CreateCube("Jackpot Barrier Shard", localPosition, new Vector3(0.18f, 0.9f + (float)(i % 3) * 0.35f, 0.08f), domainStyle.AccentColor, val.transform); val2.transform.localRotation = Quaternion.Euler((float)i * 17f, (0f - num) * 57.29578f, 25f + (float)i * 9f); list.Add(val2.transform); list2.Add(new Vector3(Mathf.Cos(num), 0.35f + (float)(i % 5) * 0.12f, Mathf.Sin(num)) * (4.5f + (float)(i % 7) * 0.65f)); } CreateBurstParticleEffect("Idle Death Gamble Jackpot Barrier Flash", val.transform, Vector3.up * 3.2f, Quaternion.identity, Color.white, new Color(1f, 0.82f, 0.12f, 1f), new Vector2(0.45f, 1.6f), new Vector2(0.08f, 0.34f), new Vector2(4f, 11f), 260, (ParticleSystemShapeType)0, 2.4f, additive: true, stretched: true); Light val3 = val.AddComponent(); val3.type = (LightType)2; val3.color = domainStyle.LightColor; val3.intensity = 16f; val3.range = 36.399998f; StartRuntimeCoroutine(AnimateJackpotShatter(val, list, list2, val3)); if (activeDomainSessionId != 0L) { DisableDomainExteriorBarrierColliders(activeDomainSessionId); } RestoreRemotePlayerRepresentationsFromArena(); RestoreEntitiesFromDomainArena(); if ((Object)(object)domainRoot != (Object)null) { Object.Destroy((Object)(object)domainRoot); domainRoot = null; } if (activeDomainSessionId != 0L) { DestroyDomainExteriorBarrier(activeDomainSessionId); } openingRoot = null; domainLight = null; domainOpen = false; openingActive = false; domainVisualBuilt = false; domainAffectsGameplay = false; domainArenaActivated = false; localPlayerInDomainArena = false; localPlayerReturnCaptured = false; activeDomainSessionId = 0uL; activeDomainArenaCenter = Vector3.zero; domainParticipantSourcePositions.Clear(); domainTimeLeft = 0f; RestoreEnemySpeeds(); RestoreDomainEnvironmentRendering(); RestoreDomainAtmosphere(); } private IEnumerator AnimateJackpotShatter(GameObject root, List shards, List velocities, Light burst) { float time = 0f; while ((Object)(object)root != (Object)null && time < 2.8f) { float deltaTime = Time.deltaTime; time += deltaTime; float num = Mathf.Clamp01(time / 2.8f); for (int i = 0; i < shards.Count; i++) { Transform val = shards[i]; if (!((Object)(object)val == (Object)null)) { int index = i; velocities[index] += Vector3.down * (2.8f * deltaTime); val.localPosition += velocities[i] * deltaTime; val.Rotate(new Vector3(110f + (float)i * 3f, 160f - (float)i, 90f + (float)i * 2f) * deltaTime, (Space)1); val.localScale *= Mathf.Lerp(1f, 0.985f, num); } } if ((Object)(object)burst != (Object)null) { burst.intensity = Mathf.Lerp(16f, 0f, num); } yield return null; } if ((Object)(object)root != (Object)null) { Object.Destroy((Object)(object)root); } } private void StartJackpotRegeneration(int roll) { jackpotRegenTimeLeft = 100f; jackpotRegenTick = 0f; jackpotRegenClientId = casterClientId; StartJackpotSound(); if (ShouldApplyJackpotRegenerationToLocal()) { HealLocalPlayer(90); SetLocalPlayerHealthAtLeast(92); RefillSprint(); } Log.LogInfo((object)("Idle Death Gamble jackpot started from roll " + roll + " for client " + jackpotRegenClientId + ".")); } private void ApplyJackpotRegeneration() { if (jackpotRegenTimeLeft <= 0f) { return; } jackpotRegenTimeLeft -= Time.unscaledDeltaTime; if (jackpotRegenTimeLeft <= 0f) { jackpotRegenTimeLeft = 0f; jackpotRegenClientId = ulong.MaxValue; StopJackpotSound(); statusText = "Jackpot regeneration ended."; ShowTip("Jackpot ended", "Regeneration finished."); return; } if (ShouldApplyJackpotRegenerationToLocal()) { SetLocalPlayerHealthAtLeast(92); ClearLocalPlayerCriticalHealthState(); } jackpotRegenTick -= Time.unscaledDeltaTime; if (!(jackpotRegenTick > 0f)) { jackpotRegenTick = 0.1f; if (ShouldApplyJackpotRegenerationToLocal()) { HealLocalPlayer(32); SetLocalPlayerHealthAtLeast(92); RestoreSprint(0.6f); } } } private bool ShouldApplyJackpotRegenerationToLocal() { if (jackpotRegenClientId == ulong.MaxValue) { return false; } NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening) { return true; } return jackpotRegenClientId == singleton.LocalClientId; } private void FreezeEnemiesInRadius(float radius, float stunTimer) { //IL_001e: 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) EnemyAI[] array = Object.FindObjectsOfType(); foreach (EnemyAI val in array) { if ((Object)(object)val == (Object)null || Vector3.Distance(domainCenter, ((Component)val).transform.position) > radius) { continue; } object memberValue = GetMemberValue(val, "agent"); PropertyInfo propertyInfo = memberValue?.GetType().GetProperty("speed"); if (propertyInfo != null && propertyInfo.CanRead && propertyInfo.CanWrite) { if (!originalEnemySpeeds.ContainsKey(val) && propertyInfo.GetValue(memberValue, null) is float value) { originalEnemySpeeds[val] = value; } propertyInfo.SetValue(memberValue, 0f, null); } SetMemberValue(val, "stunNormalizedTimer", Mathf.Max(stunTimer, 0.2f)); } } private void DamageEnemiesInRadius(float radius, int damage) { //IL_002a: 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) PlayerControllerB player = StartOfRound.Instance?.localPlayerController; EnemyAI[] array = Object.FindObjectsOfType(); foreach (EnemyAI val in array) { if (!((Object)(object)val == (Object)null) && !(Vector3.Distance(domainCenter, ((Component)val).transform.position) > radius)) { TryDamageEnemy(val, damage, player); } } } private void DamagePlayersInRadiusFromHost(float radius, int damage) { //IL_0076: 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_00ec: Unknown result type (might be due to invalid IL or missing references) if (openingActive) { return; } NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && singleton.IsListening && !singleton.IsServer) { return; } StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null || instance.allPlayerScripts == null) { DamageLocalPlayerInRadius(radius, damage); return; } PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && !IsPlayerDead(val) && !(Vector3.Distance(domainCenter, ((Component)val).transform.position) > radius) && (!TryGetPlayerClientId(val, out var clientId) || clientId != casterClientId)) { bool flag = (Object)(object)val == (Object)(object)StartOfRound.Instance?.localPlayerController; if ((Object)(object)singleton != (Object)null && singleton.IsListening && TryGetPlayerClientId(val, out clientId) && clientId != singleton.LocalClientId) { SendShrineDamage(clientId, damage, domainCenter, radius, casterClientId); } else if (flag) { TryDamageLocalPlayer(damage); } else { TryDamagePlayer(val, damage); } } } } private void DamageLocalPlayerInRadius(float radius, int damage) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) if (!openingActive && !IsLocalCaster()) { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val == (Object)null) && !(Vector3.Distance(domainCenter, ((Component)val).transform.position) > radius)) { TryDamageLocalPlayer(damage); } } } private static void TryDamageEnemy(EnemyAI enemy, int damage, PlayerControllerB? player) { if (!TryInvokeEnemyMethod(enemy, "HitEnemy", damage, player)) { Log.LogWarning((object)("Could not find a compatible HitEnemy method for " + ((object)enemy).GetType().FullName + ".")); } } private static void TryKillEnemyFromSoul(EnemyAI enemy, PlayerControllerB? player) { if ((Object)(object)enemy == (Object)null || IsEnemyDead(enemy)) { return; } TryDamageEnemy(enemy, 100000, player); if (!IsEnemyDead(enemy)) { bool flag = TryInvokeEnemyMethod(enemy, "KillEnemyServerRpc", 0, player); if (!IsEnemyDead(enemy)) { flag |= TryInvokeEnemyMethod(enemy, "KillEnemyOnOwnerClient", 0, player); } if (!IsEnemyDead(enemy)) { flag |= TryInvokeEnemyMethod(enemy, "KillEnemy", 0, player); } if (!flag) { Log.LogWarning((object)("Soul reached zero, but no compatible kill method was found for " + ((object)enemy).GetType().FullName + ".")); } } } private static void ForceExileSoulEnemy(EnemyAI enemy, Vector3 anchor) { //IL_0022: 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_003e: 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) if ((Object)(object)enemy == (Object)null) { return; } string text = ((object)enemy).GetType().FullName ?? ((Object)enemy).name; Vector3 position = default(Vector3); ((Vector3)(ref position))..ctor(anchor.x, Mathf.Min(anchor.y - 1500f, -1500f), anchor.z); try { object? memberValue = GetMemberValue(enemy, "agent"); NavMeshAgent val = (NavMeshAgent)((memberValue is NavMeshAgent) ? memberValue : null); if (val != null && ((Behaviour)val).enabled) { try { val.ResetPath(); } catch { } ((Behaviour)val).enabled = false; } TeleportEnemySafely(enemy, position); SetMemberValue(enemy, "isEnemyDead", true); Collider[] componentsInChildren = ((Component)enemy).GetComponentsInChildren(true); foreach (Collider val2 in componentsInChildren) { if ((Object)(object)val2 != (Object)null) { val2.enabled = false; } } NetworkObject val3 = ((Component)enemy).GetComponent() ?? ((Component)enemy).GetComponentInParent(); NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)val3 != (Object)null && val3.IsSpawned && (Object)(object)singleton != (Object)null && singleton.IsServer) { val3.Despawn(true); Log.LogInfo((object)("Soul exile despawned unkillable entity " + text + ".")); } else { ((Component)enemy).gameObject.SetActive(false); Log.LogInfo((object)("Soul exile disabled unkillable entity " + text + " outside the map.")); } } catch (Exception ex) { if ((Object)(object)enemy != (Object)null) { ((Component)enemy).gameObject.SetActive(false); } Log.LogWarning((object)("Soul exile fallback failed for " + text + ": " + ex.GetBaseException().Message)); } } private static bool TryInvokeEnemyMethod(EnemyAI enemy, string methodName, int damage, PlayerControllerB? player) { //IL_0153: Unknown result type (might be due to invalid IL or missing references) MethodInfo[] methods = ((object)enemy).GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (methodInfo.Name != methodName || methodInfo.ContainsGenericParameters) { continue; } ParameterInfo[] parameters = methodInfo.GetParameters(); object[] array = new object[parameters.Length]; bool flag = true; for (int j = 0; j < parameters.Length; j++) { ParameterInfo parameterInfo = parameters[j]; Type parameterType = parameterInfo.ParameterType; string text = parameterInfo.Name?.ToLowerInvariant() ?? string.Empty; if (parameterType.IsByRef || parameterInfo.IsOut) { flag = false; break; } if (parameterType == typeof(int)) { array[j] = ((text.Contains("hitid") || text.EndsWith("id")) ? (-1) : damage); } else if (parameterType == typeof(PlayerControllerB)) { array[j] = player; } else if (parameterType == typeof(bool)) { array[j] = false; } else if (parameterType == typeof(float)) { array[j] = (float)damage; } else if (parameterType == typeof(Vector3)) { array[j] = Vector3.zero; } else if (parameterType.IsEnum) { array[j] = Enum.ToObject(parameterType, 0); } else if (parameterInfo.HasDefaultValue) { array[j] = parameterInfo.DefaultValue; } else if (!parameterType.IsValueType) { array[j] = null; } else { array[j] = Activator.CreateInstance(parameterType); } } if (flag) { try { methodInfo.Invoke(enemy, array); return true; } catch (Exception ex) { Log.LogDebug((object)(methodName + " invocation failed for " + ((object)enemy).GetType().Name + ": " + ex.GetBaseException().Message)); } } } return false; } private static void TryDamageLocalPlayer(int damage) { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val == (Object)null) && !TryDamagePlayer(val, damage) && GetMemberValue(val, "health") is int num) { int num2 = Mathf.Max(0, num - damage); SetMemberValue(val, "health", num2); TryUpdateHealthUi(num2); if (num2 <= 0) { TryKillLocalPlayer(); } } } private static bool TryDamagePlayer(PlayerControllerB player, int damage) { //IL_010b: Unknown result type (might be due to invalid IL or missing references) MethodInfo[] methods = ((object)player).GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (methodInfo.Name != "DamagePlayer") { continue; } ParameterInfo[] parameters = methodInfo.GetParameters(); object[] array = new object[parameters.Length]; for (int j = 0; j < parameters.Length; j++) { Type parameterType = parameters[j].ParameterType; string text = parameters[j].Name?.ToLowerInvariant() ?? string.Empty; if (parameterType == typeof(int)) { array[j] = ((j == 0 || text.Contains("damage")) ? damage : 0); } else if (parameterType == typeof(bool)) { array[j] = text.Contains("sfx") || text.Contains("rpc") || text.Contains("call"); } else if (parameterType == typeof(Vector3)) { array[j] = Vector3.zero; } else if (parameterType.IsEnum) { array[j] = Enum.ToObject(parameterType, 0); } else if (parameterType == typeof(float)) { array[j] = 0f; } else { array[j] = (parameters[j].HasDefaultValue ? parameters[j].DefaultValue : null); } } try { methodInfo.Invoke(player, array); if (GetMemberValue(player, "health") is int health) { TryUpdateHealthUi(health); } return true; } catch { } } return false; } private static void TryUpdateHealthUi(int health) { try { HUDManager instance = HUDManager.Instance; if ((Object)(object)instance == (Object)null) { return; } MethodInfo[] methods = ((object)instance).GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (!(methodInfo.Name != "UpdateHealthUI")) { ParameterInfo[] parameters = methodInfo.GetParameters(); if (parameters.Length == 1 && parameters[0].ParameterType == typeof(int)) { methodInfo.Invoke(instance, new object[1] { health }); break; } if (parameters.Length == 2 && parameters[0].ParameterType == typeof(int) && parameters[1].ParameterType == typeof(bool)) { methodInfo.Invoke(instance, new object[2] { health, false }); break; } } } } catch { } } private static void TryKillLocalPlayer() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if ((Object)(object)val == (Object)null) { return; } MethodInfo[] methods = ((object)val).GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { if (methodInfo.Name != "KillPlayer") { continue; } ParameterInfo[] parameters = methodInfo.GetParameters(); object[] array = new object[parameters.Length]; for (int j = 0; j < parameters.Length; j++) { Type parameterType = parameters[j].ParameterType; if (parameterType == typeof(Vector3)) { array[j] = Vector3.zero; } else if (parameterType == typeof(bool)) { array[j] = true; } else if (parameterType.IsEnum) { array[j] = Enum.ToObject(parameterType, 0); } else { array[j] = (parameterType.IsValueType ? Activator.CreateInstance(parameterType) : null); } } try { methodInfo.Invoke(val, array); break; } catch { } } } private void RestoreEnemySpeeds() { foreach (KeyValuePair originalEnemySpeed in originalEnemySpeeds) { if (!((Object)(object)originalEnemySpeed.Key == (Object)null)) { object memberValue = GetMemberValue(originalEnemySpeed.Key, "agent"); PropertyInfo propertyInfo = memberValue?.GetType().GetProperty("speed"); if (propertyInfo != null && propertyInfo.CanWrite) { propertyInfo.SetValue(memberValue, originalEnemySpeed.Value, null); } } } originalEnemySpeeds.Clear(); } private static void RefillSprint() { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if ((Object)(object)val != (Object)null) { SetMemberValue(val, "sprintMeter", 1f); } } private static void RestoreSprint(float amount) { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val == (Object)null) && GetMemberValue(val, "sprintMeter") is float num) { SetMemberValue(val, "sprintMeter", Mathf.Clamp01(num + amount)); } } private static void HealLocalPlayer(int amount) { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val == (Object)null) && GetMemberValue(val, "health") is int num && num > 0) { SetLocalPlayerHealth(Mathf.Min(100, num + amount)); ClearLocalPlayerCriticalHealthState(); } } private static void SetLocalPlayerHealthAtLeast(int minimumHealth) { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val == (Object)null) && GetMemberValue(val, "health") is int num && num > 0 && num < minimumHealth) { SetLocalPlayerHealth(minimumHealth); } } private static void SetLocalPlayerHealth(int health) { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val == (Object)null)) { int num = Mathf.Clamp(health, 1, 100); SetMemberValue(val, "health", num); TryUpdateHealthUi(num); } } private static void ClearLocalPlayerCriticalHealthState() { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val == (Object)null)) { SetMemberValue(val, "criticallyInjured", false); SetMemberValue(val, "hasBeenCriticallyInjured", false); SetMemberValue(val, "bleedingHeavily", false); SetMemberValue(val, "isBleeding", false); if (GetMemberValue(val, "health") is int health) { TryUpdateHealthUi(health); } } } private void HideDomainEnvironmentRenderers() { if (!HasClosedBarrier() || (Object)(object)domainRoot == (Object)null) { return; } int count = hiddenDomainRenderers.Count; int count2 = hiddenDomainLights.Count; int count3 = hiddenDomainTerrains.Count; Renderer[] array = Object.FindObjectsOfType(); foreach (Renderer val in array) { if (!((Object)(object)val == (Object)null) && val.enabled && !ShouldPreserveDomainRenderer(val)) { hiddenDomainRenderers[val] = true; val.enabled = false; } } Light[] array2 = Object.FindObjectsOfType(); foreach (Light val2 in array2) { if (!((Object)(object)val2 == (Object)null) && ((Behaviour)val2).enabled && !IsPartOfDomainVisual(((Component)val2).transform) && !IsGameplayActorTransform(((Component)val2).transform)) { hiddenDomainLights[val2] = true; ((Behaviour)val2).enabled = false; } } Type type = Type.GetType("UnityEngine.Terrain, UnityEngine.TerrainModule"); if (type != null) { Object[] array3 = Object.FindObjectsOfType(type); foreach (Object obj in array3) { Behaviour val3 = (Behaviour)(object)((obj is Behaviour) ? obj : null); if (val3 != null && val3.enabled) { hiddenDomainTerrains.Add(new HiddenTerrainState { Terrain = val3, WasEnabled = true }); val3.enabled = false; } } } if (!skyboxCaptured) { originalSkybox = RenderSettings.skybox; skyboxCaptured = true; } RenderSettings.skybox = domainSkyboxMaterial; int num = hiddenDomainRenderers.Count - count; int num2 = hiddenDomainLights.Count - count2; int num3 = hiddenDomainTerrains.Count - count3; if (num > 0 || num2 > 0 || num3 > 0) { Log.LogInfo((object)("Domain render isolation hid " + num + " renderers, " + num2 + " lights, and " + num3 + " terrains.")); } } private bool ShouldPreserveDomainRenderer(Renderer renderer) { if (IsPartOfDomainVisual(((Component)renderer).transform)) { return true; } return IsGameplayActorTransform(((Component)renderer).transform); } private bool IsPartOfDomainVisual(Transform transformToCheck) { if ((Object)(object)domainRoot != (Object)null && ((Object)(object)transformToCheck == (Object)(object)domainRoot.transform || transformToCheck.IsChildOf(domainRoot.transform))) { return true; } foreach (GameObject value in domainExteriorRoots.Values) { if ((Object)(object)value != (Object)null && ((Object)(object)transformToCheck == (Object)(object)value.transform || transformToCheck.IsChildOf(value.transform))) { return true; } } if ((Object)(object)domainCameraBackdropRoot != (Object)null && ((Object)(object)transformToCheck == (Object)(object)domainCameraBackdropRoot.transform || transformToCheck.IsChildOf(domainCameraBackdropRoot.transform))) { return true; } if ((Object)(object)shrineCameraVfxRoot != (Object)null && ((Object)(object)transformToCheck == (Object)(object)shrineCameraVfxRoot.transform || transformToCheck.IsChildOf(shrineCameraVfxRoot.transform))) { return true; } return false; } private static bool IsGameplayActorTransform(Transform transformToCheck) { if ((Object)(object)((Component)transformToCheck).GetComponentInParent() != (Object)null) { return true; } if ((Object)(object)((Component)transformToCheck).GetComponentInParent() != (Object)null) { return true; } if ((Object)(object)((Component)transformToCheck).GetComponentInParent() != (Object)null) { return true; } return false; } private void RestoreDomainEnvironmentRendering() { //IL_0174: 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) foreach (KeyValuePair hiddenDomainRenderer in hiddenDomainRenderers) { if ((Object)(object)hiddenDomainRenderer.Key != (Object)null) { hiddenDomainRenderer.Key.enabled = hiddenDomainRenderer.Value; } } hiddenDomainRenderers.Clear(); foreach (KeyValuePair hiddenDomainLight in hiddenDomainLights) { if ((Object)(object)hiddenDomainLight.Key != (Object)null) { ((Behaviour)hiddenDomainLight.Key).enabled = hiddenDomainLight.Value; } } hiddenDomainLights.Clear(); foreach (HiddenTerrainState hiddenDomainTerrain in hiddenDomainTerrains) { if ((Object)(object)hiddenDomainTerrain.Terrain != (Object)null) { hiddenDomainTerrain.Terrain.enabled = hiddenDomainTerrain.WasEnabled; } } hiddenDomainTerrains.Clear(); if (skyboxCaptured) { RenderSettings.skybox = originalSkybox; originalSkybox = null; skyboxCaptured = false; } if ((Object)(object)domainSkyboxMaterial != (Object)null) { Object.Destroy((Object)(object)domainSkyboxMaterial); domainSkyboxMaterial = null; } if (domainCameraCaptured) { if ((Object)(object)domainGameplayCamera != (Object)null) { domainGameplayCamera.clearFlags = originalCameraClearFlags; domainGameplayCamera.backgroundColor = originalCameraBackgroundColor; } domainGameplayCamera = null; domainCameraCaptured = false; } } private void ApplyDomainAtmosphere(DomainStyle style) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (!atmosphereCaptured) { atmosphereCaptured = true; originalFogEnabled = RenderSettings.fog; originalFogMode = RenderSettings.fogMode; originalFogColor = RenderSettings.fogColor; originalFogDensity = RenderSettings.fogDensity; originalAmbientLight = RenderSettings.ambientLight; } if (HasClosedBarrier() && !skyboxCaptured) { originalSkybox = RenderSettings.skybox; skyboxCaptured = true; } EnforceDomainAtmosphere(); } private void EnforceDomainAtmosphere() { //IL_0055: 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_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0171: 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) RenderSettings.fog = true; RenderSettings.fogMode = (FogMode)3; if (HasClosedBarrier()) { RenderSettings.skybox = domainSkyboxMaterial; } switch (selectedDomain) { case DomainKind.InfiniteVoid: RenderSettings.fogColor = new Color(0.001f, 0.002f, 0.012f, 1f); RenderSettings.fogDensity = 0.008f; RenderSettings.ambientLight = new Color(0.006f, 0.008f, 0.025f, 1f); break; case DomainKind.MalevolentShrineClosed: RenderSettings.fogColor = new Color(0.018f, 0f, 0f, 1f); RenderSettings.fogDensity = 0.014f; RenderSettings.ambientLight = new Color(0.025f, 0.002f, 0.001f, 1f); break; case DomainKind.MalevolentShrineOpen: RenderSettings.fogColor = new Color(0.028f, 0.001f, 0f, 1f); RenderSettings.fogDensity = 0.01f; RenderSettings.ambientLight = new Color(0.035f, 0.004f, 0.002f, 1f); break; case DomainKind.IdleDeathGamble: RenderSettings.fogColor = new Color(0.82f, 0.86f, 0.88f, 1f); RenderSettings.fogDensity = 0.006f; RenderSettings.ambientLight = new Color(0.72f, 0.76f, 0.78f, 1f); break; case DomainKind.SelfEmbodimentOfPerfection: RenderSettings.fogColor = new Color(0.035f, 0.006f, 0.05f, 1f); RenderSettings.fogDensity = 0.008f; RenderSettings.ambientLight = new Color(0.1f, 0.025f, 0.13f, 1f); break; } } private void RestoreDomainAtmosphere() { //IL_0015: 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_0036: Unknown result type (might be due to invalid IL or missing references) if (atmosphereCaptured) { RenderSettings.fog = originalFogEnabled; RenderSettings.fogMode = originalFogMode; RenderSettings.fogColor = originalFogColor; RenderSettings.fogDensity = originalFogDensity; RenderSettings.ambientLight = originalAmbientLight; atmosphereCaptured = false; } } private bool IsHostManagingActiveDomain() { if (activeDomainSessionId != 0L) { return hostDomainSessions.ContainsKey(activeDomainSessionId); } return false; } private void StartHostDomainSession(DomainKind domain, Vector3 sourceCenter, ulong casterId, float duration, Dictionary participants) { //IL_003b: 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_003c: 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_005e: 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_0065: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) ulong num = nextHostDomainSessionId++; if (num == 0L) { num = nextHostDomainSessionId++; } Vector3 val = ((domain == DomainKind.MalevolentShrineOpen) ? sourceCenter : GetSessionArenaCenter(num)); float num2 = Time.realtimeSinceStartup + 2.35f; HostDomainSession hostDomainSession = new HostDomainSession { Id = num, Domain = domain, SourceCenter = sourceCenter, ArenaCenter = val, CasterId = casterId, Duration = duration, TimeLeft = duration + 2.35f, OpeningTimeLeft = 2.35f, OpeningEndRealtime = num2, EndRealtime = num2 + duration, EffectTimeLeft = 0f, GambleTimeLeft = 0f }; foreach (KeyValuePair participant in participants) { hostDomainSession.Participants[participant.Key] = participant.Value; } PopulateSessionParticipantClientIds(hostDomainSession); hostDomainSessions[num] = hostDomainSession; RegisterKnownDomainSession(hostDomainSession); if (domain != DomainKind.MalevolentShrineOpen) { EnsureSessionDomainArena(num, domain, val); } int localPlayerSlot = GetLocalPlayerSlot(); if (localPlayerSlot != int.MinValue && hostDomainSession.Participants.ContainsKey(localPlayerSlot)) { OpenDomainLocal(domain, sourceCenter, casterId, affectsGameplay: false, duration, hostDomainSession.Participants, num, val); } BroadcastOpenDomain(hostDomainSession); Log.LogInfo((object)("Started host domain session " + num + ": " + GetDomainName(domain) + ", caster=" + casterId + ", participants=" + hostDomainSession.Participants.Count + ".")); } private void PopulateSessionParticipantClientIds(HostDomainSession session) { StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance != (Object)null && instance.allPlayerScripts != null) { PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && session.Participants.ContainsKey(GetPlayerSlot(val)) && TryGetPlayerClientId(val, out var clientId)) { session.ParticipantClientIds.Add(clientId); } } } session.ParticipantClientIds.Add(session.CasterId); } private void RegisterKnownDomainSession(NetworkDomainSession session) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) knownDomainSessions[session.Id] = session; if (session.Domain != DomainKind.MalevolentShrineOpen && pendingExteriorBarrierSessions.Add(session.Id) && !StartRuntimeCoroutine(CreateClosedDomainExteriorBarrierAfterTeleport(session.Id, session.Domain, session.SourceCenter))) { pendingExteriorBarrierSessions.Remove(session.Id); } } private void RemoveKnownDomainSession(ulong sessionId) { pendingExteriorBarrierSessions.Remove(sessionId); DestroyDomainExteriorBarrier(sessionId); knownDomainSessions.Remove(sessionId); } private static void RestoreSessionRemotePlayerRepresentations(NetworkDomainSession session) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null || instance.allPlayerScripts == null) { return; } PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && !((Object)(object)val == (Object)(object)instance.localPlayerController) && session.Participants.TryGetValue(GetPlayerSlot(val), out var value)) { ((Component)val).transform.position = value; EnsureRemoteParticipantVisible(val); } } } private void ClearKnownDomainSessions() { DestroyAllDomainExteriorBarriers(); knownDomainSessions.Clear(); } private void UpdateHostDomainSessions() { NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || hostDomainSessions.Count == 0) { return; } List list = new List(); foreach (HostDomainSession item in new List(hostDomainSessions.Values)) { PlayerControllerB val = FindPlayerByActualClientId(item.CasterId); if ((Object)(object)val != (Object)null && IsPlayerDead(val)) { Log.LogInfo((object)("Closing domain session " + item.Id + " because caster " + item.CasterId + " died.")); list.Add(item.Id); continue; } float realtimeSinceStartup = Time.realtimeSinceStartup; item.TimeLeft = item.EndRealtime - realtimeSinceStartup; if (!item.ArenaActivated) { item.OpeningTimeLeft = item.OpeningEndRealtime - realtimeSinceStartup; if (item.OpeningTimeLeft <= 0f) { ActivateHostDomainSession(item); } } if (item.ArenaActivated) { item.EffectTimeLeft -= Time.unscaledDeltaTime; if (item.EffectTimeLeft <= 0f) { item.EffectTimeLeft = 0.35f; ApplyHostDomainSessionEffect(item); } if (item.Domain == DomainKind.IdleDeathGamble) { UpdateHostGambleSession(item, list); } } if (item.TimeLeft <= 0f) { list.Add(item.Id); } } foreach (ulong item2 in new HashSet(list)) { CloseHostDomainSession(item2, broadcast: true); } } private void ActivateHostDomainSession(HostDomainSession session) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (session.ArenaActivated) { return; } session.ArenaActivated = true; if (session.Domain != DomainKind.MalevolentShrineOpen) { EnsureSessionDomainArena(session.Id, session.Domain, session.ArenaCenter); SyncArenaPhysics(); CaptureHostSessionEntities(session); if (session.Domain == DomainKind.SelfEmbodimentOfPerfection) { InitializeHostSoulSession(session); } } } private void CloseUnnetworkedDomainIfCasterDied() { if (domainOpen && activeDomainSessionId == 0L) { PlayerControllerB val = FindPlayerByActualClientId(casterClientId); if (!((Object)(object)val == (Object)null) && IsPlayerDead(val)) { Log.LogInfo((object)"Closing local domain because its caster died."); CloseDomain(broadcast: false); } } } private void ApplyHostDomainSessionEffect(HostDomainSession session) { //IL_002f: 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_0061: Unknown result type (might be due to invalid IL or missing references) switch (session.Domain) { case DomainKind.InfiniteVoid: FreezeHostSessionEnemies(session, 1f); break; case DomainKind.MalevolentShrineOpen: DamageEnemiesAt(session.SourceCenter, 55f, 3); DamagePlayersAtFromHost(session.SourceCenter, 55f, 3, session.CasterId); break; case DomainKind.MalevolentShrineClosed: DamageHostSessionEnemies(session, 8); DamagePlayersAtFromHost(session.ArenaCenter, 19.5f, 8, session.CasterId); break; case DomainKind.SelfEmbodimentOfPerfection: ApplyHostSoulDrain(session); break; case DomainKind.IdleDeathGamble: break; } } private void InitializeHostSoulSession(HostDomainSession session) { session.PlayerSoulValues.Clear(); session.EnemySoulValues.Clear(); session.SoulDeathsSent.Clear(); foreach (ulong participantClientId in session.ParticipantClientIds) { if (participantClientId != session.CasterId) { PlayerControllerB val = FindPlayerByActualClientId(participantClientId); if ((Object)(object)val != (Object)null && !IsPlayerDead(val)) { session.PlayerSoulValues[participantClientId] = 100f; } } } foreach (EnemyAI key in session.EnemyStates.Keys) { if ((Object)(object)key != (Object)null && !IsEnemyDead(key)) { session.EnemySoulValues[key] = 100f; } } session.EffectTimeLeft = 0.35f; BroadcastSoulState(session); Log.LogInfo((object)("Initialized soul state for session " + session.Id + ": players=" + session.PlayerSoulValues.Count + ", enemies=" + session.EnemySoulValues.Count + ".")); } private void ApplyHostSoulDrain(HostDomainSession session) { //IL_0068: 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_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = FindPlayerByActualClientId(session.CasterId); if ((Object)(object)val == (Object)null || IsPlayerDead(val)) { return; } foreach (ulong item in new List(session.PlayerSoulValues.Keys)) { PlayerControllerB val2 = FindPlayerByActualClientId(item); if ((Object)(object)val2 == (Object)null || IsPlayerDead(val2)) { continue; } float num = GetSoulDrainRate(GetHorizontalDistance(((Component)val).transform.position, ((Component)val2).transform.position)) * 0.35f; float num2 = Mathf.Max(0f, session.PlayerSoulValues[item] - num); session.PlayerSoulValues[item] = num2; if (!(num2 > 0f) && session.SoulDeathsSent.Add(item)) { NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && item == singleton.LocalClientId) { TryKillLocalPlayer(); } else { SendSoulDeath(item, session.Id, session.CasterId); } Log.LogInfo((object)("Soul reached zero for player " + item + " in session " + session.Id + ".")); } } PlayerControllerB player = FindPlayerByActualClientId(session.CasterId); foreach (EnemyAI item2 in new List(session.EnemySoulValues.Keys)) { if ((Object)(object)item2 == (Object)null || IsEnemyDead(item2)) { continue; } float num3 = GetSoulDrainRate(GetHorizontalDistance(((Component)val).transform.position, ((Component)item2).transform.position)) * 0.35f; float num4 = Mathf.Max(0f, session.EnemySoulValues[item2] - num3); session.EnemySoulValues[item2] = num4; if (num4 <= 0f) { TryKillEnemyFromSoul(item2, player); if ((Object)(object)item2 != (Object)null && !IsEnemyDead(item2)) { session.EnemySoulValues.Remove(item2); session.EnemyStates.Remove(item2); session.EnemySpeeds.Remove(item2); ForceExileSoulEnemy(item2, session.ArenaCenter); } } } BroadcastSoulState(session); } private static float GetHorizontalDistance(Vector3 left, Vector3 right) { //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_0002: 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) Vector3 val = left - right; val.y = 0f; return ((Vector3)(ref val)).magnitude; } private static float GetSoulDrainRate(float distance) { float num = Mathf.Clamp01(distance / 14f); return Mathf.Lerp(20f, 2.75f, num); } private void UpdateHostGambleSession(HostDomainSession session, List sessionsToClose) { session.GambleTimeLeft -= Time.unscaledDeltaTime; if (!(session.GambleTimeLeft > 0f)) { session.GambleTimeLeft = 4.2f; int roll = RollIdleDeathGambleNumber(); BroadcastGambleRoll(session, roll); if (activeDomainSessionId == session.Id) { HandleGambleRoll(roll); } if (IsJackpotRoll(roll)) { sessionsToClose.Add(session.Id); } } } private void CaptureHostSessionEntities(HostDomainSession session) { //IL_0025: 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_005d: 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_0069: 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_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) EnemyAI[] array = Object.FindObjectsOfType(); foreach (EnemyAI val in array) { if (!((Object)(object)val == (Object)null) && !IsEnemyDead(val) && IsWithinArenaCaptureRadius(((Component)val).transform.position, session.SourceCenter)) { Rigidbody component = ((Component)val).GetComponent(); session.EnemyStates[val] = CaptureArenaEntityState(((Component)val).transform, component); TeleportEnemySafely(val, MapPositionIntoArena(((Component)val).transform.position, session.SourceCenter, session.ArenaCenter, session.Domain)); } } GrabbableObject[] array2 = Object.FindObjectsOfType(); foreach (GrabbableObject val2 in array2) { if (!((Object)(object)val2 == (Object)null) && !IsHeldGrabbable(val2) && IsWithinArenaCaptureRadius(((Component)val2).transform.position, session.SourceCenter)) { Rigidbody component2 = ((Component)val2).GetComponent(); session.ItemStates[val2] = CaptureArenaEntityState(((Component)val2).transform, component2); TeleportGrabbableSafely(val2, MapPositionIntoArena(((Component)val2).transform.position, session.SourceCenter, session.ArenaCenter, session.Domain)); } } NetworkObject[] array3 = Object.FindObjectsOfType(); foreach (NetworkObject val3 in array3) { if (!((Object)(object)val3 == (Object)null) && val3.IsSpawned && !((Object)(object)((Component)val3).GetComponentInParent() != (Object)null) && !((Object)(object)((Component)val3).GetComponentInParent() != (Object)null) && !((Object)(object)((Component)val3).GetComponentInParent() != (Object)null)) { Rigidbody component3 = ((Component)val3).GetComponent(); if (!((Object)(object)component3 == (Object)null) && !component3.isKinematic && IsWithinArenaCaptureRadius(((Component)val3).transform.position, session.SourceCenter) && (val3.IsOwnedByServer || val3.IsOwner)) { session.NetworkEntityStates[val3] = CaptureArenaEntityState(((Component)val3).transform, component3); TeleportDynamicNetworkObject(val3, MapPositionIntoArena(((Component)val3).transform.position, session.SourceCenter, session.ArenaCenter, session.Domain)); } } } } private static void FreezeHostSessionEnemies(HostDomainSession session, float stunTimer) { foreach (EnemyAI key in session.EnemyStates.Keys) { if ((Object)(object)key == (Object)null || IsEnemyDead(key)) { continue; } SetMemberValue(key, "stunNormalizedTimer", Mathf.Max(stunTimer, 0.2f)); object? memberValue = GetMemberValue(key, "agent"); NavMeshAgent val = (NavMeshAgent)((memberValue is NavMeshAgent) ? memberValue : null); if (val != null && ((Behaviour)val).enabled) { if (!session.EnemySpeeds.ContainsKey(key)) { session.EnemySpeeds[key] = val.speed; } val.speed = Mathf.Min(val.speed, 0.02f); } } } private static void DamageHostSessionEnemies(HostDomainSession session, int damage) { PlayerControllerB player = FindPlayerByActualClientId(session.CasterId); foreach (EnemyAI key in session.EnemyStates.Keys) { if ((Object)(object)key != (Object)null && !IsEnemyDead(key)) { TryDamageEnemy(key, damage, player); } } } private static void DamageEnemiesAt(Vector3 center, float radius, int damage) { //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) PlayerControllerB player = StartOfRound.Instance?.localPlayerController; EnemyAI[] array = Object.FindObjectsOfType(); foreach (EnemyAI val in array) { if ((Object)(object)val != (Object)null && !IsEnemyDead(val) && Vector3.Distance(center, ((Component)val).transform.position) <= radius) { TryDamageEnemy(val, damage, player); } } } private void DamagePlayersAtFromHost(Vector3 center, float radius, int damage, ulong sourceCasterId) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; StartOfRound instance = StartOfRound.Instance; if ((Object)(object)singleton == (Object)null || !singleton.IsServer || (Object)(object)instance == (Object)null || instance.allPlayerScripts == null) { return; } PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && !IsPlayerDead(val) && !(Vector3.Distance(center, ((Component)val).transform.position) > radius) && TryGetPlayerClientId(val, out var clientId) && clientId != sourceCasterId) { if (clientId == singleton.LocalClientId) { TryDamageLocalPlayer(damage); } else { SendShrineDamage(clientId, damage, center, radius, sourceCasterId); } } } } private void RestoreHostSessionEntities(HostDomainSession session) { //IL_00a1: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) foreach (KeyValuePair enemySpeed in session.EnemySpeeds) { if (!((Object)(object)enemySpeed.Key == (Object)null)) { object? memberValue = GetMemberValue(enemySpeed.Key, "agent"); NavMeshAgent val = (NavMeshAgent)((memberValue is NavMeshAgent) ? memberValue : null); if (val != null && ((Behaviour)val).enabled) { val.speed = enemySpeed.Value; } } } foreach (KeyValuePair enemyState in session.EnemyStates) { if (!((Object)(object)enemyState.Key == (Object)null)) { TeleportEnemySafely(enemyState.Key, enemyState.Value.Position); ((Component)enemyState.Key).transform.rotation = enemyState.Value.Rotation; RestoreRigidbodyState(((Component)enemyState.Key).GetComponent(), enemyState.Value); } } foreach (KeyValuePair itemState in session.ItemStates) { if (!((Object)(object)itemState.Key == (Object)null) && !IsHeldGrabbable(itemState.Key)) { TeleportGrabbableSafely(itemState.Key, itemState.Value.Position); ((Component)itemState.Key).transform.rotation = itemState.Value.Rotation; RestoreRigidbodyState(((Component)itemState.Key).GetComponent(), itemState.Value); } } foreach (KeyValuePair networkEntityState in session.NetworkEntityStates) { if (!((Object)(object)networkEntityState.Key == (Object)null)) { TeleportDynamicNetworkObject(networkEntityState.Key, networkEntityState.Value.Position); ((Component)networkEntityState.Key).transform.rotation = networkEntityState.Value.Rotation; RestoreRigidbodyState(((Component)networkEntityState.Key).GetComponent(), networkEntityState.Value); } } session.EnemyStates.Clear(); session.EnemySpeeds.Clear(); session.ItemStates.Clear(); session.NetworkEntityStates.Clear(); } private void CloseHostDomainSession(ulong sessionId, bool broadcast) { if (hostDomainSessions.TryGetValue(sessionId, out HostDomainSession value)) { DisableDomainExteriorBarrierColliders(sessionId); RestoreSessionRemotePlayerRepresentations(value); RestoreHostSessionEntities(value); hostDomainSessions.Remove(sessionId); if (broadcast) { BroadcastCloseDomain(sessionId); } if (activeDomainSessionId == sessionId) { CloseDomain(broadcast: false); } RemoveKnownDomainSession(sessionId); Log.LogInfo((object)("Closed host domain session " + sessionId + ". Remaining sessions=" + hostDomainSessions.Count + ".")); } } private void CloseAllHostDomainSessions(bool broadcast) { foreach (ulong item in new List(hostDomainSessions.Keys)) { CloseHostDomainSession(item, broadcast); } if (domainOpen) { CloseDomain(broadcast: false); } ClearKnownDomainSessions(); } private void TryRegisterNetworkHandlers() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Expected O, but got Unknown //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown NetworkManager singleton = NetworkManager.Singleton; if (networkHandlersRegistered && ((Object)(object)registeredNetworkManager != (Object)(object)singleton || (Object)(object)singleton == (Object)null || !singleton.IsListening)) { UnregisterNetworkHandlers(); } if (!networkHandlersRegistered && !((Object)(object)singleton == (Object)null) && singleton.IsListening && singleton.CustomMessagingManager != null) { singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.OpenDomain", new HandleNamedMessageDelegate(OnOpenDomainMessage)); singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.RequestDomain", new HandleNamedMessageDelegate(OnRequestDomainMessage)); singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.CloseDomain", new HandleNamedMessageDelegate(OnCloseDomainMessage)); singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.GambleRoll", new HandleNamedMessageDelegate(OnGambleRollMessage)); singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.ShrineDamage", new HandleNamedMessageDelegate(OnShrineDamageMessage)); singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.DomainDenied", new HandleNamedMessageDelegate(OnDomainDeniedMessage)); singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.DomainConfig", new HandleNamedMessageDelegate(OnDomainConfigMessage)); singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.SoulState", new HandleNamedMessageDelegate(OnSoulStateMessage)); singleton.CustomMessagingManager.RegisterNamedMessageHandler("LethalCompanyMod.SoulDeath", new HandleNamedMessageDelegate(OnSoulDeathMessage)); registeredNetworkManager = singleton; networkHandlersRegistered = true; Log.LogInfo((object)("Domain multiplayer message handlers registered for active network session. Server=" + singleton.IsServer + ", localClientId=" + singleton.LocalClientId + ".")); } } private void UnregisterNetworkHandlers() { if (!networkHandlersRegistered) { return; } NetworkManager val = registeredNetworkManager; if ((Object)(object)val != (Object)null && val.CustomMessagingManager != null) { try { val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.OpenDomain"); val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.RequestDomain"); val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.CloseDomain"); val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.GambleRoll"); val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.ShrineDamage"); val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.DomainDenied"); val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.DomainConfig"); val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.SoulState"); val.CustomMessagingManager.UnregisterNamedMessageHandler("LethalCompanyMod.SoulDeath"); } catch (Exception ex) { Log.LogDebug((object)("Network handlers were already cleared during session shutdown: " + ex.Message)); } } networkHandlersRegistered = false; registeredNetworkManager = null; hostConfigReceived = false; domainRequestPending = false; if (hostDomainSessions.Count > 0) { CloseAllHostDomainSessions(broadcast: false); return; } if (domainOpen) { CloseDomain(broadcast: false); } ClearKnownDomainSessions(); } private void BeginDomainRequest(DomainKind domain, Vector3 center, ulong casterId) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) pendingDomainRequest = domain; pendingDomainCenter = center; pendingDomainCasterId = casterId; domainRequestAttempts = 0; domainRequestPending = true; SendPendingDomainRequest(); } private void UpdatePendingDomainRequest() { if (!domainRequestPending) { return; } if (domainOpen) { domainRequestPending = false; return; } NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || singleton.IsServer) { domainRequestPending = false; return; } domainRequestRetryTimer -= Time.unscaledDeltaTime; if (!(domainRequestRetryTimer > 0f)) { if (domainRequestAttempts >= 4) { domainRequestPending = false; statusText = "The host did not answer the domain request. Make sure everyone uses mod version 1.18.2."; ShowTip("Domain request failed", statusText); Log.LogWarning((object)statusText); } else { SendPendingDomainRequest(); } } } private void SendPendingDomainRequest() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) domainRequestAttempts++; domainRequestRetryTimer = 1.5f; SendDomainRequest(pendingDomainRequest, pendingDomainCenter, pendingDomainCasterId); Log.LogInfo((object)("Domain request attempt " + domainRequestAttempts + "/" + 4 + ".")); } private void UpdateConfigSynchronization() { NetworkManager singleton = NetworkManager.Singleton; if (networkHandlersRegistered && !((Object)(object)singleton == (Object)null) && singleton.IsListening && singleton.IsServer) { configSyncTimer -= Time.unscaledDeltaTime; if (!(configSyncTimer > 0f)) { configSyncTimer = 3f; BroadcastDomainConfig(); } } } private unsafe void BroadcastDomainConfig() { //IL_006c: 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_007f: 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_0099: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || singleton.CustomMessagingManager == null) { return; } int configuredDomainUsesPerMoon = GetConfiguredDomainUsesPerMoon(); bool value = infiniteDomainUsesConfig.Value; FastBufferWriter val = default(FastBufferWriter); foreach (ulong connectedClientsId in singleton.ConnectedClientsIds) { if (connectedClientsId != singleton.LocalClientId) { ((FastBufferWriter)(ref val))..ctor(16, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe(ref configuredDomainUsesPerMoon, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.DomainConfig", connectedClientsId, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } } } } private unsafe void SendDomainRequest(DomainKind domain, Vector3 center, ulong casterId) { //IL_002b: 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_0095: 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_00b1: 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_00cb: 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_0076: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || singleton.CustomMessagingManager == null) { if (TryConsumeDomainUse(casterId)) { Dictionary participants = CaptureDomainParticipants(domain, center, casterId); OpenDomainLocal(domain, center, casterId, affectsGameplay: true, RollDomainDuration(domain), participants, 0uL); } return; } if (singleton.IsServer) { if (TryConsumeDomainUse(casterId)) { float duration = RollDomainDuration(domain); Dictionary participants2 = CaptureDomainParticipants(domain, center, casterId); StartHostDomainSession(domain, center, casterId, duration, participants2); } return; } FastBufferWriter val = default(FastBufferWriter); ((FastBufferWriter)(ref val))..ctor(96, (Allocator)2, -1); try { int num = (int)domain; ((FastBufferWriter)(ref val)).WriteValueSafe(ref num, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref center); ((FastBufferWriter)(ref val)).WriteValueSafe(ref casterId, default(ForPrimitives)); singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.RequestDomain", 0uL, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } Log.LogInfo((object)("Sent domain request to host: " + GetDomainName(domain) + ", caster=" + casterId + ", serverClientId=" + 0uL + ".")); } private unsafe void BroadcastOpenDomain(HostDomainSession session) { //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || singleton.CustomMessagingManager == null) { return; } Log.LogInfo((object)("Broadcasting session " + session.Id + ": " + GetDomainName(session.Domain) + ", caster=" + session.CasterId + ", clients=" + singleton.ConnectedClientsIds.Count + ".")); FastBufferWriter val = default(FastBufferWriter); foreach (ulong connectedClientsId in singleton.ConnectedClientsIds) { if (connectedClientsId == singleton.LocalClientId) { continue; } ((FastBufferWriter)(ref val))..ctor(2048, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.Id, default(ForPrimitives)); int domain = (int)session.Domain; ((FastBufferWriter)(ref val)).WriteValueSafe(ref domain, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.SourceCenter); ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.ArenaCenter); ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.CasterId, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.Duration, default(ForPrimitives)); domain = session.Participants.Count; ((FastBufferWriter)(ref val)).WriteValueSafe(ref domain, default(ForPrimitives)); foreach (KeyValuePair participant in session.Participants) { domain = participant.Key; ((FastBufferWriter)(ref val)).WriteValueSafe(ref domain, default(ForPrimitives)); Vector3 value = participant.Value; ((FastBufferWriter)(ref val)).WriteValueSafe(ref value); } singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.OpenDomain", connectedClientsId, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } } } private Dictionary CaptureDomainParticipants(DomainKind domain, Vector3 center, ulong casterId) { //IL_00f0: 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_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_00b8: Unknown result type (might be due to invalid IL or missing references) Dictionary dictionary = new Dictionary(); float num = ((domain == DomainKind.MalevolentShrineOpen) ? 55f : 26f); StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance != (Object)null && instance.allPlayerScripts != null) { PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && !IsPlayerDead(val) && TryGetPlayerClientId(val, out var clientId) && (clientId == casterId || !IsClientInsideActiveHostDomain(clientId))) { Vector3 val2 = ((Component)val).transform.position - center; val2.y = 0f; if (clientId == casterId || !(((Vector3)(ref val2)).sqrMagnitude > num * num)) { dictionary[GetPlayerSlot(val)] = ((Component)val).transform.position; } } } } PlayerControllerB val3 = FindPlayerByActualClientId(casterId); if ((Object)(object)val3 != (Object)null) { dictionary[GetPlayerSlot(val3)] = ((Component)val3).transform.position; } Log.LogInfo((object)("Host captured " + dictionary.Count + " domain participant slot(s): " + string.Join(",", dictionary.Keys) + ".")); return dictionary; } private unsafe void BroadcastCloseDomain(ulong sessionId) { //IL_0057: 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_0070: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || singleton.CustomMessagingManager == null) { return; } FastBufferWriter val = default(FastBufferWriter); foreach (ulong connectedClientsId in singleton.ConnectedClientsIds) { if (connectedClientsId != singleton.LocalClientId) { ((FastBufferWriter)(ref val))..ctor(16, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe(ref sessionId, default(ForPrimitives)); singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.CloseDomain", connectedClientsId, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } } } } private unsafe void SendDomainDenied(ulong clientId, int reason = 0) { //IL_004b: 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_0063: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || singleton.CustomMessagingManager == null) { return; } FastBufferWriter val = default(FastBufferWriter); ((FastBufferWriter)(ref val))..ctor(8, (Allocator)2, -1); try { int num = ((reason != 0) ? reason : (domainUsesAvailableOnMoon ? 1 : 2)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref num, default(ForPrimitives)); singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.DomainDenied", clientId, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } } private unsafe void BroadcastGambleRoll(HostDomainSession session, int roll) { //IL_0070: 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_0083: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || singleton.CustomMessagingManager == null) { return; } FastBufferWriter val = default(FastBufferWriter); foreach (ulong participantClientId in session.ParticipantClientIds) { if (participantClientId != singleton.LocalClientId && singleton.ConnectedClients.ContainsKey(participantClientId)) { ((FastBufferWriter)(ref val))..ctor(80, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.Id, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref roll, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.CasterId, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.ArenaCenter); singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.GambleRoll", participantClientId, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } } } } private unsafe void BroadcastSoulState(HostDomainSession session) { //IL_010c: 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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0193: 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_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0218: 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) List> list = new List>(); foreach (KeyValuePair enemySoulValue in session.EnemySoulValues) { if (!((Object)(object)enemySoulValue.Key == (Object)null) && TryGetEnemyNetworkObjectId(enemySoulValue.Key, out var networkObjectId)) { list.Add(new KeyValuePair(networkObjectId, enemySoulValue.Value)); } } NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && activeDomainSessionId == session.Id) { ApplyLocalSoulState(session.Id, session.PlayerSoulValues, list); } if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || singleton.CustomMessagingManager == null) { return; } FastBufferWriter val = default(FastBufferWriter); foreach (ulong participantClientId in session.ParticipantClientIds) { if (participantClientId == singleton.LocalClientId || !singleton.ConnectedClients.ContainsKey(participantClientId)) { continue; } ((FastBufferWriter)(ref val))..ctor(32768, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.Id, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref session.CasterId, default(ForPrimitives)); int count = session.PlayerSoulValues.Count; ((FastBufferWriter)(ref val)).WriteValueSafe(ref count, default(ForPrimitives)); foreach (KeyValuePair playerSoulValue in session.PlayerSoulValues) { ulong key = playerSoulValue.Key; ((FastBufferWriter)(ref val)).WriteValueSafe(ref key, default(ForPrimitives)); float value = playerSoulValue.Value; ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); } count = list.Count; ((FastBufferWriter)(ref val)).WriteValueSafe(ref count, default(ForPrimitives)); foreach (KeyValuePair item in list) { ulong key = item.Key; ((FastBufferWriter)(ref val)).WriteValueSafe(ref key, default(ForPrimitives)); float value = item.Value; ((FastBufferWriter)(ref val)).WriteValueSafe(ref value, default(ForPrimitives)); } singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.SoulState", participantClientId, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } } } private unsafe void SendSoulDeath(ulong clientId, ulong sessionId, ulong sourceCasterId) { //IL_0048: 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_005a: 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_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || singleton.CustomMessagingManager == null || !singleton.ConnectedClients.ContainsKey(clientId)) { return; } FastBufferWriter val = default(FastBufferWriter); ((FastBufferWriter)(ref val))..ctor(32, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe(ref sessionId, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sourceCasterId, default(ForPrimitives)); singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.SoulDeath", clientId, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } } private static bool TryGetEnemyNetworkObjectId(EnemyAI enemy, out ulong networkObjectId) { NetworkObject val = ((Component)enemy).GetComponent() ?? ((Component)enemy).GetComponentInParent(); if ((Object)(object)val != (Object)null && val.IsSpawned) { networkObjectId = val.NetworkObjectId; return true; } networkObjectId = 0uL; return false; } private unsafe void SendShrineDamage(ulong clientId, int damage, Vector3 center, float radius, ulong sourceCasterId) { //IL_0039: 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_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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_007e: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsListening || !singleton.IsServer || singleton.CustomMessagingManager == null) { return; } FastBufferWriter val = default(FastBufferWriter); ((FastBufferWriter)(ref val))..ctor(64, (Allocator)2, -1); try { ((FastBufferWriter)(ref val)).WriteValueSafe(ref damage, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref center); ((FastBufferWriter)(ref val)).WriteValueSafe(ref radius, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sourceCasterId, default(ForPrimitives)); singleton.CustomMessagingManager.SendNamedMessage("LethalCompanyMod.ShrineDamage", clientId, val, (NetworkDelivery)3); } finally { ((IDisposable)(*(FastBufferWriter*)(&val))/*cast due to .constrained prefix*/).Dispose(); } } private void OnRequestDomainMessage(ulong senderClientId, FastBufferReader reader) { //IL_001e: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if (!((Object)(object)singleton == (Object)null) && singleton.IsServer) { int value = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); Vector3 val = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val); ulong num = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); DomainKind domain = ParseDomainKind(value); if (num != senderClientId) { Log.LogWarning((object)("Domain request caster mismatch. Payload caster=" + num + ", sender=" + senderClientId + ". Using sender.")); num = senderClientId; } Log.LogInfo((object)("Host received domain request: " + GetDomainName(domain) + ", caster=" + num + ".")); if (IsClientInsideActiveHostDomain(num)) { SendDomainDenied(num, 3); Log.LogInfo((object)("Rejected domain request from client " + num + " because that player is already inside an active domain.")); } else if (!TryConsumeDomainUse(num)) { SendDomainDenied(num); Log.LogInfo((object)("Rejected domain request from client " + num + "; moonActive=" + domainUsesAvailableOnMoon + ", level=" + moonUsageLevelId + ".")); } else { float duration = RollDomainDuration(domain); Dictionary participants = CaptureDomainParticipants(domain, val, num); StartHostDomainSession(domain, val, num, duration, participants); } } } private void OnOpenDomainMessage(ulong senderClientId, FastBufferReader reader) { //IL_0006: 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_0019: 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_003e: 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_0051: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00be: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) ulong num = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); int value = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value, default(ForPrimitives)); Vector3 val = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val); Vector3 val2 = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val2); ulong num2 = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num2, default(ForPrimitives)); float duration = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref duration, default(ForPrimitives)); Dictionary dictionary = new Dictionary(); if (((FastBufferReader)(ref reader)).TryBeginRead(4)) { int num3 = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num3, default(ForPrimitives)); num3 = Mathf.Clamp(num3, 0, 64); int key = default(int); Vector3 value2 = default(Vector3); for (int i = 0; i < num3; i++) { if (!((FastBufferReader)(ref reader)).TryBeginRead(16)) { break; } ((FastBufferReader)(ref reader)).ReadValueSafe(ref key, default(ForPrimitives)); ((FastBufferReader)(ref reader)).ReadValueSafe(ref value2); dictionary[key] = value2; } } if (num2 == GetLocalClientId()) { domainRequestPending = false; } RecordConsumedDomainUse(num2); DomainKind domain = ParseDomainKind(value); NetworkDomainSession networkDomainSession = new NetworkDomainSession { Id = num, Domain = domain, SourceCenter = val, ArenaCenter = val2, CasterId = num2, Duration = duration }; foreach (KeyValuePair item in dictionary) { networkDomainSession.Participants[item.Key] = item.Value; } RegisterKnownDomainSession(networkDomainSession); int localPlayerSlot = GetLocalPlayerSlot(); bool flag = localPlayerSlot != int.MinValue && dictionary.ContainsKey(localPlayerSlot); Log.LogInfo((object)("Client received domain session " + num + ": " + GetDomainName(domain) + ", caster=" + num2 + ", participants=" + dictionary.Count + ", localParticipant=" + flag + ".")); if (flag) { if (domainOpen && activeDomainSessionId != num) { Log.LogError((object)("Host assigned the local player to overlapping sessions " + activeDomainSessionId + " and " + num + "; keeping the existing domain.")); } else { OpenDomainLocal(domain, val, num2, affectsGameplay: false, duration, dictionary, num, val2); } } } private void OnCloseDomainMessage(ulong senderClientId, FastBufferReader reader) { //IL_0006: 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) ulong num = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); DisableDomainExteriorBarrierColliders(num); if (knownDomainSessions.TryGetValue(num, out NetworkDomainSession value)) { RestoreSessionRemotePlayerRepresentations(value); } if (activeDomainSessionId == num) { CloseDomain(broadcast: false); } RemoveKnownDomainSession(num); } private void OnDomainDeniedMessage(ulong senderClientId, FastBufferReader reader) { //IL_0019: 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) domainRequestPending = false; int num = 1; if (((FastBufferReader)(ref reader)).TryBeginRead(4)) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); } switch (num) { case 3: ShowDomainBusy(); break; case 2: domainUsesAvailableOnMoon = false; ShowDomainUnavailableInShip(); break; default: domainUsesConsumedThisMoon[GetLocalClientId()] = GetEffectiveDomainUsesPerMoon(); ShowDomainUsageDenied(); break; } } private void OnDomainConfigMessage(ulong senderClientId, FastBufferReader reader) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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) NetworkManager singleton = NetworkManager.Singleton; if (!((Object)(object)singleton == (Object)null) && !singleton.IsServer && senderClientId == 0L) { int num = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); syncedDomainUsesPerMoon = Mathf.Clamp(num, 1, 20); syncedInfiniteDomainUses = flag; hostConfigReceived = true; } } private void OnGambleRollMessage(ulong senderClientId, FastBufferReader reader) { //IL_0006: 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_0019: 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) //IL_0032: 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_005e: Unknown result type (might be due to invalid IL or missing references) ulong num = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); int roll = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe(ref roll, default(ForPrimitives)); ulong num2 = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num2, default(ForPrimitives)); Vector3 val = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val); if (activeDomainSessionId == num && selectedDomain == DomainKind.IdleDeathGamble) { casterClientId = num2; domainCenter = val; HandleGambleRoll(roll); } } private void OnSoulStateMessage(ulong senderClientId, FastBufferReader reader) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || singleton.IsServer || senderClientId != 0L) { return; } ulong num = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); ulong num2 = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num2, default(ForPrimitives)); int num3 = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num3, default(ForPrimitives)); num3 = Mathf.Clamp(num3, 0, 64); Dictionary dictionary = new Dictionary(); ulong key = default(ulong); float num4 = default(float); for (int i = 0; i < num3; i++) { if (!((FastBufferReader)(ref reader)).TryBeginRead(12)) { break; } ((FastBufferReader)(ref reader)).ReadValueSafe(ref key, default(ForPrimitives)); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num4, default(ForPrimitives)); dictionary[key] = Mathf.Clamp(num4, 0f, 100f); } if (!((FastBufferReader)(ref reader)).TryBeginRead(4)) { return; } int num5 = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num5, default(ForPrimitives)); num5 = Mathf.Clamp(num5, 0, 512); List> list = new List>(num5); ulong key2 = default(ulong); float num6 = default(float); for (int j = 0; j < num5; j++) { if (!((FastBufferReader)(ref reader)).TryBeginRead(12)) { break; } ((FastBufferReader)(ref reader)).ReadValueSafe(ref key2, default(ForPrimitives)); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num6, default(ForPrimitives)); list.Add(new KeyValuePair(key2, Mathf.Clamp(num6, 0f, 100f))); } if (activeDomainSessionId == num && selectedDomain == DomainKind.SelfEmbodimentOfPerfection) { casterClientId = num2; ApplyLocalSoulState(num, dictionary, list); } } private void OnSoulDeathMessage(ulong senderClientId, FastBufferReader reader) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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) NetworkManager singleton = NetworkManager.Singleton; if (!((Object)(object)singleton == (Object)null) && !singleton.IsServer && senderClientId == 0L) { ulong num = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); ulong num2 = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num2, default(ForPrimitives)); if (activeDomainSessionId == num && selectedDomain == DomainKind.SelfEmbodimentOfPerfection && GetLocalClientId() != num2 && !IsLocalCaster()) { TryKillLocalPlayer(); } } } private void ApplyLocalSoulState(ulong sessionId, Dictionary playerValues, List> enemyValues) { if (activeDomainSessionId != sessionId || selectedDomain != DomainKind.SelfEmbodimentOfPerfection) { return; } localPlayerSoulValues.Clear(); foreach (KeyValuePair playerValue in playerValues) { localPlayerSoulValues[playerValue.Key] = Mathf.Clamp(playerValue.Value, 0f, 100f); } localEnemySoulValues.Clear(); foreach (KeyValuePair enemyValue in enemyValues) { localEnemySoulValues[enemyValue.Key] = Mathf.Clamp(enemyValue.Value, 0f, 100f); } } private void OnShrineDamageMessage(ulong senderClientId, FastBufferReader reader) { //IL_0006: 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_0022: 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_0035: 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_0072: 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) int damage = default(int); ((FastBufferReader)(ref reader)).ReadValueSafe(ref damage, default(ForPrimitives)); Vector3 val = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val); float num = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); ulong num2 = default(ulong); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num2, default(ForPrimitives)); if (GetLocalClientId() != num2) { PlayerControllerB val2 = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val2 == (Object)null) && !IsPlayerDead(val2) && !(Vector3.Distance(val, ((Component)val2).transform.position) > num)) { TryDamageLocalPlayer(damage); } } } private Transform? GetPlayerTransform(ulong clientId) { StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null || instance.allPlayerScripts == null) { return null; } PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && TryGetPlayerClientId(val, out var clientId2) && clientId2 == clientId) { return ((Component)val).transform; } } return null; } private static PlayerControllerB? FindPlayerByActualClientId(ulong clientId) { StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null || instance.allPlayerScripts == null) { return null; } PlayerControllerB[] allPlayerScripts = instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if ((Object)(object)val != (Object)null && TryGetPlayerClientId(val, out var clientId2) && clientId2 == clientId) { return val; } } return null; } private static int GetPlayerSlot(PlayerControllerB player) { object memberValue = GetMemberValue(player, "playerClientId"); if (memberValue is int) { return (int)memberValue; } if (memberValue is uint num && num <= int.MaxValue) { return (int)num; } if (memberValue is ulong num2 && num2 <= int.MaxValue) { return (int)num2; } if (memberValue is long num3 && num3 >= 0 && num3 <= int.MaxValue) { return (int)num3; } StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance != (Object)null && instance.allPlayerScripts != null) { for (int i = 0; i < instance.allPlayerScripts.Length; i++) { if ((Object)(object)instance.allPlayerScripts[i] == (Object)(object)player) { return i; } } } return ((Object)player).GetInstanceID(); } private static int GetLocalPlayerSlot() { PlayerControllerB val = StartOfRound.Instance?.localPlayerController; if (!((Object)(object)val != (Object)null)) { return int.MinValue; } return GetPlayerSlot(val); } private bool IsClientInsideActiveHostDomain(ulong clientId) { //IL_004c: 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_005c: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = FindPlayerByActualClientId(clientId); foreach (HostDomainSession value in hostDomainSessions.Values) { if (value.ParticipantClientIds.Contains(clientId)) { return true; } if (value.Domain == DomainKind.MalevolentShrineOpen && (Object)(object)val != (Object)null) { Vector3 val2 = ((Component)val).transform.position - value.SourceCenter; val2.y = 0f; if (((Vector3)(ref val2)).sqrMagnitude <= 3025f) { return true; } } } return false; } private static bool TryGetPlayerClientId(PlayerControllerB player, out ulong clientId) { if (TryConvertClientId(GetMemberValue(player, "actualClientId"), out clientId)) { return true; } return TryConvertClientId(GetMemberValue(player, "playerClientId"), out clientId); } private static bool TryConvertClientId(object? value, out ulong clientId) { if (value is ulong num) { clientId = num; return true; } if (value is int num2 && num2 >= 0) { clientId = (ulong)num2; return true; } if (value is uint num3) { clientId = num3; return true; } if (value is long num4 && num4 >= 0) { clientId = (ulong)num4; return true; } clientId = 0uL; return false; } private static bool IsPlayerDead(PlayerControllerB player) { object memberValue = GetMemberValue(player, "isPlayerDead"); bool flag = default(bool); int num; if (memberValue is bool) { flag = (bool)memberValue; num = 1; } else { num = 0; } if (((uint)num & (flag ? 1u : 0u)) != 0) { return true; } if (GetMemberValue(player, "health") is int num2) { return num2 <= 0; } return false; } private ulong GetLocalClientId() { NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && singleton.IsListening) { return singleton.LocalClientId; } return 0uL; } private bool IsLocalCaster() { return casterClientId == GetLocalClientId(); } private static DomainKind ParseDomainKind(int value) { if (!Enum.IsDefined(typeof(DomainKind), value)) { return DomainKind.InfiniteVoid; } return (DomainKind)value; } private static float RollDomainDuration(DomainKind domain) { if (domain != DomainKind.IdleDeathGamble) { return 30f; } return Random.Range(45, 71); } private static string FormatDuration(float seconds) { return Mathf.RoundToInt(seconds) + " seconds"; } private void InitializeInputActions() { try { RegisterInputAction(DomainInputCommand.ToggleMenu, "Domain Menu", "/0", "/numpad0", "/f1", "/insert"); RegisterInputAction(DomainInputCommand.Select1, "Select Infinite Void", "/1", "/numpad1"); RegisterInputAction(DomainInputCommand.Select2, "Select Open Shrine", "/2", "/numpad2"); RegisterInputAction(DomainInputCommand.Select3, "Select Closed Shrine", "/3", "/numpad3"); RegisterInputAction(DomainInputCommand.Select4, "Select Idle Death Gamble", "/4", "/numpad4"); RegisterInputAction(DomainInputCommand.Select5, "Select Self-Embodiment of Perfection", "/5", "/numpad5"); RegisterInputAction(DomainInputCommand.Confirm, "Open Selected Domain", "/enter", "/numpadEnter"); RegisterInputAction(DomainInputCommand.Direct1, "Open Infinite Void", "/f2"); RegisterInputAction(DomainInputCommand.Direct2, "Open Open Shrine", "/f3"); RegisterInputAction(DomainInputCommand.Direct3, "Open Closed Shrine", "/f4"); RegisterInputAction(DomainInputCommand.Direct4, "Open Idle Death Gamble", "/f5"); RegisterInputAction(DomainInputCommand.Direct5, "Open Self-Embodiment of Perfection", "/f6"); Log.LogInfo((object)("Registered and enabled " + domainInputActions.Count + " independent domain InputActions.")); } catch (Exception ex) { DisposeInputActions(); Log.LogWarning((object)("Could not initialize domain InputActions; direct keyboard fallbacks remain active: " + ex.Message)); } } private void RegisterInputAction(DomainInputCommand command, string name, params string[] bindings) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001b: Unknown result type (might be due to invalid IL or missing references) InputAction val = new InputAction(name, (InputActionType)1, (string)null, (string)null, (string)null, (string)null); foreach (string text in bindings) { InputActionSetupExtensions.AddBinding(val, text, (string)null, (string)null, (string)null); } val.Enable(); domainInputActions[command] = val; } private void DisposeInputActions() { foreach (InputAction value in domainInputActions.Values) { try { value.Disable(); value.Dispose(); } catch { } } domainInputActions.Clear(); domainInputLatches.Clear(); } private bool ConsumeCommandPress(DomainInputCommand command, bool fallbackHeld) { InputAction value; bool num = (domainInputActions.TryGetValue(command, out value) && value.enabled && value.IsPressed()) || fallbackHeld; bool value2; bool flag = domainInputLatches.TryGetValue(command, out value2) && value2; if (!num) { if (flag) { domainInputLatches[command] = false; } return false; } if (flag) { return false; } domainInputLatches[command] = true; return true; } private static bool IsHeld(KeyControl? key, KeyCode fallbackKey) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) if (key != null && ((ButtonControl)key).isPressed) { return true; } try { return Input.GetKey(fallbackKey); } catch { return false; } } private void LogInputDebugOnce() { if (!inputDebugLogged && Time.frameCount >= 15) { inputDebugLogged = true; Log.LogInfo((object)("Input debug: Tick is running. Keyboard.current=" + ((Keyboard.current != null) ? "available" : "null") + ", InputActions=" + domainInputActions.Count + ", legacy Input fallback enabled.")); } } private void ShowReadyTipOnce() { if (!readyTipShown) { readyTipShown = true; ShowTip("Domain Mod Ready", "Opening animation + multiplayer sync enabled. 0/F1/Insert menu."); } } private static void ShowTip(string title, string body) { try { HUDManager instance = HUDManager.Instance; if (instance != null) { instance.DisplayTip(title, body, false, false, "LC_DomainModTip"); } } catch (Exception ex) { Log.LogWarning((object)("Could not show HUD tip: " + ex.Message)); } } private static object? GetMemberValue(object target, string name) { BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; FieldInfo field = target.GetType().GetField(name, bindingAttr); if (field != null) { return field.GetValue(target); } PropertyInfo property = target.GetType().GetProperty(name, bindingAttr); if (!(property != null) || !property.CanRead) { return null; } return property.GetValue(target, null); } private static void SetMemberValue(object target, string name, object value) { BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; FieldInfo field = target.GetType().GetField(name, bindingAttr); if (field != null) { field.SetValue(target, value); return; } PropertyInfo property = target.GetType().GetProperty(name, bindingAttr); if (property != null && property.CanWrite) { property.SetValue(target, value, null); } } private static void TrySetMemberValue(object target, string name, object value) { try { SetMemberValue(target, name, value); } catch { } } private static float EaseOutCubic(float value) { float num = 1f - value; return 1f - num * num * num; } private static string GetDomainName(DomainKind domain) { return domain switch { DomainKind.MalevolentShrineOpen => "Malevolent Shrine - Open", DomainKind.MalevolentShrineClosed => "Malevolent Shrine - Closed", DomainKind.IdleDeathGamble => "Idle Death Gamble", DomainKind.SelfEmbodimentOfPerfection => "Self-Embodiment of Perfection", _ => "Infinite Void", }; } private static DomainStyle GetDomainStyle(DomainKind domain) { //IL_0031: 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_0063: 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_008b: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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_0155: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) return domain switch { DomainKind.MalevolentShrineOpen => new DomainStyle(new Color(1f, 0.08f, 0.04f, 0.22f), new Color(1f, 0.16f, 0.08f, 0.86f), new Color(1f, 0.32f, 0.08f, 0.76f), new Color(1f, 0.05f, 0.02f), new Color(0.16f, 0.015f, 0.01f), new Color(1f, 0.75f, 0.55f), 8f), DomainKind.MalevolentShrineClosed => new DomainStyle(new Color(0.55f, 0f, 0f, 0.36f), new Color(0.95f, 0f, 0f, 0.94f), new Color(0.35f, 0f, 0f, 0.92f), new Color(1f, 0f, 0f), new Color(0.12f, 0f, 0f), new Color(1f, 0.35f, 0.35f), 10f), DomainKind.IdleDeathGamble => new DomainStyle(new Color(1f, 0.78f, 0.1f, 0.26f), new Color(0.2f, 1f, 0.45f, 0.84f), new Color(0.1f, 1f, 0.38f, 0.82f), new Color(1f, 0.82f, 0.18f), new Color(0.08f, 0.08f, 0.02f), new Color(1f, 0.95f, 0.55f), 7f), DomainKind.SelfEmbodimentOfPerfection => new DomainStyle(new Color(0.26f, 0.02f, 0.34f, 1f), new Color(0.72f, 0.16f, 0.88f, 1f), new Color(1f, 0.62f, 1f, 1f), new Color(0.72f, 0.24f, 0.92f), new Color(0.035f, 0.006f, 0.05f), new Color(0.96f, 0.78f, 1f), 7.5f), _ => new DomainStyle(new Color(0.12f, 0.9f, 1f, 0.28f), new Color(0.85f, 1f, 1f, 0.88f), new Color(0.2f, 0.95f, 1f, 0.82f), new Color(0.4f, 0.95f, 1f), new Color(0.03f, 0.08f, 0.14f), new Color(0.86f, 1f, 1f), 8f), }; } } public sealed class DomainRuntimeDriver : MonoBehaviour { private Plugin? owner; private Coroutine? runtimeCoroutine; internal void Initialize(Plugin plugin) { owner = plugin; ((Behaviour)this).enabled = true; if (!((Component)this).gameObject.activeSelf) { ((Component)this).gameObject.SetActive(true); } runtimeCoroutine = ((MonoBehaviour)this).StartCoroutine(RuntimeLoop()); Plugin.Log.LogInfo((object)("Top-level runtime coroutine scheduled=" + (runtimeCoroutine != null) + ".")); } internal Coroutine StartManagedCoroutine(IEnumerator routine) { return ((MonoBehaviour)this).StartCoroutine(routine); } public void Update() { Plugin plugin = owner; if (plugin != null) { plugin.LogRuntimeDriverOnce("top-level MonoBehaviour.Update"); plugin.Tick(); } } public void FixedUpdate() { Plugin plugin = owner; if (plugin != null) { plugin.LogRuntimeDriverOnce("top-level MonoBehaviour.FixedUpdate"); plugin.Tick(); } } public void LateUpdate() { owner?.LateTick(); } public void OnGUI() { Plugin plugin = owner; if (plugin != null) { plugin.LogRuntimeDriverOnce("top-level MonoBehaviour.OnGUI"); plugin.Tick(); } } private IEnumerator RuntimeLoop() { while (true) { Plugin plugin = owner; if (plugin != null) { plugin.LogRuntimeDriverOnce("top-level coroutine"); plugin.Tick(); plugin.LateTick(); } yield return null; } } public void OnApplicationQuit() { owner?.NotifyApplicationQuitting(); } public void OnDestroy() { owner?.NotifyRuntimeDriverDestroyed(this); } } }