using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using Grimoire.Models; using Grimoire.Services; using Grimoire.UI; using Grimoire.Utilities; using HarmonyLib; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.Attributes; using Il2CppInterop.Runtime.Injection; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Microsoft.CodeAnalysis; using ProjectM; using ProjectM.Network; using ProjectM.UI; using TMPro; using Unity.Collections; using Unity.Entities; using Unity.Mathematics; using Unity.Transforms; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("Grimoire")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("2.22.20.0")] [assembly: AssemblyInformationalVersion("2.22.20")] [assembly: AssemblyProduct("Grimoire")] [assembly: AssemblyTitle("Grimoire")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.22.20.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 Grimoire { [BepInPlugin("io.grimoire", "Grimoire", "2.22.20")] internal sealed class Plugin : BasePlugin { internal static ManualLogSource LogSource; internal static Harmony Harmony; internal static ConfigEntry ToggleKey; internal static ConfigEntry CombatHudToggleKey; internal static ConfigEntry HudEnabled; internal static ConfigEntry AutoCollapseHud; internal static ConfigEntry ClosedRefreshSeconds; internal static ConfigEntry OpenRefreshSeconds; internal static ConfigEntry HudScale; internal static ConfigEntry HudOpacity; internal static ConfigEntry HudX; internal static ConfigEntry HudY; internal static ConfigEntry ReducedMotion; internal static ConfigEntry HighContrast; internal static ConfigEntry LargeText; internal static ConfigEntry ShowNameplateTitles; internal static ConfigEntry ShowOverheadWorldTitles; internal static ConfigEntry ShowLocalNameplateTitle; internal static ConfigEntry ShowTargetPanelTitles; internal static ConfigEntry NameplateTitleColor; internal static ConfigEntry UseTitleCategoryColors; internal static ConfigEntry EnableTitleGlow; internal static ConfigEntry GoldTitleGlow; internal static ConfigEntry HeirOfTheFallenGlow; internal static ConfigEntry HeirOfTheFallenPulse; internal static ConfigEntry TitleGlowIntensity; internal static ConfigEntry TitleGlowScale; private static GameObject? _host; private static GrimoireUiHost? _ui; internal static bool IsUiOpen { get { if ((Object)(object)_ui != (Object)null) { return _ui.IsOpen; } return false; } } internal static bool IsPointerOverUiPanel { get { if ((Object)(object)_ui != (Object)null) { return _ui.IsPointerOverPanel; } return false; } } public override void Load() { //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Expected O, but got Unknown LogSource = ((BasePlugin)this).Log; if (!(Application.productName == "VRisingServer")) { MigrateLegacyConfig(); ToggleKey = ((BasePlugin)this).Config.Bind("Interface", "ToggleKey", (KeyCode)288, "Key used to open or close Grimoire."); CombatHudToggleKey = ((BasePlugin)this).Config.Bind("Interface", "CombatHudToggleKey", (KeyCode)289, "Backup key used to show or hide the compact Reliquary combat HUD."); HudEnabled = ((BasePlugin)this).Config.Bind("Interface", "HudEnabled", true, "Show the compact equipped-relic HUD."); AutoCollapseHud = ((BasePlugin)this).Config.Bind("Interface", "AutoCollapseHud", true, "Collapse the combat HUD while no relic event, cooldown, or proc activity is present."); ClosedRefreshSeconds = ((BasePlugin)this).Config.Bind("Bridge", "ClosedRefreshSeconds", 3f, "State refresh interval while the panel is closed; Grimoire clamps this to 2–5 seconds so proc progress remains useful."); OpenRefreshSeconds = ((BasePlugin)this).Config.Bind("Bridge", "OpenRefreshSeconds", 2f, "State refresh interval while the panel is open."); HudScale = ((BasePlugin)this).Config.Bind("Appearance", "HudScale", 1f, "Combat HUD scale from 0.7 to 1.4."); HudOpacity = ((BasePlugin)this).Config.Bind("Appearance", "HudOpacity", 0.9f, "Combat HUD background opacity from 0.25 to 1.0."); HudX = ((BasePlugin)this).Config.Bind("Appearance", "HudX", 24f, "Combat HUD horizontal position at 1920x1080 reference resolution."); HudY = ((BasePlugin)this).Config.Bind("Appearance", "HudY", -70f, "Combat HUD vertical position at 1920x1080 reference resolution."); ReducedMotion = ((BasePlugin)this).Config.Bind("Accessibility", "ReducedMotion", false, "Disable pulsing Energy animation."); HighContrast = ((BasePlugin)this).Config.Bind("Accessibility", "HighContrast", false, "Use brighter high-contrast combat colors."); LargeText = ((BasePlugin)this).Config.Bind("Accessibility", "LargeText", false, "Increase combat HUD text size."); ShowNameplateTitles = ((BasePlugin)this).Config.Bind("Titles", "ShowNameplateTitles", true, "Show equipped Reliquary titles beneath online player names in the world."); ShowOverheadWorldTitles = ((BasePlugin)this).Config.Bind("Titles", "ShowOverheadWorldTitlesV3", true, "Show equipped Reliquary titles as independent overlays above vanilla player names. This does not patch or modify V Rising's name components."); ShowLocalNameplateTitle = ((BasePlugin)this).Config.Bind("Titles", "ShowLocalNameplateTitle", true, "Show your own equipped title when your local nameplate is visible."); ShowTargetPanelTitles = ((BasePlugin)this).Config.Bind("Titles", "ShowTargetHoverTitles", true, "Show equipped Reliquary titles beneath player names in the top target-hover panel."); NameplateTitleColor = ((BasePlugin)this).Config.Bind("Titles", "NameplateTitleColor", "D9B45B", "Six-digit RGB color used for overhead titles, without #."); UseTitleCategoryColors = ((BasePlugin)this).Config.Bind("Titles", "UseTitleCategoryColors", true, "Use the same achievement-category colors as the Hall of Titles; false uses NameplateTitleColor for every title."); EnableTitleGlow = ((BasePlugin)this).Config.Bind("TitleVisuals", "EnableTitleGlow", true, "Enable cached client-side glow layers for prestigious Reliquary titles."); GoldTitleGlow = ((BasePlugin)this).Config.Bind("TitleVisuals", "GoldTitleGlow", true, "Give Gold rarity titles a subtle static warm-gold aura."); HeirOfTheFallenGlow = ((BasePlugin)this).Config.Bind("TitleVisuals", "HeirOfTheFallenGlow", true, "Give Heir of the Fallen its unique crimson-and-gold aura."); HeirOfTheFallenPulse = ((BasePlugin)this).Config.Bind("TitleVisuals", "HeirOfTheFallenPulse", true, "Use a restrained slow pulse on the Heir of the Fallen glow."); TitleGlowIntensity = ((BasePlugin)this).Config.Bind("TitleVisuals", "TitleGlowIntensity", 1f, "Glow opacity multiplier, clamped from 0 to 2."); TitleGlowScale = ((BasePlugin)this).Config.Bind("TitleVisuals", "TitleGlowScale", 1f, "Glow expansion multiplier, clamped from 0.5 to 1.5."); ClassInjector.RegisterTypeInIl2Cpp(); Harmony = new Harmony("io.grimoire"); Harmony.PatchAll(); CreateHost(); ((BasePlugin)this).Log.LogInfo((object)"Grimoire 2.22.20 loaded. Master what you've claimed."); } } private static void CreateHost() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown _host = new GameObject("Grimoire.Host"); Object.DontDestroyOnLoad((Object)(object)_host); _ui = _host.AddComponent(); _ui.Initialize(); } internal static void TickUi() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown bool flag = default(bool); try { if ((Object)(object)_host == (Object)null || (Object)(object)_ui == (Object)null) { try { _ui?.Shutdown(); } catch { } _ui = null; _host = null; LogSource.LogInfo((object)"Grimoire host was removed during a scene transition; recreating it now."); CreateHost(); } _ui.Tick(); } catch (Exception ex) { ManualLogSource logSource = LogSource; BepInExErrorLogInterpolatedStringHandler val = new BepInExErrorLogInterpolatedStringHandler(18, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("UI update failed: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(ex); } logSource.LogError(val); } try { NameplateTitleService.Tick(); } catch (Exception ex2) { ManualLogSource logSource2 = LogSource; BepInExDebugLogInterpolatedStringHandler val2 = new BepInExDebugLogInterpolatedStringHandler(32, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val2).AppendLiteral("Nameplate title update skipped: "); ((BepInExLogInterpolatedStringHandler)val2).AppendFormatted(ex2.Message); } logSource2.LogDebug(val2); } } private void MigrateLegacyConfig() { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown try { string text = Path.Combine(Paths.ConfigPath, "io.grimoire.cfg"); string text2 = Path.Combine(Paths.ConfigPath, "io.vrelics.ui.cfg"); if (!File.Exists(text) && File.Exists(text2)) { File.Copy(text2, text, overwrite: false); ((BasePlugin)this).Config.Reload(); LogSource.LogInfo((object)"Copied legacy VRelicsUI settings into Grimoire. The old config was left unchanged."); } } catch (Exception ex) { ManualLogSource logSource = LogSource; bool flag = default(bool); BepInExWarningLogInterpolatedStringHandler val = new BepInExWarningLogInterpolatedStringHandler(34, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Grimoire config migration failed: "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(ex.Message); } logSource.LogWarning(val); } } public override bool Unload() { Harmony harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } CommandService.Reset(); RelicStateService.Reset(); NameplateTitleService.Reset(); _ui?.Shutdown(); if ((Object)(object)_host != (Object)null) { Object.Destroy((Object)(object)_host); } _ui = null; _host = null; return true; } } } namespace Grimoire.Utilities { internal static class EntityExtensions { internal static bool Has(this Entity e, EntityManager em) where T : struct { //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_000f: 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) if (e != Entity.Null && ((EntityManager)(ref em)).Exists(e)) { return ((EntityManager)(ref em)).HasComponent(e); } return false; } internal static T Read(this Entity e, EntityManager em) where T : struct { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return ((EntityManager)(ref em)).GetComponentData(e); } } } namespace Grimoire.UI { internal sealed class GrimoireUiHost : MonoBehaviour { private readonly record struct AffixCatalogEntry(string Name, string Compatibility, string Range, string Description); private GameObject? _panel; private Canvas? _canvas; private Text? _body; private Text? _detail; private Text? _summary; private Text? _mainTitle; private Text? _actionTitle; private Text? _hud; private GameObject? _hudPanel; private GameObject? _controlStrip; private RectTransform? _hudAccent; private Text? _selectedLabel; private GameObject? _tooltipPanel; private Text? _tooltipText; private GameObject? _codexPanel; private Text? _codexText; private GameObject? _titlesPanel; private Text? _titlesListText; private Text? _titleDetailText; private GameObject? _onlineTitlesPanel; private Text? _onlineTitlesText; private GameObject? _evolutionPanel; private Text? _evolutionHeader; private Text? _powerPathText; private Text? _dominionPathText; private Text? _corruptionPathText; private Text? _evolutionFooter; private GameObject? _synergyCatalogPanel; private Text? _synergyCatalogText; private GameObject? _legendaryCatalogPanel; private Text? _legendaryCatalogText; private GameObject? _affixCatalogPanel; private Text? _affixCatalogText; private GameObject? _confirmationBar; private Text? _confirmationText; private GameObject? _selectionBar; private GameObject? _leftCard; private GameObject? _rightCard; private GameObject? _fullDetailsButton; private GameObject? _localOverheadButton; private readonly List _rightCardTrim = new List(); private readonly List _rightCardInnerTrim = new List(); private GameObject? _actionTray; private Button? _adminTabButton; private InputField? _adminTarget; private readonly List _adminControls = new List(); private readonly List _collectionControls = new List(); private readonly List _buildControls = new List(); private readonly List _endgameControls = new List(); private readonly List _journalControls = new List(); private readonly List _optionControls = new List(); private readonly List _shopControls = new List(); private readonly List _visibleShopOfferIndices = new List(); private readonly List _shopRows = new List(); private readonly List _shopRowLabels = new List(); private readonly List _combatNotices = new List(); private readonly List _notificationHistory = new List(); private readonly List _collectionRows = new List(); private readonly List _collectionRowIds = new List(); private readonly List _titleRows = new List(); private readonly List _titleRowNames = new List(); private readonly List _hudHoverRows = new List(); private readonly List _hudHoverIds = new List(); private readonly List _toastPanels = new List(); private readonly List _toastTexts = new List(); private readonly List _themedButtonLabels = new List(); private readonly List _themedButtonImages = new List(); private readonly List _toastMessages = new List(); private readonly List _toastSeverities = new List(); private readonly List _toastCreatedUtc = new List(); private readonly List _toastExpiresUtc = new List(); private InputField? _collectionSearch; private InputField? _loadoutName; private string _collectionFilter = "ALL"; private string _collectionSort = "NAME"; private string _shopCategory = "ALL"; private string _titleCategoryFilter = "ALL"; private int _titlePage; private bool _showThemes; private bool _open; private int _tab; private int _selectedIndex; private int _huntDifficulty = 1; private int _synergyCatalogPage; private int _legendaryCatalogPage; private int _affixCatalogPage; private float _nextRefresh; private float _nextCooldownRender; private float _nextGlowRender; private bool _cursorVisible; private CursorLockMode _cursorLock; private bool _cursorCaptured; private string _pendingConfirmation = string.Empty; private float _confirmationUntil; private float _themePreviewUntil; private string _previewTheme = string.Empty; private string _notice = string.Empty; private Action? _pendingAction; private bool _initialized; private bool _tickConfirmed; private int _lastTickFrame = -1; private bool _toggleWasDown; private bool _hudToggleWasDown; private bool _escapeWasDown; private float _nextToggleAllowed; private string _hoveredCollectionRelicId = string.Empty; private string _hoveredHudRelicId = string.Empty; private float _hudHoverBeganAt; private string _hoveredShopOfferId = string.Empty; private float _shopHoverBeganAt; private string _codexRelicId = string.Empty; private int _codexPage; private string _staticCodexText = string.Empty; private static readonly string[] SynergyColors = new string[8] { "#64d8ff", "#ff7eb6", "#8ee28e", "#ffb45e", "#b99cff", "#f3e36f", "#57e3c2", "#ff8294" }; private static readonly HashSet RelicMasteryTitles = new HashSet(StringComparer.OrdinalIgnoreCase) { "Dracula’s Chosen", "Dracula's Chosen", "The Firstborn", "Serpent Archmage", "Avatar of Light", "Grave Commander", "The Unyielding", "Master Carver", "The Faithbreaker", "The Veilstalker", "Soul Reaper", "Heart of Winter", "The Unbroken", "Arcane Sovereign", "Curseweaver", "Hunter of Hunters", "The Nightstalker", "The Dreadwing", "Broodlord", "Bloodblade", "Stormforged" }; private static readonly AffixCatalogEntry[] AffixCatalog = new AffixCatalogEntry[24] { new AffixCatalogEntry("Accelerated", "All Relics", "C 2–3% • R 3.1–4% • E 4.1–5%", "Reduces general native proc cooldowns; does not affect major or partner-proc cooldowns."), new AffixCatalogEntry("Enduring", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases native Relic-effect duration."), new AffixCatalogEntry("Charged", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases proc magnitude and Relic Energy generation."), new AffixCatalogEntry("Studious", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases Mastery XP earned."), new AffixCatalogEntry("Potent", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases native proc-stat magnitude."), new AffixCatalogEntry("Surging", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases Relic Energy generated."), new AffixCatalogEntry("Overflowing", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases Overcharge amplification."), new AffixCatalogEntry("Focused", "All Relics", "C 5–8% • R 8.1–12% • E 12.1–15%", "Reduces only the Relic's major Ascended-state cooldown."), new AffixCatalogEntry("Catalytic", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Returns part of the Energy threshold immediately after an Overcharged proc."), new AffixCatalogEntry("Hunters", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases matching-boss and proc Mastery XP."), new AffixCatalogEntry("Challenging", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Improves Awakening signature progress through fractional accumulation."), new AffixCatalogEntry("Fortunate", "All Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Adds a percentage of the base drop chance to personal Relic pity while equipped."), new AffixCatalogEntry("Resonant", "Relics with a Synergy", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases proc magnitude while a normal Synergy partner is equipped."), new AffixCatalogEntry("Harmonic", "Relics with a Synergy", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases effect duration while a normal Synergy partner is equipped."), new AffixCatalogEntry("Warding", "Defense Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases Damage Reduction and resistance proc bonuses."), new AffixCatalogEntry("Stalwart", "Defense Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases Max Health and Healing Received proc bonuses."), new AffixCatalogEntry("Vicious", "Physical Relics", "C 4–6% • R 6.1–8% • E 8.1–10%", "Increases physical critical-damage proc bonuses."), new AffixCatalogEntry("Arcane", "Spell Relics", "C 4–6% • R 6.1–8% • E 8.1–10%", "Increases spell critical-damage proc bonuses."), new AffixCatalogEntry("Legion", "Summoning Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases summon duration."), new AffixCatalogEntry("Commanding", "Summoning Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases Minion Damage supplied by the summoning Relic."), new AffixCatalogEntry("Numerous", "Summoning Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Chance for each summon proc to add one summon; never multiplied by Overcharge."), new AffixCatalogEntry("Tenacious", "Summoning Relics", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases Relic summon health."), new AffixCatalogEntry("Restorative", "Solarus, Azariel, Foulrot", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases native Relic healing."), new AffixCatalogEntry("Sanguine", "Foulrot only", "C 5–7% • R 7.1–10% • E 10.1–12%", "Increases Soul Ward lifesteal healing.") }; internal bool IsOpen { get { if (_initialized) { return _open; } return false; } } internal bool IsPointerOverPanel { get { try { if (!_initialized) { return false; } if (IsPointerInside(_codexPanel)) { return true; } if (IsPointerInside(_titlesPanel)) { return true; } if (IsPointerInside(_onlineTitlesPanel)) { return true; } if (IsPointerInside(_evolutionPanel)) { return true; } if (IsPointerInside(_synergyCatalogPanel)) { return true; } if (IsPointerInside(_legendaryCatalogPanel)) { return true; } if (IsPointerInside(_affixCatalogPanel)) { return true; } if (IsPointerInside(_confirmationBar)) { return true; } if (_open && IsPointerInside(_panel)) { return true; } return IsPointerInside(_controlStrip); } catch { return false; } } } public GrimoireUiHost(IntPtr ptr) : base(ptr) { } [HideFromIl2Cpp] internal void Initialize() { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (!_initialized) { _initialized = true; Build(); RelicStateService.Changed += Render; RelicStateService.NoticeReceived += OnCombatNotice; RelicStateService.ActionMessageReceived += OnActionReply; ManualLogSource logSource = Plugin.LogSource; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(48, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Grimoire host started. Press "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(Plugin.ToggleKey.Value); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" to open the panel."); } logSource.LogInfo(val); } } [HideFromIl2Cpp] internal void Shutdown() { if (_initialized) { _initialized = false; RelicStateService.Changed -= Render; RelicStateService.NoticeReceived -= OnCombatNotice; RelicStateService.ActionMessageReceived -= OnActionReply; RestoreCursor(); } } [HideFromIl2Cpp] internal void Tick() { //IL_0127: 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_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Expected O, but got Unknown if (!_initialized) { return; } int frameCount = Time.frameCount; if (_lastTickFrame == frameCount) { return; } _lastTickFrame = frameCount; if (!_tickConfirmed) { _tickConfirmed = true; Plugin.LogSource.LogInfo((object)"Grimoire input loop is active."); } if (_combatNotices.RemoveAll((RelicNoticeUiState x) => DateTime.UtcNow - x.ReceivedUtc > TimeSpan.FromSeconds(x.Major ? 14.0 : 10.0)) > 0) { Render(); } UpdateToasts(); if (_themePreviewUntil > 0f && Time.unscaledTime >= _themePreviewUntil) { _themePreviewUntil = 0f; _previewTheme = string.Empty; ApplyTheme(RelicStateService.State.SelectedTheme); Render(); } if (Plugin.HudEnabled.Value && Time.unscaledTime >= _nextCooldownRender && RelicStateService.State.Relics.Values.Any((RelicUiState x) => HasActiveCooldown(x) || ActiveEffectRemaining(x) > 0)) { _nextCooldownRender = Time.unscaledTime + 1f; Render(); } bool key = Input.GetKey(Plugin.ToggleKey.Value); bool key2 = Input.GetKey(Plugin.CombatHudToggleKey.Value); bool key3 = Input.GetKey((KeyCode)27); bool flag = key && !_toggleWasDown; bool num = key2 && !_hudToggleWasDown; bool flag2 = key3 && !_escapeWasDown; _toggleWasDown = key; _hudToggleWasDown = key2; _escapeWasDown = key3; if (_open && flag2 && (Object)(object)_confirmationBar != (Object)null && _confirmationBar.activeInHierarchy && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.2f; CancelPendingAction(); } else if (_open && flag2 && (Object)(object)_evolutionPanel != (Object)null && _evolutionPanel.activeInHierarchy && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.25f; CloseEvolutionPaths(); } else if (_open && flag2 && (Object)(object)_synergyCatalogPanel != (Object)null && _synergyCatalogPanel.activeInHierarchy && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.25f; CloseSynergyCatalog(); } else if (_open && flag2 && (Object)(object)_legendaryCatalogPanel != (Object)null && _legendaryCatalogPanel.activeInHierarchy && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.25f; CloseLegendaryCatalog(); } else if (_open && flag2 && (Object)(object)_affixCatalogPanel != (Object)null && _affixCatalogPanel.activeInHierarchy && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.25f; CloseAffixCatalog(); } else if (_open && flag2 && (Object)(object)_titlesPanel != (Object)null && _titlesPanel.activeInHierarchy && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.25f; CloseTitles(); } else if (_open && flag2 && (Object)(object)_onlineTitlesPanel != (Object)null && _onlineTitlesPanel.activeInHierarchy && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.25f; CloseOnlineTitles(); } else if (_open && flag2 && (Object)(object)_codexPanel != (Object)null && _codexPanel.activeInHierarchy && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.25f; CloseCodex(); } else if ((flag || (_open && flag2)) && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.35f; ManualLogSource logSource = Plugin.LogSource; bool flag3 = default(bool); BepInExDebugLogInterpolatedStringHandler val = new BepInExDebugLogInterpolatedStringHandler(42, 1, ref flag3); if (flag3) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Grimoire toggle key detected; panel will "); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(_open ? "close" : "open"); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("."); } logSource.LogDebug(val); Toggle(); } if (num && Time.unscaledTime >= _nextToggleAllowed) { _nextToggleAllowed = Time.unscaledTime + 0.35f; ToggleCombatHud(); } if (Plugin.HudEnabled.Value && Time.unscaledTime >= _nextGlowRender && (RelicStateService.State.Relics.Values.Any((RelicUiState x) => x.Equipped && EnergyPercent(RelicStateService.State, x) >= 100) || !string.IsNullOrWhiteSpace(_hoveredHudRelicId) || !string.IsNullOrWhiteSpace(_hoveredCollectionRelicId))) { _nextGlowRender = Time.unscaledTime + 0.45f; Render(); } UpdateTooltip(); float num2 = (_open ? Mathf.Max(1.5f, Plugin.OpenRefreshSeconds.Value) : Mathf.Clamp(Plugin.ClosedRefreshSeconds.Value, 2f, 5f)); if (CommandService.Ready && Time.unscaledTime >= _nextRefresh) { _nextRefresh = Time.unscaledTime + num2; CommandService.Refresh(); } } [HideFromIl2Cpp] private void Toggle() { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown //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) EnsureVisualTree(); _open = !_open; if ((Object)(object)_panel != (Object)null) { _panel.SetActive(_open); } if ((Object)(object)_canvas != (Object)null) { ((Behaviour)_canvas).enabled = true; _canvas.overrideSorting = true; _canvas.sortingOrder = 32767; } ManualLogSource logSource = Plugin.LogSource; bool flag = default(bool); BepInExDebugLogInterpolatedStringHandler val = new BepInExDebugLogInterpolatedStringHandler(49, 4, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Grimoire render state: canvas="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted((Object)(object)_canvas != (Object)null && ((Behaviour)_canvas).enabled); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(", panel="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted((Object)(object)_panel != (Object)null && _panel.activeInHierarchy); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(", screen="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(Screen.width); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("x"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted(Screen.height); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("."); } logSource.LogDebug(val); if (_open) { _cursorVisible = Cursor.visible; _cursorLock = Cursor.lockState; _cursorCaptured = true; Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; CommandService.Refresh(); Render(); } else { RestoreCursor(); } } [HideFromIl2Cpp] private void RestoreCursor() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (_cursorCaptured) { Cursor.visible = _cursorVisible; Cursor.lockState = _cursorLock; _cursorCaptured = false; } } [HideFromIl2Cpp] private void ToggleCombatHud() { Plugin.HudEnabled.Value = !Plugin.HudEnabled.Value; Render(); } private static bool IsPointerInside(GameObject? target) { //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) if ((Object)(object)target == (Object)null || !target.activeInHierarchy) { return false; } RectTransform component = target.GetComponent(); if ((Object)(object)component != (Object)null) { return RectTransformUtility.RectangleContainsScreenPoint(component, Vector2.op_Implicit(Input.mousePosition), (Camera)null); } return false; } [HideFromIl2Cpp] private void UpdateTooltip() { //IL_01e4: 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_049b: Unknown result type (might be due to invalid IL or missing references) //IL_07aa: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_tooltipPanel == (Object)null || (Object)(object)_tooltipText == (Object)null || (Object)(object)_canvas == (Object)null) { return; } RelicUiState value = null; bool flag = false; string text = string.Empty; string text2 = string.Empty; ShopOfferUiState shopOfferUiState = null; if (_open && _tab == 0) { for (int i = 0; i < _collectionRows.Count; i++) { if (_collectionRows[i].activeInHierarchy && IsPointerInside(_collectionRows[i])) { text = _collectionRowIds[i]; break; } } } if (_open && _tab == 5) { PlayerUiState state = RelicStateService.State; for (int j = 0; j < _shopRows.Count && j < _visibleShopOfferIndices.Count; j++) { if (_shopRows[j].activeInHierarchy && IsPointerInside(_shopRows[j])) { int num = _visibleShopOfferIndices[j]; if (num >= 0 && num < state.ShopOffers.Count) { shopOfferUiState = state.ShopOffers[num]; } break; } } } string text3 = shopOfferUiState?.Id ?? string.Empty; if (!string.Equals(text3, _hoveredShopOfferId, StringComparison.OrdinalIgnoreCase)) { _shopHoverBeganAt = Time.unscaledTime; } _hoveredShopOfferId = text3; if (shopOfferUiState != null) { if (Time.unscaledTime - _shopHoverBeganAt < 1f) { _tooltipPanel.SetActive(false); return; } PlayerUiState state2 = RelicStateService.State; ApplyTheme(state2.SelectedTheme); ((Graphic)_tooltipPanel.GetComponent()).color = new Color(0.008f, 0.006f, 0.014f, 1f); string value2 = ((shopOfferUiState.DailyLimit <= 0) ? ((shopOfferUiState.WeeklyLimit > 0) ? $"Weekly usage: {shopOfferUiState.WeeklyUsed}/{shopOfferUiState.WeeklyLimit}" : "No purchase limit") : ((shopOfferUiState.DailyUsed < 0) ? $"Daily limit: {shopOfferUiState.DailyLimit} per Relic" : $"Daily usage: {shopOfferUiState.DailyUsed}/{shopOfferUiState.DailyLimit}")); string value3 = (shopOfferUiState.RequiresRelic ? ("Selected Relic: " + (Selected()?.RelicName ?? "None")) : "No selected Relic required"); string value4 = (shopOfferUiState.Eligible ? "AVAILABLE" : (string.IsNullOrWhiteSpace(shopOfferUiState.EligibilityReason) ? "UNAVAILABLE" : shopOfferUiState.EligibilityReason)); _tooltipText.text = $"{Escape(shopOfferUiState.Name)} {shopOfferUiState.Cost} Essence\n{Escape(shopOfferUiState.Category)}\n\n{Escape(shopOfferUiState.Description)}\n\n{Escape(value4)}\n{Escape(value3)} • {Escape(value2)}"; ResizeTooltip(new Vector2(450f, 210f), new Vector2(420f, 184f)); PositionTooltip(); return; } if (string.IsNullOrWhiteSpace(text) && Plugin.HudEnabled.Value) { for (int k = 0; k < _hudHoverRows.Count; k++) { if (_hudHoverRows[k].activeInHierarchy && IsPointerInside(_hudHoverRows[k])) { text2 = _hudHoverIds[k]; flag = true; break; } } } bool num2 = !string.Equals(text, _hoveredCollectionRelicId, StringComparison.OrdinalIgnoreCase) || !string.Equals(text2, _hoveredHudRelicId, StringComparison.OrdinalIgnoreCase); if (!string.Equals(text2, _hoveredHudRelicId, StringComparison.OrdinalIgnoreCase)) { _hudHoverBeganAt = Time.unscaledTime; } _hoveredCollectionRelicId = text; _hoveredHudRelicId = text2; if (num2) { Render(); } if (!string.IsNullOrWhiteSpace(text)) { _tooltipPanel.SetActive(false); return; } if (!string.IsNullOrWhiteSpace(text2)) { RelicStateService.State.Relics.TryGetValue(text2, out value); } if (value == null || !flag || Time.unscaledTime - _hudHoverBeganAt < 1f) { _tooltipPanel.SetActive(false); return; } PlayerUiState state3 = RelicStateService.State; ApplyTheme(state3.SelectedTheme); int num3 = ActiveEffectRemaining(value); int num4 = CooldownRemaining(value, value.MajorCooldownSeconds); string value5 = ((value.Tier < 3) ? "Locked until Ascended" : ((num3 > 0) ? $"{(string.IsNullOrWhiteSpace(value.ActiveEffectName) ? "Major state" : Escape(value.ActiveEffectName))} active — {num3}s" : ((num4 > 0) ? $"Recharging — {num4}s" : "Ready — glowing diamond"))); _tooltipText.text = $"{Escape(value.RelicName)} {Tier(value.Tier)}\n◆ CAPSTONE {value5}\nENERGY {EnergyPercent(state3, value)}%{((EnergyPercent(state3, value) >= 100) ? " — next proc empowered" : string.Empty)}\n{Escape(value.Description)}"; ResizeTooltip(new Vector2(360f, 148f), new Vector2(334f, 128f)); PositionTooltip(); } private void ResizeTooltip(Vector2 panelSize, Vector2 textSize) { //IL_0019: 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 ((Object)(object)_tooltipPanel != (Object)null) { _tooltipPanel.GetComponent().sizeDelta = panelSize; } if ((Object)(object)_tooltipText != (Object)null) { ((Component)_tooltipText).GetComponent().sizeDelta = textSize; } } private void PositionTooltip() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_005d: 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_007c: 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) if (!((Object)(object)_tooltipPanel == (Object)null) && !((Object)(object)_canvas == (Object)null)) { _tooltipPanel.SetActive(true); Vector2 val = default(Vector2); if (RectTransformUtility.ScreenPointToLocalPointInRectangle(((Component)_canvas).GetComponent(), Vector2.op_Implicit(Input.mousePosition), (Camera)null, ref val)) { val += new Vector2(22f, -18f); val.x = Mathf.Clamp(val.x, -760f, 570f); val.y = Mathf.Clamp(val.y, -390f, 460f); _tooltipPanel.GetComponent().anchoredPosition = val; } _tooltipPanel.transform.SetAsLastSibling(); } } [HideFromIl2Cpp] private void Build() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_00ac: 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_00e7: 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_0133: 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_0170: 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_01e0: 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_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: 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_0318: 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_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_048b: 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_04f4: 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_0532: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05d8: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_064b: 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) //IL_06f8: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07ba: Unknown result type (might be due to invalid IL or missing references) //IL_07fb: Unknown result type (might be due to invalid IL or missing references) //IL_0836: Unknown result type (might be due to invalid IL or missing references) //IL_0845: Unknown result type (might be due to invalid IL or missing references) //IL_0879: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_08cb: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Unknown result type (might be due to invalid IL or missing references) //IL_090e: Unknown result type (might be due to invalid IL or missing references) //IL_0958: Unknown result type (might be due to invalid IL or missing references) //IL_09a2: Unknown result type (might be due to invalid IL or missing references) //IL_09b1: Unknown result type (might be due to invalid IL or missing references) //IL_09e5: Unknown result type (might be due to invalid IL or missing references) //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_0a37: Unknown result type (might be due to invalid IL or missing references) //IL_0a6b: Unknown result type (might be due to invalid IL or missing references) //IL_0a7a: Unknown result type (might be due to invalid IL or missing references) //IL_0ac4: Unknown result type (might be due to invalid IL or missing references) //IL_0b09: Unknown result type (might be due to invalid IL or missing references) //IL_0b18: Unknown result type (might be due to invalid IL or missing references) //IL_0b50: Unknown result type (might be due to invalid IL or missing references) //IL_0b77: Unknown result type (might be due to invalid IL or missing references) //IL_0b86: Unknown result type (might be due to invalid IL or missing references) //IL_0bb4: Unknown result type (might be due to invalid IL or missing references) //IL_0c51: Unknown result type (might be due to invalid IL or missing references) //IL_0c7a: Unknown result type (might be due to invalid IL or missing references) //IL_0c89: Unknown result type (might be due to invalid IL or missing references) //IL_0cac: Unknown result type (might be due to invalid IL or missing references) //IL_0cc7: Unknown result type (might be due to invalid IL or missing references) //IL_0cd6: Unknown result type (might be due to invalid IL or missing references) //IL_0ce5: Unknown result type (might be due to invalid IL or missing references) //IL_0d18: Unknown result type (might be due to invalid IL or missing references) //IL_0d3d: Unknown result type (might be due to invalid IL or missing references) //IL_0d74: Unknown result type (might be due to invalid IL or missing references) //IL_0da1: Unknown result type (might be due to invalid IL or missing references) //IL_0db0: Unknown result type (might be due to invalid IL or missing references) //IL_0dbf: Unknown result type (might be due to invalid IL or missing references) //IL_0df3: Unknown result type (might be due to invalid IL or missing references) //IL_0e18: Unknown result type (might be due to invalid IL or missing references) //IL_0e27: Unknown result type (might be due to invalid IL or missing references) //IL_0e57: Unknown result type (might be due to invalid IL or missing references) //IL_0e90: Unknown result type (might be due to invalid IL or missing references) //IL_0e9f: Unknown result type (might be due to invalid IL or missing references) //IL_0ee2: Unknown result type (might be due to invalid IL or missing references) //IL_0ef1: Unknown result type (might be due to invalid IL or missing references) //IL_0f57: Unknown result type (might be due to invalid IL or missing references) //IL_0f66: Unknown result type (might be due to invalid IL or missing references) //IL_0f75: Unknown result type (might be due to invalid IL or missing references) //IL_0fa8: Unknown result type (might be due to invalid IL or missing references) //IL_0fe0: Unknown result type (might be due to invalid IL or missing references) //IL_0fef: Unknown result type (might be due to invalid IL or missing references) //IL_103f: Unknown result type (might be due to invalid IL or missing references) //IL_104e: Unknown result type (might be due to invalid IL or missing references) //IL_105d: Unknown result type (might be due to invalid IL or missing references) //IL_1093: Unknown result type (might be due to invalid IL or missing references) //IL_10a2: Unknown result type (might be due to invalid IL or missing references) //IL_10ff: Unknown result type (might be due to invalid IL or missing references) //IL_110e: Unknown result type (might be due to invalid IL or missing references) //IL_111d: Unknown result type (might be due to invalid IL or missing references) //IL_1150: Unknown result type (might be due to invalid IL or missing references) //IL_1176: Unknown result type (might be due to invalid IL or missing references) //IL_1185: Unknown result type (might be due to invalid IL or missing references) //IL_11a8: Unknown result type (might be due to invalid IL or missing references) //IL_11cd: Unknown result type (might be due to invalid IL or missing references) //IL_1204: Unknown result type (might be due to invalid IL or missing references) //IL_123b: Unknown result type (might be due to invalid IL or missing references) //IL_1272: Unknown result type (might be due to invalid IL or missing references) //IL_12a9: Unknown result type (might be due to invalid IL or missing references) //IL_12e0: Unknown result type (might be due to invalid IL or missing references) //IL_1317: Unknown result type (might be due to invalid IL or missing references) //IL_1350: Unknown result type (might be due to invalid IL or missing references) //IL_135f: Unknown result type (might be due to invalid IL or missing references) //IL_13a0: Unknown result type (might be due to invalid IL or missing references) //IL_13af: Unknown result type (might be due to invalid IL or missing references) //IL_13d2: Unknown result type (might be due to invalid IL or missing references) //IL_13ef: Unknown result type (might be due to invalid IL or missing references) //IL_13fe: Unknown result type (might be due to invalid IL or missing references) //IL_140d: Unknown result type (might be due to invalid IL or missing references) //IL_1440: Unknown result type (might be due to invalid IL or missing references) //IL_1466: Unknown result type (might be due to invalid IL or missing references) //IL_1475: Unknown result type (might be due to invalid IL or missing references) //IL_1498: Unknown result type (might be due to invalid IL or missing references) //IL_14bd: Unknown result type (might be due to invalid IL or missing references) //IL_14f4: Unknown result type (might be due to invalid IL or missing references) //IL_152b: Unknown result type (might be due to invalid IL or missing references) //IL_1562: Unknown result type (might be due to invalid IL or missing references) //IL_1599: Unknown result type (might be due to invalid IL or missing references) //IL_15d0: Unknown result type (might be due to invalid IL or missing references) //IL_1607: Unknown result type (might be due to invalid IL or missing references) //IL_163e: Unknown result type (might be due to invalid IL or missing references) //IL_166f: Unknown result type (might be due to invalid IL or missing references) //IL_167e: Unknown result type (might be due to invalid IL or missing references) //IL_16a9: Unknown result type (might be due to invalid IL or missing references) //IL_16b8: Unknown result type (might be due to invalid IL or missing references) //IL_16e7: Unknown result type (might be due to invalid IL or missing references) //IL_16f6: Unknown result type (might be due to invalid IL or missing references) //IL_1734: Unknown result type (might be due to invalid IL or missing references) //IL_1743: Unknown result type (might be due to invalid IL or missing references) //IL_17a3: Unknown result type (might be due to invalid IL or missing references) //IL_17b2: Unknown result type (might be due to invalid IL or missing references) //IL_181b: Unknown result type (might be due to invalid IL or missing references) //IL_1852: Unknown result type (might be due to invalid IL or missing references) //IL_188a: Unknown result type (might be due to invalid IL or missing references) //IL_1899: Unknown result type (might be due to invalid IL or missing references) //IL_18bc: Unknown result type (might be due to invalid IL or missing references) //IL_18d9: Unknown result type (might be due to invalid IL or missing references) //IL_18e8: Unknown result type (might be due to invalid IL or missing references) //IL_18f7: Unknown result type (might be due to invalid IL or missing references) //IL_192a: Unknown result type (might be due to invalid IL or missing references) //IL_1950: Unknown result type (might be due to invalid IL or missing references) //IL_195f: Unknown result type (might be due to invalid IL or missing references) //IL_1982: Unknown result type (might be due to invalid IL or missing references) //IL_19a7: Unknown result type (might be due to invalid IL or missing references) //IL_19d8: Unknown result type (might be due to invalid IL or missing references) //IL_19e7: Unknown result type (might be due to invalid IL or missing references) //IL_1a16: Unknown result type (might be due to invalid IL or missing references) //IL_1a25: Unknown result type (might be due to invalid IL or missing references) //IL_1a66: Unknown result type (might be due to invalid IL or missing references) //IL_1a75: Unknown result type (might be due to invalid IL or missing references) //IL_1a98: Unknown result type (might be due to invalid IL or missing references) //IL_1ab5: Unknown result type (might be due to invalid IL or missing references) //IL_1ac4: Unknown result type (might be due to invalid IL or missing references) //IL_1ad3: Unknown result type (might be due to invalid IL or missing references) //IL_1b06: Unknown result type (might be due to invalid IL or missing references) //IL_1b2c: Unknown result type (might be due to invalid IL or missing references) //IL_1b3b: Unknown result type (might be due to invalid IL or missing references) //IL_1b5e: Unknown result type (might be due to invalid IL or missing references) //IL_1b83: Unknown result type (might be due to invalid IL or missing references) //IL_1bbc: Unknown result type (might be due to invalid IL or missing references) //IL_1bcb: Unknown result type (might be due to invalid IL or missing references) //IL_1c05: Unknown result type (might be due to invalid IL or missing references) //IL_1c14: Unknown result type (might be due to invalid IL or missing references) //IL_1c3f: Unknown result type (might be due to invalid IL or missing references) //IL_1c4e: Unknown result type (might be due to invalid IL or missing references) //IL_1c79: Unknown result type (might be due to invalid IL or missing references) //IL_1c88: Unknown result type (might be due to invalid IL or missing references) //IL_1cb9: Unknown result type (might be due to invalid IL or missing references) //IL_1cde: Unknown result type (might be due to invalid IL or missing references) //IL_1d03: Unknown result type (might be due to invalid IL or missing references) //IL_1d26: Unknown result type (might be due to invalid IL or missing references) //IL_1d35: Unknown result type (might be due to invalid IL or missing references) //IL_1d73: Unknown result type (might be due to invalid IL or missing references) //IL_1d82: Unknown result type (might be due to invalid IL or missing references) //IL_1dc0: Unknown result type (might be due to invalid IL or missing references) //IL_1dcf: Unknown result type (might be due to invalid IL or missing references) //IL_1e0b: Unknown result type (might be due to invalid IL or missing references) //IL_1e3e: Unknown result type (might be due to invalid IL or missing references) //IL_1e71: Unknown result type (might be due to invalid IL or missing references) //IL_1eaa: Unknown result type (might be due to invalid IL or missing references) //IL_1eb9: Unknown result type (might be due to invalid IL or missing references) //IL_1ef9: Unknown result type (might be due to invalid IL or missing references) //IL_1f28: Unknown result type (might be due to invalid IL or missing references) //IL_1f37: Unknown result type (might be due to invalid IL or missing references) //IL_1f46: Unknown result type (might be due to invalid IL or missing references) //IL_1f79: Unknown result type (might be due to invalid IL or missing references) //IL_1f9f: Unknown result type (might be due to invalid IL or missing references) //IL_1fae: Unknown result type (might be due to invalid IL or missing references) //IL_1fd1: Unknown result type (might be due to invalid IL or missing references) //IL_1ff6: Unknown result type (might be due to invalid IL or missing references) //IL_202d: Unknown result type (might be due to invalid IL or missing references) //IL_2064: Unknown result type (might be due to invalid IL or missing references) //IL_209d: Unknown result type (might be due to invalid IL or missing references) //IL_20ac: Unknown result type (might be due to invalid IL or missing references) //IL_20ed: Unknown result type (might be due to invalid IL or missing references) //IL_20fc: Unknown result type (might be due to invalid IL or missing references) //IL_211f: Unknown result type (might be due to invalid IL or missing references) //IL_213c: Unknown result type (might be due to invalid IL or missing references) //IL_214b: Unknown result type (might be due to invalid IL or missing references) //IL_215a: Unknown result type (might be due to invalid IL or missing references) //IL_218d: Unknown result type (might be due to invalid IL or missing references) //IL_21b3: Unknown result type (might be due to invalid IL or missing references) //IL_21c2: Unknown result type (might be due to invalid IL or missing references) //IL_21e5: Unknown result type (might be due to invalid IL or missing references) //IL_220a: Unknown result type (might be due to invalid IL or missing references) //IL_2241: Unknown result type (might be due to invalid IL or missing references) //IL_2278: Unknown result type (might be due to invalid IL or missing references) //IL_22b1: Unknown result type (might be due to invalid IL or missing references) //IL_22c0: Unknown result type (might be due to invalid IL or missing references) //IL_2301: Unknown result type (might be due to invalid IL or missing references) //IL_2310: Unknown result type (might be due to invalid IL or missing references) //IL_2333: Unknown result type (might be due to invalid IL or missing references) //IL_2350: Unknown result type (might be due to invalid IL or missing references) //IL_235f: Unknown result type (might be due to invalid IL or missing references) //IL_236e: Unknown result type (might be due to invalid IL or missing references) //IL_23a1: Unknown result type (might be due to invalid IL or missing references) //IL_23c7: Unknown result type (might be due to invalid IL or missing references) //IL_23d6: Unknown result type (might be due to invalid IL or missing references) //IL_23f9: Unknown result type (might be due to invalid IL or missing references) //IL_241e: Unknown result type (might be due to invalid IL or missing references) //IL_2455: Unknown result type (might be due to invalid IL or missing references) //IL_248c: Unknown result type (might be due to invalid IL or missing references) //IL_24c5: Unknown result type (might be due to invalid IL or missing references) //IL_24d4: Unknown result type (might be due to invalid IL or missing references) //IL_2515: Unknown result type (might be due to invalid IL or missing references) //IL_2524: Unknown result type (might be due to invalid IL or missing references) //IL_2547: Unknown result type (might be due to invalid IL or missing references) //IL_256e: Unknown result type (might be due to invalid IL or missing references) //IL_257d: Unknown result type (might be due to invalid IL or missing references) //IL_258c: Unknown result type (might be due to invalid IL or missing references) //IL_25bf: Unknown result type (might be due to invalid IL or missing references) //IL_25e6: Unknown result type (might be due to invalid IL or missing references) //IL_25f5: Unknown result type (might be due to invalid IL or missing references) //IL_2635: Unknown result type (might be due to invalid IL or missing references) //IL_266c: Unknown result type (might be due to invalid IL or missing references) _adminControls.Clear(); _collectionControls.Clear(); _buildControls.Clear(); _endgameControls.Clear(); _journalControls.Clear(); _optionControls.Clear(); GameObject val = new GameObject("Grimoire.Canvas"); val.transform.SetParent(((Component)this).transform, false); val.layer = 5; Canvas val2 = (_canvas = val.AddComponent()); val2.renderMode = (RenderMode)0; val2.overrideSorting = true; val2.sortingOrder = 32767; val2.targetDisplay = 0; CanvasScaler obj = val.AddComponent(); obj.uiScaleMode = (ScaleMode)1; obj.referenceResolution = new Vector2(1920f, 1080f); obj.matchWidthOrHeight = 0.5f; val.AddComponent(); _panel = Box(val.transform, new Vector2(0f, 0f), new Vector2(1000f, 760f), (Vector2?)new Vector2(0.5f, 0.5f)); _panel.SetActive(false); _mainTitle = Txt(_panel.transform, "GRIMOIRE // RELIQUARY", 25, new Vector2(24f, -15f), new Vector2(480f, 34f)); ((Graphic)_mainTitle).color = new Color(0.92f, 0.76f, 1f); _summary = Txt(_panel.transform, "Connecting to server...", 14, new Vector2(500f, -20f), new Vector2(475f, 24f)); _summary.alignment = (TextAnchor)2; ((Graphic)_summary).color = new Color(0.76f, 0.71f, 0.82f); Button(_panel.transform, "COLLECTION", new Vector2(24f, -57f), 115f, delegate { _tab = 0; Render(); }); Button(_panel.transform, "BUILDCRAFT", new Vector2(147f, -57f), 115f, delegate { _tab = 1; Render(); }); Button(_panel.transform, "REQUIEM", new Vector2(270f, -57f), 105f, delegate { _tab = 2; Render(); }); Button(_panel.transform, "JOURNAL", new Vector2(383f, -57f), 105f, delegate { _tab = 3; Render(); }); Button(_panel.transform, "OPTIONS", new Vector2(496f, -57f), 105f, delegate { _tab = 4; Render(); }); Button(_panel.transform, "SHOP", new Vector2(609f, -57f), 90f, delegate { _tab = 5; Render(); }); GameObject val3 = Button(_panel.transform, "ADMIN", new Vector2(707f, -57f), 90f, delegate { if (RelicStateService.State.IsAdmin) { _tab = 6; Render(); } }); _adminTabButton = val3.GetComponent