Decompiled source of Grimoire v2.22.20
Grimoire.dll
Decompiled a day ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.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<KeyCode> ToggleKey; internal static ConfigEntry<KeyCode> CombatHudToggleKey; internal static ConfigEntry<bool> HudEnabled; internal static ConfigEntry<bool> AutoCollapseHud; internal static ConfigEntry<float> ClosedRefreshSeconds; internal static ConfigEntry<float> OpenRefreshSeconds; internal static ConfigEntry<float> HudScale; internal static ConfigEntry<float> HudOpacity; internal static ConfigEntry<float> HudX; internal static ConfigEntry<float> HudY; internal static ConfigEntry<bool> ReducedMotion; internal static ConfigEntry<bool> HighContrast; internal static ConfigEntry<bool> LargeText; internal static ConfigEntry<bool> ShowNameplateTitles; internal static ConfigEntry<bool> ShowOverheadWorldTitles; internal static ConfigEntry<bool> ShowLocalNameplateTitle; internal static ConfigEntry<bool> ShowTargetPanelTitles; internal static ConfigEntry<string> NameplateTitleColor; internal static ConfigEntry<bool> UseTitleCategoryColors; internal static ConfigEntry<bool> EnableTitleGlow; internal static ConfigEntry<bool> GoldTitleGlow; internal static ConfigEntry<bool> HeirOfTheFallenGlow; internal static ConfigEntry<bool> HeirOfTheFallenPulse; internal static ConfigEntry<float> TitleGlowIntensity; internal static ConfigEntry<float> 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<KeyCode>("Interface", "ToggleKey", (KeyCode)288, "Key used to open or close Grimoire."); CombatHudToggleKey = ((BasePlugin)this).Config.Bind<KeyCode>("Interface", "CombatHudToggleKey", (KeyCode)289, "Backup key used to show or hide the compact Reliquary combat HUD."); HudEnabled = ((BasePlugin)this).Config.Bind<bool>("Interface", "HudEnabled", true, "Show the compact equipped-relic HUD."); AutoCollapseHud = ((BasePlugin)this).Config.Bind<bool>("Interface", "AutoCollapseHud", true, "Collapse the combat HUD while no relic event, cooldown, or proc activity is present."); ClosedRefreshSeconds = ((BasePlugin)this).Config.Bind<float>("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<float>("Bridge", "OpenRefreshSeconds", 2f, "State refresh interval while the panel is open."); HudScale = ((BasePlugin)this).Config.Bind<float>("Appearance", "HudScale", 1f, "Combat HUD scale from 0.7 to 1.4."); HudOpacity = ((BasePlugin)this).Config.Bind<float>("Appearance", "HudOpacity", 0.9f, "Combat HUD background opacity from 0.25 to 1.0."); HudX = ((BasePlugin)this).Config.Bind<float>("Appearance", "HudX", 24f, "Combat HUD horizontal position at 1920x1080 reference resolution."); HudY = ((BasePlugin)this).Config.Bind<float>("Appearance", "HudY", -70f, "Combat HUD vertical position at 1920x1080 reference resolution."); ReducedMotion = ((BasePlugin)this).Config.Bind<bool>("Accessibility", "ReducedMotion", false, "Disable pulsing Energy animation."); HighContrast = ((BasePlugin)this).Config.Bind<bool>("Accessibility", "HighContrast", false, "Use brighter high-contrast combat colors."); LargeText = ((BasePlugin)this).Config.Bind<bool>("Accessibility", "LargeText", false, "Increase combat HUD text size."); ShowNameplateTitles = ((BasePlugin)this).Config.Bind<bool>("Titles", "ShowNameplateTitles", true, "Show equipped Reliquary titles beneath online player names in the world."); ShowOverheadWorldTitles = ((BasePlugin)this).Config.Bind<bool>("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<bool>("Titles", "ShowLocalNameplateTitle", true, "Show your own equipped title when your local nameplate is visible."); ShowTargetPanelTitles = ((BasePlugin)this).Config.Bind<bool>("Titles", "ShowTargetHoverTitles", true, "Show equipped Reliquary titles beneath player names in the top target-hover panel."); NameplateTitleColor = ((BasePlugin)this).Config.Bind<string>("Titles", "NameplateTitleColor", "D9B45B", "Six-digit RGB color used for overhead titles, without #."); UseTitleCategoryColors = ((BasePlugin)this).Config.Bind<bool>("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<bool>("TitleVisuals", "EnableTitleGlow", true, "Enable cached client-side glow layers for prestigious Reliquary titles."); GoldTitleGlow = ((BasePlugin)this).Config.Bind<bool>("TitleVisuals", "GoldTitleGlow", true, "Give Gold rarity titles a subtle static warm-gold aura."); HeirOfTheFallenGlow = ((BasePlugin)this).Config.Bind<bool>("TitleVisuals", "HeirOfTheFallenGlow", true, "Give Heir of the Fallen its unique crimson-and-gold aura."); HeirOfTheFallenPulse = ((BasePlugin)this).Config.Bind<bool>("TitleVisuals", "HeirOfTheFallenPulse", true, "Use a restrained slow pulse on the Heir of the Fallen glow."); TitleGlowIntensity = ((BasePlugin)this).Config.Bind<float>("TitleVisuals", "TitleGlowIntensity", 1f, "Glow opacity multiplier, clamped from 0 to 2."); TitleGlowScale = ((BasePlugin)this).Config.Bind<float>("TitleVisuals", "TitleGlowScale", 1f, "Glow expansion multiplier, clamped from 0.5 to 1.5."); ClassInjector.RegisterTypeInIl2Cpp<GrimoireUiHost>(); 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<GrimoireUiHost>(); _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<Exception>(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<string>(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<string>(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<T>(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<T>(e); } return false; } internal static T Read<T>(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<T>(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<GameObject> _rightCardTrim = new List<GameObject>(); private readonly List<GameObject> _rightCardInnerTrim = new List<GameObject>(); private GameObject? _actionTray; private Button? _adminTabButton; private InputField? _adminTarget; private readonly List<GameObject> _adminControls = new List<GameObject>(); private readonly List<GameObject> _collectionControls = new List<GameObject>(); private readonly List<GameObject> _buildControls = new List<GameObject>(); private readonly List<GameObject> _endgameControls = new List<GameObject>(); private readonly List<GameObject> _journalControls = new List<GameObject>(); private readonly List<GameObject> _optionControls = new List<GameObject>(); private readonly List<GameObject> _shopControls = new List<GameObject>(); private readonly List<int> _visibleShopOfferIndices = new List<int>(); private readonly List<GameObject> _shopRows = new List<GameObject>(); private readonly List<Text> _shopRowLabels = new List<Text>(); private readonly List<RelicNoticeUiState> _combatNotices = new List<RelicNoticeUiState>(); private readonly List<RelicNoticeUiState> _notificationHistory = new List<RelicNoticeUiState>(); private readonly List<GameObject> _collectionRows = new List<GameObject>(); private readonly List<string> _collectionRowIds = new List<string>(); private readonly List<GameObject> _titleRows = new List<GameObject>(); private readonly List<string> _titleRowNames = new List<string>(); private readonly List<GameObject> _hudHoverRows = new List<GameObject>(); private readonly List<string> _hudHoverIds = new List<string>(); private readonly List<GameObject> _toastPanels = new List<GameObject>(); private readonly List<Text> _toastTexts = new List<Text>(); private readonly List<Text> _themedButtonLabels = new List<Text>(); private readonly List<Image> _themedButtonImages = new List<Image>(); private readonly List<string> _toastMessages = new List<string>(); private readonly List<string> _toastSeverities = new List<string>(); private readonly List<DateTime> _toastCreatedUtc = new List<DateTime>(); private readonly List<DateTime> _toastExpiresUtc = new List<DateTime>(); 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<string> RelicMasteryTitles = new HashSet<string>(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<KeyCode>(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<string>(_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<bool>((Object)(object)_canvas != (Object)null && ((Behaviour)_canvas).enabled); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(", panel="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<bool>((Object)(object)_panel != (Object)null && _panel.activeInHierarchy); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral(", screen="); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(Screen.width); ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("x"); ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(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<RectTransform>(); 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<Image>()).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 = $"<color=#e5c5ff><size=16><b>{Escape(shopOfferUiState.Name)}</b></size></color> <color=#ffd966>{shopOfferUiState.Cost} Essence</color>\n<color=#9f91aa>{Escape(shopOfferUiState.Category)}</color>\n\n{Escape(shopOfferUiState.Description)}\n\n<color={(shopOfferUiState.Eligible ? "#8ee28e" : "#ff8f9b")}><b>{Escape(value4)}</b></color>\n<color=#9f91aa>{Escape(value3)} • {Escape(value2)}</color>"; 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 = $"<color=#e5c5ff><b>{Escape(value.RelicName)}</b></color> <color=#aaa0b5>{Tier(value.Tier)}</color>\n<color=#ffd966>◆ CAPSTONE</color> {value5}\n<color=#c9a7e8>ENERGY</color> {EnergyPercent(state3, value)}%{((EnergyPercent(state3, value) >= 100) ? " — next proc empowered" : string.Empty)}\n<color=#9f91aa>{Escape(value.Description)}</color>"; 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<RectTransform>().sizeDelta = panelSize; } if ((Object)(object)_tooltipText != (Object)null) { ((Component)_tooltipText).GetComponent<RectTransform>().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<RectTransform>(), 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<RectTransform>().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<Canvas>()); val2.renderMode = (RenderMode)0; val2.overrideSorting = true; val2.sortingOrder = 32767; val2.targetDisplay = 0; CanvasScaler obj = val.AddComponent<CanvasScaler>(); obj.uiScaleMode = (ScaleMode)1; obj.referenceResolution = new Vector2(1920f, 1080f); obj.matchWidthOrHeight = 0.5f; val.AddComponent<GraphicRaycaster>(); _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<Button>(); val3.SetActive(false); Button(_panel.transform, "REFRESH", new Vector2(855f, -57f), 120f, CommandService.Refresh); _selectionBar = Box(_panel.transform, new Vector2(24f, -103f), new Vector2(952f, 42f)); ((Graphic)_selectionBar.GetComponent<Image>()).color = new Color(0.075f, 0.05f, 0.1f, 0.98f); _selectedLabel = Txt(_selectionBar.transform, "Selected relic: —", 15, new Vector2(14f, -9f), new Vector2(790f, 25f)); Button(_selectionBar.transform, "<", new Vector2(840f, -4f), 45f, delegate { Select(-1); }); Button(_selectionBar.transform, ">", new Vector2(893f, -4f), 45f, delegate { Select(1); }); _leftCard = Box(_panel.transform, new Vector2(24f, -157f), new Vector2(570f, 410f)); _rightCard = Box(_panel.transform, new Vector2(606f, -157f), new Vector2(370f, 410f)); ((Graphic)_leftCard.GetComponent<Image>()).color = new Color(0.06f, 0.04f, 0.082f, 0.98f); ((Graphic)_rightCard.GetComponent<Image>()).color = new Color(0.06f, 0.04f, 0.082f, 0.98f); _body = Txt(_leftCard.transform, "Waiting for Reliquary protocol...", 14, new Vector2(16f, -14f), new Vector2(538f, 382f)); _body.alignment = (TextAnchor)0; for (int num = 0; num < 20; num++) { int row = num; GameObject val4 = HitArea(_leftCard.transform, new Vector2(10f, -47f - (float)num * 17.5f), new Vector2(550f, 17.5f), delegate { SelectCollectionRow(row); }, interactive: true); val4.SetActive(false); _collectionRows.Add(val4); _collectionRowIds.Add(string.Empty); } for (int num2 = 0; num2 < 7; num2++) { int row2 = num2; float num3 = -73f - (float)num2 * 45f; Text val5 = Txt(_leftCard.transform, string.Empty, 14, new Vector2(16f, num3 - 2f), new Vector2(538f, 40f)); val5.alignment = (TextAnchor)0; ((Component)val5).gameObject.SetActive(false); _shopRowLabels.Add(val5); GameObject val6 = HitArea(_leftCard.transform, new Vector2(10f, num3), new Vector2(550f, 42f), delegate { BuyVisibleShopOffer(row2); }, interactive: true); val6.SetActive(false); _shopRows.Add(val6); } _detail = Txt(_rightCard.transform, "Select a relic to inspect it.", 14, new Vector2(16f, -14f), new Vector2(338f, 338f)); _detail.alignment = (TextAnchor)0; _fullDetailsButton = Button(_rightCard.transform, "FULL DETAILS", new Vector2(218f, -362f), 136f, OpenCodex); _rightCardTrim.Add(Box(_rightCard.transform, new Vector2(3f, -3f), new Vector2(364f, 3f))); _rightCardTrim.Add(Box(_rightCard.transform, new Vector2(3f, -404f), new Vector2(364f, 3f))); _rightCardTrim.Add(Box(_rightCard.transform, new Vector2(3f, -3f), new Vector2(3f, 404f))); _rightCardTrim.Add(Box(_rightCard.transform, new Vector2(364f, -3f), new Vector2(3f, 404f))); foreach (GameObject item in _rightCardTrim) { Image component = item.GetComponent<Image>(); ((Graphic)component).color = new Color(1f, 0.73f, 0.16f, 0.95f); ((Graphic)component).raycastTarget = false; item.SetActive(false); } _rightCardInnerTrim.Add(Box(_rightCard.transform, new Vector2(8f, -8f), new Vector2(354f, 2f))); _rightCardInnerTrim.Add(Box(_rightCard.transform, new Vector2(8f, -399f), new Vector2(354f, 2f))); _rightCardInnerTrim.Add(Box(_rightCard.transform, new Vector2(8f, -8f), new Vector2(2f, 393f))); _rightCardInnerTrim.Add(Box(_rightCard.transform, new Vector2(360f, -8f), new Vector2(2f, 393f))); foreach (GameObject item2 in _rightCardInnerTrim) { Image component2 = item2.GetComponent<Image>(); ((Graphic)component2).color = new Color(1f, 0.8f, 0.2f, 1f); ((Graphic)component2).raycastTarget = false; item2.SetActive(false); } _actionTray = Box(_panel.transform, new Vector2(24f, -581f), new Vector2(952f, 126f)); ((Graphic)_actionTray.GetComponent<Image>()).color = new Color(0.075f, 0.05f, 0.1f, 0.98f); _actionTitle = Txt(_actionTray.transform, "COLLECTION ACTIONS", 13, new Vector2(14f, -6f), new Vector2(600f, 22f)); ((Graphic)_actionTitle).color = new Color(0.77f, 0.6f, 0.92f); BuildCollectionControls(_actionTray.transform); BuildBuildControls(_actionTray.transform); BuildEndgameControls(_actionTray.transform); BuildJournalControls(_actionTray.transform); BuildOptionControls(_actionTray.transform); BuildShopControls(_actionTray.transform); BuildAdminControls(_actionTray.transform); ((Graphic)Txt(_panel.transform, $"{Plugin.ToggleKey.Value} / Esc: close • Actions are validated by the server", 12, new Vector2(24f, -724f), new Vector2(952f, 22f))).color = new Color(0.65f, 0.62f, 0.7f); _controlStrip = Box(val.transform, new Vector2(24f, -24f), new Vector2(210f, 32f), (Vector2?)new Vector2(0f, 1f)); ((Graphic)_controlStrip.GetComponent<Image>()).color = new Color(0.035f, 0.022f, 0.052f, 0.94f); Button(_controlStrip.transform, "GRIMOIRE", new Vector2(3f, -2f), 98f, Toggle); Button(_controlStrip.transform, "COMBAT HUD", new Vector2(105f, -2f), 102f, ToggleCombatHud); _hudPanel = Box(val.transform, new Vector2(24f, -70f), new Vector2(450f, 70f), (Vector2?)new Vector2(0f, 1f)); Image component3 = _hudPanel.GetComponent<Image>(); ((Graphic)component3).color = new Color(0.035f, 0.022f, 0.052f, 0.9f); ((Graphic)component3).raycastTarget = false; GameObject val7 = Box(_hudPanel.transform, new Vector2(0f, 0f), new Vector2(5f, 80f)); Image component4 = val7.GetComponent<Image>(); ((Graphic)component4).color = new Color(0.68f, 0.3f, 0.92f, 0.95f); ((Graphic)component4).raycastTarget = false; _hudAccent = val7.GetComponent<RectTransform>(); _hud = Txt(_hudPanel.transform, "", 12, new Vector2(14f, -8f), new Vector2(425f, 54f)); _hud.alignment = (TextAnchor)0; for (int num4 = 0; num4 < 6; num4++) { GameObject val8 = HitArea(_hudPanel.transform, new Vector2(7f, (float)(-31 - num4 * 27)), new Vector2(436f, 25f), delegate { }, interactive: false); val8.SetActive(false); _hudHoverRows.Add(val8); _hudHoverIds.Add(string.Empty); } _tooltipPanel = Box(val.transform, Vector2.zero, new Vector2(360f, 148f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_tooltipPanel.GetComponent<Image>()).color = new Color(0.035f, 0.022f, 0.052f, 0.98f); ((Graphic)_tooltipPanel.GetComponent<Image>()).raycastTarget = false; _tooltipText = Txt(_tooltipPanel.transform, "", 13, new Vector2(13f, -10f), new Vector2(334f, 128f)); _tooltipText.alignment = (TextAnchor)0; _tooltipPanel.SetActive(false); for (int num5 = 0; num5 < 3; num5++) { GameObject val9 = Box(val.transform, new Vector2(0f, (float)(170 + num5 * 76)), new Vector2(430f, 66f), (Vector2?)new Vector2(0.5f, 0f)); ((Graphic)val9.GetComponent<Image>()).raycastTarget = false; Text val10 = Txt(val9.transform, string.Empty, 13, new Vector2(16f, -10f), new Vector2(398f, 48f)); val10.alignment = (TextAnchor)3; ((Graphic)val10).raycastTarget = false; val9.SetActive(false); _toastPanels.Add(val9); _toastTexts.Add(val10); } _codexPanel = Box(val.transform, Vector2.zero, new Vector2(900f, 700f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_codexPanel.GetComponent<Image>()).color = new Color(0.025f, 0.015f, 0.04f, 0.995f); ((Graphic)Txt(_codexPanel.transform, "RELIC CODEX // EXACT SERVER DETAILS", 23, new Vector2(24f, -18f), new Vector2(680f, 34f))).color = new Color(0.92f, 0.76f, 1f); Button(_codexPanel.transform, "OVERVIEW", new Vector2(24f, -64f), 120f, delegate { SetCodexPage(0); }); Button(_codexPanel.transform, "TIERS", new Vector2(152f, -64f), 110f, delegate { SetCodexPage(1); }); Button(_codexPanel.transform, "AWAKENED", new Vector2(270f, -64f), 120f, delegate { SetCodexPage(2); }); Button(_codexPanel.transform, "PATHS", new Vector2(398f, -64f), 110f, delegate { SetCodexPage(3); }); Button(_codexPanel.transform, "PREV RELIC", new Vector2(516f, -64f), 110f, delegate { NavigateCodex(-1); }); Button(_codexPanel.transform, "NEXT RELIC", new Vector2(634f, -64f), 110f, delegate { NavigateCodex(1); }); Button(_codexPanel.transform, "CLOSE", new Vector2(756f, -18f), 120f, CloseCodex); _codexText = Txt(_codexPanel.transform, "Waiting for exact server details.", 15, new Vector2(28f, -116f), new Vector2(844f, 548f)); _codexText.alignment = (TextAnchor)0; ((Graphic)Txt(_codexPanel.transform, "Values reflect the connected server configuration. Esc closes this window.", 12, new Vector2(28f, -670f), new Vector2(844f, 20f))).color = new Color(0.62f, 0.57f, 0.68f); _codexPanel.SetActive(false); _titlesPanel = Box(val.transform, Vector2.zero, new Vector2(820f, 650f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_titlesPanel.GetComponent<Image>()).color = new Color(0.025f, 0.015f, 0.04f, 0.995f); ((Graphic)Txt(_titlesPanel.transform, "HALL OF TITLES // MY ACHIEVEMENTS", 23, new Vector2(24f, -18f), new Vector2(620f, 34f))).color = new Color(0.92f, 0.76f, 1f); Button(_titlesPanel.transform, "CLOSE", new Vector2(676f, -18f), 120f, CloseTitles); Button(_titlesPanel.transform, "ALL", new Vector2(24f, -62f), 72f, delegate { SetTitleCategory("ALL"); }); Button(_titlesPanel.transform, "MASTERY", new Vector2(102f, -62f), 94f, delegate { SetTitleCategory("Relic Mastery"); }); Button(_titlesPanel.transform, "TRIALS", new Vector2(202f, -62f), 82f, delegate { SetTitleCategory("Trials"); }); Button(_titlesPanel.transform, "HUNTS", new Vector2(290f, -62f), 82f, delegate { SetTitleCategory("Requiem Hunts"); }); Button(_titlesPanel.transform, "ASCENDED", new Vector2(378f, -62f), 98f, delegate { SetTitleCategory("Ascended Relics"); }); Button(_titlesPanel.transform, "ULTIMATE", new Vector2(482f, -62f), 94f, delegate { SetTitleCategory("Ultimate Mastery"); }); Button(_titlesPanel.transform, "CURIOS", new Vector2(582f, -62f), 82f, delegate { SetTitleCategory("Curios"); }); GameObject val11 = Box(_titlesPanel.transform, new Vector2(24f, -104f), new Vector2(450f, 488f)); GameObject val12 = Box(_titlesPanel.transform, new Vector2(486f, -104f), new Vector2(310f, 488f)); _titlesListText = Txt(val11.transform, "No titles unlocked.", 14, new Vector2(16f, -14f), new Vector2(418f, 450f)); _titlesListText.alignment = (TextAnchor)0; _titleDetailText = Txt(val12.transform, "Select a title.", 14, new Vector2(16f, -14f), new Vector2(278f, 440f)); _titleDetailText.alignment = (TextAnchor)0; for (int num6 = 0; num6 < 26; num6++) { int row3 = num6; GameObject val13 = HitArea(val11.transform, new Vector2(8f, -45f - (float)num6 * 16.5f), new Vector2(434f, 16f), delegate { EquipTitleRow(row3); }, interactive: true); val13.SetActive(false); _titleRows.Add(val13); _titleRowNames.Add(string.Empty); } Button(_titlesPanel.transform, "PREV PAGE", new Vector2(24f, -604f), 100f, delegate { ChangeTitlePage(-1); }); Button(_titlesPanel.transform, "NEXT PAGE", new Vector2(132f, -604f), 100f, delegate { ChangeTitlePage(1); }); ((Graphic)Txt(_titlesPanel.transform, "Click an owned title to equip it. Selection is validated by Reliquary.", 12, new Vector2(250f, -612f), new Vector2(546f, 20f))).color = new Color(0.62f, 0.57f, 0.68f); _titlesPanel.SetActive(false); _onlineTitlesPanel = Box(val.transform, Vector2.zero, new Vector2(760f, 600f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_onlineTitlesPanel.GetComponent<Image>()).color = new Color(0.025f, 0.015f, 0.04f, 0.995f); ((Graphic)Txt(_onlineTitlesPanel.transform, "ONLINE HALL OF TITLES", 23, new Vector2(24f, -18f), new Vector2(560f, 34f))).color = new Color(0.92f, 0.76f, 1f); Button(_onlineTitlesPanel.transform, "CLOSE", new Vector2(616f, -18f), 120f, CloseOnlineTitles); GameObject val14 = Box(_onlineTitlesPanel.transform, new Vector2(24f, -68f), new Vector2(712f, 470f)); _onlineTitlesText = Txt(val14.transform, "No online player is displaying a title.", 15, new Vector2(18f, -18f), new Vector2(676f, 432f)); _onlineTitlesText.alignment = (TextAnchor)0; ((Graphic)Txt(_onlineTitlesPanel.transform, "Live public titles reported by Reliquary. Refresh State updates this directory.", 12, new Vector2(24f, -558f), new Vector2(690f, 20f))).color = new Color(0.62f, 0.57f, 0.68f); _onlineTitlesPanel.SetActive(false); _evolutionPanel = Box(val.transform, Vector2.zero, new Vector2(980f, 700f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_evolutionPanel.GetComponent<Image>()).color = new Color(0.022f, 0.013f, 0.036f, 0.997f); ((Graphic)Txt(_evolutionPanel.transform, "REQUIEM // EVOLUTION PATHS", 24, new Vector2(24f, -18f), new Vector2(650f, 34f))).color = new Color(0.92f, 0.76f, 1f); Button(_evolutionPanel.transform, "CLOSE", new Vector2(836f, -18f), 120f, CloseEvolutionPaths); _evolutionHeader = Txt(_evolutionPanel.transform, "Select a relic before opening its paths.", 15, new Vector2(24f, -62f), new Vector2(932f, 48f)); _evolutionHeader.alignment = (TextAnchor)1; GameObject val15 = Box(_evolutionPanel.transform, new Vector2(24f, -122f), new Vector2(294f, 440f)); GameObject val16 = Box(_evolutionPanel.transform, new Vector2(343f, -122f), new Vector2(294f, 440f)); GameObject val17 = Box(_evolutionPanel.transform, new Vector2(662f, -122f), new Vector2(294f, 440f)); ((Graphic)val15.GetComponent<Image>()).color = new Color(0.16f, 0.035f, 0.045f, 0.98f); ((Graphic)val16.GetComponent<Image>()).color = new Color(0.025f, 0.095f, 0.15f, 0.98f); ((Graphic)val17.GetComponent<Image>()).color = new Color(0.105f, 0.025f, 0.15f, 0.98f); _powerPathText = Txt(val15.transform, "POWER", 14, new Vector2(16f, -16f), new Vector2(262f, 350f)); _powerPathText.alignment = (TextAnchor)0; _dominionPathText = Txt(val16.transform, "DOMINION", 14, new Vector2(16f, -16f), new Vector2(262f, 350f)); _dominionPathText.alignment = (TextAnchor)0; _corruptionPathText = Txt(val17.transform, "CORRUPTION", 14, new Vector2(16f, -16f), new Vector2(262f, 350f)); _corruptionPathText.alignment = (TextAnchor)0; Button(val15.transform, "CHOOSE POWER", new Vector2(48f, -382f), 198f, delegate { Evolve("Power"); }); Button(val16.transform, "CHOOSE DOMINION", new Vector2(48f, -382f), 198f, delegate { Evolve("Dominion"); }); Button(val17.transform, "CHOOSE CORRUPTION", new Vector2(48f, -382f), 198f, delegate { Evolve("Corruption"); }); _evolutionFooter = Txt(_evolutionPanel.transform, "", 13, new Vector2(24f, -578f), new Vector2(700f, 84f)); _evolutionFooter.alignment = (TextAnchor)0; Button(_evolutionPanel.transform, "RESPEC PATH", new Vector2(772f, -596f), 160f, delegate { ConfirmRelicCommand("respec", "Spend Shards and Essence to clear the selected path"); }); _evolutionPanel.SetActive(false); _synergyCatalogPanel = Box(val.transform, Vector2.zero, new Vector2(900f, 700f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_synergyCatalogPanel.GetComponent<Image>()).color = new Color(0.025f, 0.015f, 0.04f, 1f); ((Graphic)Txt(_synergyCatalogPanel.transform, "BUILDCRAFT // ALL SYNERGIES", 23, new Vector2(24f, -18f), new Vector2(520f, 34f))).color = new Color(0.92f, 0.76f, 1f); Button(_synergyCatalogPanel.transform, "PREVIOUS", new Vector2(548f, -18f), 100f, delegate { ChangeSynergyCatalogPage(-1); }); Button(_synergyCatalogPanel.transform, "NEXT", new Vector2(656f, -18f), 90f, delegate { ChangeSynergyCatalogPage(1); }); Button(_synergyCatalogPanel.transform, "CLOSE", new Vector2(754f, -18f), 120f, CloseSynergyCatalog); _synergyCatalogText = Txt(_synergyCatalogPanel.transform, "No synergies received from Reliquary.", 15, new Vector2(28f, -76f), new Vector2(844f, 570f)); _synergyCatalogText.alignment = (TextAnchor)0; ((Graphic)Txt(_synergyCatalogPanel.transform, "Equip both relics for the ordinary connection. Ascend both to activate its Resonance.", 12, new Vector2(28f, -670f), new Vector2(844f, 20f))).color = new Color(0.62f, 0.57f, 0.68f); _synergyCatalogPanel.SetActive(false); _legendaryCatalogPanel = Box(val.transform, Vector2.zero, new Vector2(920f, 700f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_legendaryCatalogPanel.GetComponent<Image>()).color = new Color(0.028f, 0.02f, 0.025f, 1f); ((Graphic)Txt(_legendaryCatalogPanel.transform, "GRIMOIRE // LEGENDARY RESONANCES", 23, new Vector2(24f, -18f), new Vector2(540f, 34f))).color = new Color(1f, 0.82f, 0.3f); Button(_legendaryCatalogPanel.transform, "PREVIOUS", new Vector2(568f, -18f), 100f, delegate { ChangeLegendaryCatalogPage(-1); }); Button(_legendaryCatalogPanel.transform, "NEXT", new Vector2(676f, -18f), 90f, delegate { ChangeLegendaryCatalogPage(1); }); Button(_legendaryCatalogPanel.transform, "CLOSE", new Vector2(774f, -18f), 120f, CloseLegendaryCatalog); _legendaryCatalogText = Txt(_legendaryCatalogPanel.transform, "No Legendary Resonance records received from Reliquary.", 15, new Vector2(28f, -70f), new Vector2(864f, 588f)); _legendaryCatalogText.alignment = (TextAnchor)0; ((Graphic)Txt(_legendaryCatalogPanel.transform, "Master a Relic for a clue. Evolve it to reveal its partner. Evolve and equip both to record the connection.", 12, new Vector2(28f, -670f), new Vector2(864f, 20f))).color = new Color(0.72f, 0.63f, 0.42f); _legendaryCatalogPanel.SetActive(false); _affixCatalogPanel = Box(val.transform, Vector2.zero, new Vector2(920f, 700f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_affixCatalogPanel.GetComponent<Image>()).color = new Color(0.025f, 0.015f, 0.04f, 1f); ((Graphic)Txt(_affixCatalogPanel.transform, "RELIQUARY SHOP // AFFIX CATALOG", 23, new Vector2(24f, -18f), new Vector2(540f, 34f))).color = new Color(0.92f, 0.76f, 1f); Button(_affixCatalogPanel.transform, "PREVIOUS", new Vector2(568f, -18f), 100f, delegate { ChangeAffixCatalogPage(-1); }); Button(_affixCatalogPanel.transform, "NEXT", new Vector2(676f, -18f), 90f, delegate { ChangeAffixCatalogPage(1); }); Button(_affixCatalogPanel.transform, "CLOSE", new Vector2(774f, -18f), 120f, CloseAffixCatalog); _affixCatalogText = Txt(_affixCatalogPanel.transform, string.Empty, 14, new Vector2(28f, -72f), new Vector2(864f, 586f)); _affixCatalogText.alignment = (TextAnchor)0; ((Graphic)Txt(_affixCatalogPanel.transform, "Affixes require an Ascended Relic. Recalibration selects only from that Relic's compatible pool.", 12, new Vector2(28f, -670f), new Vector2(864f, 20f))).color = new Color(0.62f, 0.57f, 0.68f); _affixCatalogPanel.SetActive(false); _confirmationBar = Box(val.transform, new Vector2(0f, -360f), new Vector2(720f, 58f), (Vector2?)new Vector2(0.5f, 0.5f)); ((Graphic)_confirmationBar.GetComponent<Image>()).color = new Color(0.12f, 0.055f, 0.16f, 0.995f); _confirmationText = Txt(_confirmationBar.transform, "Confirm action?", 14, new Vector2(14f, -9f), new Vector2(470f, 40f)); _confirmationText.alignment = (TextAnchor)3; Button(_confirmationBar.transform, "CONFIRM", new Vector2(500f, -11f), 100f, ConfirmPendingAction); Button(_confirmationBar.transform, "CANCEL", new Vector2(608f, -11f), 90f, CancelPendingAction); _confirmationBar.SetActive(false); Render(); } [HideFromIl2Cpp] private void EnsureVisualTree() { if (!((Object)(object)_canvas != (Object)null) || !((Object)(object)_panel != (Object)null)) { Plugin.LogSource.LogInfo((object)"Grimoire canvas was removed during a scene transition; rebuilding it now."); _canvas = null; _panel = null; _body = null; _detail = null; _summary = null; _actionTitle = null; _hud = null; _hudPanel = null; _controlStrip = null; _hudAccent = null; _selectedLabel = null; _tooltipPanel = null; _tooltipText = null; _codexPanel = null; _codexText = null; _titlesPanel = null; _titlesListText = null; _titleDetailText = null; _onlineTitlesPanel = null; _onlineTitlesText = null; _evolutionPanel = null; _evolutionHeader = null; _powerPathText = null; _dominionPathText = null; _corruptionPathText = null; _evolutionFooter = null; _synergyCatalogPanel = null; _synergyCatalogText = null; _legendaryCatalogPanel = null; _legendaryCatalogText = null; _affixCatalogPanel = null; _affixCatalogText = null; _confirmationBar = null; _confirmationText = null; _selectionBar = null; _leftCard = null; _rightCard = null; _rightCardTrim.Clear(); _rightCardInnerTrim.Clear(); _actionTray = null; _collectionRows.Clear(); _collectionRowIds.Clear(); _titleRows.Clear(); _titleRowNames.Clear(); _hudHoverRows.Clear(); _hudHoverIds.Clear(); _toastPanels.Clear(); _toastTexts.Clear(); Build(); } } [HideFromIl2Cpp] private void Select(int delta) { int count = RelicStateService.State.Relics.Count; if (count != 0) { _selectedIndex = (_selectedIndex + delta + count) % count; Render(); } } [HideFromIl2Cpp] private RelicUiState? Selected() { RelicUiState[] array = (from x in RelicStateService.State.Relics.Values orderby x.Copies <= 0, x.Id select x).ToArray(); if (array.Length == 0) { return null; } _selectedIndex = Math.Clamp(_selectedIndex, 0, array.Length - 1); return array[_selectedIndex]; } [HideFromIl2Cpp] private void SelectCollectionRow(int row) { if (row >= 0 && row < _collectionRowIds.Count && !string.IsNullOrWhiteSpace(_collectionRowIds[row])) { int num = Array.FindIndex((from x in RelicStateService.State.Relics.Values orderby x.Copies <= 0, x.Id select x).ToArray(), (RelicUiState x) => string.Equals(x.Id, _collectionRowIds[row], StringComparison.OrdinalIgnoreCase)); if (num >= 0) { _selectedIndex = num; Render(); } } } [HideFromIl2Cpp] private void RelicCommand(string command) { RelicUiState relicUiState = Selected(); if (relicUiState != null) { CommandService.Send(".relic " + command + " " + relicUiState.Id); ScheduleRefresh(); } } [HideFromIl2Cpp] private void Evolve(string path) { RelicUiState relic = Selected(); if (relic != null) { Confirm("evolve:" + relic.Id + ":" + path, "Confirm permanent " + path + " evolution", delegate { CommandService.Send(".relic evolve " + relic.Id + " " + path); ScheduleRefresh(); }); } } [HideFromIl2Cpp] private void ConfirmRelicCommand(string command, string prompt) { RelicUiState relic = Selected(); if (relic != null) { Confirm(command + ":" + relic.Id, prompt, delegate { CommandService.Send(".relic " + command + " " + relic.Id); ScheduleRefresh(); }); } } [HideFromIl2Cpp] private void Confirm(string key, string prompt, Action action) { _pendingConfirmation = key; _pendingAction = action; _confirmationUntil = Time.unscaledTime + 12f; _notice = prompt; if ((Object)(object)_confirmationText != (Object)null) { _confirmationText.text = prompt; } if ((Object)(object)_confirmationBar != (Object)null) { _confirmationBar.SetActive(true); _confirmationBar.transform.SetAsLastSibling(); } Render(); } [HideFromIl2Cpp] private void ConfirmPendingAction() { Action? pendingAction = _pendingAction; CancelPendingAction(); pendingAction?.Invoke(); } [HideFromIl2Cpp] private void CancelPendingAction() { _pendingAction = null; _pendingConfirmation = string.Empty; _notice = string.Empty; if ((Object)(object)_confirmationBar != (Object)null) { _confirmationBar.SetActive(false); } Render(); } [HideFromIl2Cpp] private void Hunt(int difficulty) { RelicUiState relicUiState = Selected(); if (relicUiState != null) { CommandService.Send($".relic hunt {relicUiState.Id} {difficulty}"); ScheduleRefresh(); } } [HideFromIl2Cpp] private void NextTitle() { PlayerUiState state = RelicStateService.State; if (state.AvailableTitles.Count != 0) { int num = state.AvailableTitles.FindIndex((string x) => string.Equals(x, state.SelectedTitle, StringComparison.OrdinalIgnoreCase)); string text = state.AvailableTitles[(num + 1 + state.AvailableTitles.Count) % state.AvailableTitles.Count]; CommandService.Send(".relic title \"" + text.Replace("\"", string.Empty) + "\""); ScheduleRefresh(); } } [HideFromIl2Cpp] private void ScheduleRefresh() { _nextRefresh = Time.unscaledTime + 1.5f; } [HideFromIl2Cpp] private void OnCombatNotice(RelicNoticeUiState notice) { _combatNotices.RemoveAll((RelicNoticeUiState x) => x.Id == notice.Id); _combatNotices.Insert(0, notice); _notificationHistory.Insert(0, notice); if (_notificationHistory.Count > 50) { _notificationHistory.RemoveRange(50, _notificationHistory.Count - 50); } if (_combatNotices.Count > 5) { _combatNotices.RemoveRange(5, _combatNotices.Count - 5); } if (RelicStateService.State.Relics.TryGetValue(notice.RelicId, out RelicUiState value)) { value.CooldownSeconds = notice.CooldownSeconds; value.CooldownReceivedUtc = notice.ReceivedUtc; } Render(); } private static int NoticePriority(RelicNoticeUiState notice) { if (!notice.Kind.Equals("RESONANCE", StringComparison.OrdinalIgnoreCase)) { if (!notice.Major) { return 1; } return 2; } return 3; } [HideFromIl2Cpp] private void OnActionReply(string message, string severity) { string text = StripRichText(message).Trim(); if (string.IsNullOrWhiteSpace(text)) { text = ((severity == "ERROR") ? "The action could not be completed." : "Reliquary action completed."); } if (text.Length > 320) { text = text.Substring(0, 317) + "..."; } DateTime utcNow = DateTime.UtcNow; RemoveExpiredToasts(utcNow); if (_toastMessages.Count > 0) { DateTime dateTime = utcNow; List<DateTime> toastCreatedUtc = _toastCreatedUtc; if (dateTime - toastCreatedUtc[toastCreatedUtc.Count - 1] < TimeSpan.FromSeconds(0.35)) { int index = _toastMessages.Count - 1; string text2 = _toastMessages[index] + "\n" + text; if (text2.Length > 420) { text2 = text2.Substring(0, 417) + "..."; } _toastMessages[index] = text2; if (severity == "ERROR") { _toastSeverities[index] = severity; } _toastExpiresUtc[index] = utcNow.AddSeconds(5.0); goto IL_0190; } } _toastMessages.Add(text); _toastSeverities.Add(severity); _toastCreatedUtc.Add(utcNow); _toastExpiresUtc.Add(utcNow.AddSeconds((severity == "ERROR") ? 6.0 : 4.5)); goto IL_0190; IL_0190: while (_toastMessages.Count > 3) { RemoveToastAt(0); } UpdateToasts(); } [HideFromIl2Cpp] private void UpdateToasts() { //IL_0129: 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_00f3: Unknown result type (might be due to invalid IL or missing references) RemoveExpiredToasts(DateTime.UtcNow); for (int i = 0; i < _toastPanels.Count; i++) { bool flag = i < _toastMessages.Count; _toastPanels[i].SetActive(flag); if (flag) { int index = _toastMessages.Count - 1 - i; string text = _toastSeverities[index]; string value = ((text == "ERROR") ? "#ff6b6b" : ((text == "WARNING") ? "#ffbf69" : "#8ee28e")); string value2 = ((text == "ERROR") ? "!" : ((text == "WARNING") ? "?" : "+")); ((Graphic)_toastPanels[i].GetComponent<Image>()).color = ((text == "ERROR") ? new Color(0.2f, 0.035f, 0.045f, 0.97f) : ((text == "WARNING") ? new Color(0.18f, 0.11f, 0.025f, 0.97f) : new Color(0.025f, 0.15f, 0.09f, 0.97f))); _toastTexts[i].text = $"<color={value}><b>{value2} {text}</b></color>\n{Escape(_toastMessages[index])}"; _toastPanels[i].transform.SetAsLastSibling(); } } } [HideFromIl2Cpp] private void RemoveExpiredToasts(DateTime now) { for (int num = _toastExpiresUtc.Count - 1; num >= 0; num--) { if (_toastExpiresUtc[num] <= now) { RemoveToastAt(num); } } } [HideFromIl2Cpp] private void RemoveToastAt(int index) { if (index >= 0 && index < _toastMessages.Count) { _toastMessages.RemoveAt(index); _toastSeverities.RemoveAt(index); _toastCreatedUtc.RemoveAt(index); _toastExpiresUtc.RemoveAt(index); } } private static string StripRichText(string value) { if (string.IsNullOrEmpty(value)) { return string.Empty; } StringBuilder stringBuilder = new StringBuilder(value.Length); bool flag = false; foreach (char c in value) { if (c == '<') { flag = true; continue; } if (flag) { if (c == '>') { flag = false; } continue; } bool flag2 = !char.IsControl(c); if (!flag2) { bool flag3 = ((c == '\t' || c == '\n') ? true : false); flag2 = flag3; } if (flag2) { stringBuilder.Append(c); } } return stringBuilder.ToString(); } [HideFromIl2Cpp] private void Render() { //IL_09fc: Unknown result type (might be due to invalid IL or missing references) //IL_0a06: Unknown result type (might be due to invalid IL or missing references) //IL_0a0d: Unknown result type (might be due to invalid IL or missing references) //IL_0a29: Unknown result type (might be due to invalid IL or missing references) //IL_0a34: Unknown result type (might be due to invalid IL or missing references) //IL_0a39: Unknown result type (might be due to invalid IL or missing references) //IL_0a66: Unknown result type (might be due to invalid IL or missing references) //IL_0aaa: Unknown result type (might be due to invalid IL or missing references) //IL_0a88: Unknown result type (might be due to invalid IL or missing references) //IL_0b13: Unknown result type (might be due to invalid IL or missing references) //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b72: Unknown result type (might be due to invalid IL or missing references) //IL_0ba9: Unknown result type (might be due to invalid IL or missing references) //IL_0caf: Unknown result type (might be due to invalid IL or missing references) //IL_0fc3: Unknown result type (might be due to invalid IL or missing references) //IL_0f64: Unknown result type (might be due to invalid IL or missing references) //IL_0d64: Unknown result type (might be due to invalid IL or missing references) //IL_102b: Unknown result type (might be due to invalid IL or missing references) //IL_1019: Unknown result type (might be due to invalid IL or missing references) //IL_0e2a: Unknown result type (might be due to invalid IL or missing references) //IL_10da: Unknown result type (might be due to invalid IL or missing references) //IL_1117: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_body == (Object)null || (Object)(object)_detail == (Object)null || (Object)(object)_hud == (Object)null || (Object)(object)_selectedLabel == (Object)null || (Object)(object)_summary == (Object)null || (Object)(object)_actionTitle == (Object)null) { return; } PlayerUiState state = RelicStateService.State; ApplyTheme(ActiveTheme(state)); (Color, Color, Color, Color, Color, Color, Color, Color, Color, Color, Color) tuple = ThemeColors(ActiveTheme(state)); if ((Object)(object)_adminTabButton != (Object)null) { ((Component)_adminTabButton).gameObject.SetActive(state.IsAdmin); } if (!state.IsAdmin && _tab == 6) { _tab = 0; } bool flag = state.IsAdmin && _tab == 6; foreach (GameObject adminControl in _adminControls) { if ((Object)(object)adminControl != (Object)null) { adminControl.SetActive(flag); } } foreach (GameObject collectionControl in _collectionControls) { if ((Object)(object)collectionControl != (Object)null) { collectionControl.SetActive(_tab == 0); } } foreach (GameObject buildControl in _buildControls) { if ((Object)(object)buildControl != (Object)null) { buildControl.SetActive(_tab == 1); } } foreach (GameObject endgameControl in _endgameControls) { if ((Object)(object)endgameControl != (Object)null) { endgameControl.SetActive(_tab == 2); } } foreach (GameObject journalControl in _journalControls) { if ((Object)(object)journalControl != (Object)null) { journalControl.SetActive(_tab == 3); } } foreach (GameObject optionControl in _optionControls) { if ((Object)(object)optionControl != (Object)null) { optionControl.SetActive(_tab == 4); } } foreach (GameObject shopControl in _shopControls) { if ((Object)(object)shopControl != (Object)null) { shopControl.SetActive(_tab == 5); } } foreach (GameObject shopRow in _shopRows) { if ((Object)(object)shopRow != (Object)null) { shopRow.SetActive(false); } } foreach (Text shopRowLabel in _shopRowLabels) { if ((Object)(object)shopRowLabel != (Object)null) { ((Component)shopRowLabel).gameObject.SetActive(false); } } if ((Object)(object)_fullDetailsButton != (Object)null) { GameObject fullDetailsButton = _fullDetailsButton; int tab = _tab; bool active = ((tab == 0 || tab == 2) ? true : false); fullDetailsButton.SetActive(active); } if (_tab != 0) { for (int i = 0; i < _collectionRows.Count; i++) { _collectionRows[i].SetActive(false); _collectionRowIds[i] = string.Empty; } } _body.lineSpacing = ((_tab == 0) ? 1.05f : 1f); Text actionTitle = _actionTitle; actionTitle.text = "GRIMOIRE > " + _tab switch { 0 => "COLLECTION & FILTERS", 1 => "BUILDCRAFT > LOADOUTS", 2 => "REQUIEM", 3 => "JOURNAL", 4 => "OPTIONS & ACCESSIBILITY", 5 => "ESSENCE SHOP", 6 => "ADMIN ACTIONS", _ => "ACTIONS", }; _summary.text = ((state.ProtocolVersion < 2) ? "Waiting for server state" : $"Essence {state.Essence} Shards {state.RequiemShards} Slots {state.Relics.Values.Count((RelicUiState x) => x.Equipped)}/{state.Slots} Title {(string.IsNullOrWhiteSpace(state.SelectedTitle) ? "None" : state.SelectedTitle)}"); if (flag && (Object)(object)_adminTarget != (Object)null && string.IsNullOrWhiteSpace(_adminTarget.text)) { _adminTarget.text = state.PlayerName; } RelicUiState relicUiState = Selected(); ApplyRelicCardStyle(relicUiState); _selectedLabel.text = ((relicUiState == null) ? "SELECTED RELIC —" : $"{RelicEmblem(relicUiState)} {ColoredRelicName(state, relicUiState)} {Tier(relicUiState.Tier)} {relicUiState.Copies}/{relicUiState.AscendedCopiesRequired} M{relicUiState.Mastery} {ProgressBar(relicUiState.Mastery, Math.Max(10, state.EvolutionMasteryRequired), 6)} {(relicUiState.Awakened ? "✦" : "◇")} {Escape(relicUiState.Evolution)}"); if (!string.IsNullOrWhiteSpace(_notice) && Time.unscaledTime <= _confirmationUntil) { Text? selectedLabel = _selectedLabel; selectedLabel.text = selectedLabel.text + " • " + _notice; } else if (Time.unscaledTime > _confirmationUntil) { _notice = string.Empty; _pendingConfirmation = string.Empty; _pendingAction = null; if ((Object)(object)_confirmationBar != (Object)null) { _confirmationBar.SetActive(false); } } if (state.ProtocolVersion < 2) { _body.text = (string.IsNullOrWhiteSpace(RelicStateService.LastError) ? "Connect to a Reliquary 0.15+ server." : RelicStateService.LastError); _detail.text = "The interface will populate after the server sends a complete state frame."; } else if (_tab == 0) { RenderCollection(state, relicUiState); } else if (_tab == 1) { RenderBuild(state, relicUiState); } else if (_tab == 2) { RenderEndgame(state, relicUiState); } else if (_tab == 3) { RenderJournal(state); } else if (_tab == 4) { RenderOptions(state); } else if (_tab == 5) { RenderShop(state, relicUiState); } else { RenderAdmin(state, relicUiState); } List<RelicUiState> list = (from x in state.Relics.Values where x.Equipped orderby x.Id select x).ToList(); bool flag2 = Plugin.HudEnabled.Value && state.ProtocolVersion >= 2; if ((Object)(object)_hudPanel != (Object)null) { _hudPanel.SetActive(flag2); } if (flag2 && (Object)(object)_hudPanel != (Object)null) { bool flag3 = _combatNotices.Count > 0 || list.Any((RelicUiState x) => HasActiveCooldown(x) || ActiveEffectRemaining(x) > 0 || x.ProcProgress > 0); bool flag4 = Plugin.AutoCol