using System; 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 Agents; using BepInEx; using BepInEx.Configuration; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using ChainedPuzzles; using Enemies; using GameData; using Gear; using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppSystem.Collections.Generic; using KainRogueProtocol.Core; using KainRogueProtocol.Corruption; using KainRogueProtocol.Data; using KainRogueProtocol.Effects; using KainRogueProtocol.Events; using KainRogueProtocol.Modifiers; using KainRogueProtocol.Networking; using KainRogueProtocol.Patches; using KainRogueProtocol.Runtime; using KainRogueProtocol.Triggers; using KainRogueProtocol.UI; using Microsoft.CodeAnalysis; using Player; using SNetwork; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyVersion("0.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.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] [Microsoft.CodeAnalysis.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; } } } namespace KainRogueProtocol.UI { public sealed class BuffBar { private readonly GameObject _panel; private readonly Text _text; private readonly Image _accent; public BuffBar(Transform parent) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) _panel = UiFactory.CreatePanel("BuffBar", parent, new Vector2(0.5f, 1f), new Vector2(0.5f, 1f), new Vector2(680f, 38f), new Vector2(0f, -42f)); _accent = UiFactory.CreateImage("BuffAccent", _panel.transform, UiFactory.MutedTextColor); UiFactory.SetRect((Component)(object)_accent, new Vector2(0f, 0.5f), new Vector2(0f, 0.5f), new Vector2(4f, 24f), new Vector2(18f, 0f)); _text = UiFactory.CreateText("BuffBarText", _panel.transform, "KRP / NO ACTIVE CARDS", 16, (TextAnchor)4, UiFactory.MutedTextColor); UiFactory.Stretch((Component)(object)_text, 30f, 4f, 12f, 4f); } public void Refresh(RogueState state) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (state.SelectedCards.Count == 0) { ((Graphic)_accent).color = UiFactory.MutedTextColor; ((Graphic)_text).color = UiFactory.MutedTextColor; _text.text = "KRP / NO ACTIVE CARDS"; return; } ((Graphic)_accent).color = UiFactory.AccentColor; ((Graphic)_text).color = UiFactory.TextColor; _text.text = "KRP / " + string.Join(" + ", state.SelectedCards.Select((RogueCard card) => card.Name.ToUpperInvariant())); } public void SetVisible(bool visible) { _panel.SetActive(visible); } } public sealed class CardPoolPanel { private readonly GameObject _panel; private readonly Transform _gridRoot; private readonly Text _headerText; private readonly Text _promptText; private readonly List _entries = new List(); private RogueCard[] _cards = Array.Empty(); private Action? _onSelected; private bool _isVisible; public bool IsVisible => _isVisible; public CardPoolPanel(Transform parent) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) _panel = UiFactory.CreateRect("DevelopmentCardPoolPanel", parent, Vector2.zero, Vector2.one, Vector2.zero, Vector2.zero); UiFactory.Stretch((Component)(object)UiFactory.CreateImage("CardPoolDimmer", _panel.transform, new Color(0f, 0.005f, 0.006f, 0.9f)), 0f, 0f, 0f, 0f); GameObject val = UiFactory.CreatePanel("CardPoolFrame", _panel.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(1540f, 840f), new Vector2(0f, -20f)); ((Graphic)val.GetComponent()).color = new Color(0f, 0f, 0f, 0.72f); _headerText = UiFactory.CreateText("CardPoolHeader", val.transform, "Kain ROGUE PROTOCOL / DEV CARD POOL", 27, (TextAnchor)3, UiFactory.AccentColor); _headerText.fontStyle = (FontStyle)1; UiFactory.SetRect((Component)(object)_headerText, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-80f, 48f), new Vector2(40f, -44f)); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("CardPoolRule", val.transform, UiFactory.LineColor), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-80f, 2f), new Vector2(40f, -78f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("CardPoolSub", val.transform, "开发测试工具:点击任意卡牌立即加入当前运行状态。按 ESC 关闭。", 15, (TextAnchor)3, UiFactory.MutedTextColor), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-80f, 28f), new Vector2(40f, -105f)); GameObject val2 = UiFactory.CreateRect("CardPoolGrid", val.transform, new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(1440f, 610f), new Vector2(0f, -42f)); _gridRoot = val2.transform; _promptText = UiFactory.CreateText("CardPoolPrompt", val.transform, "快捷键 ~ 打开本面板 / F8 常驻 UI / F7 随机三选一", 14, (TextAnchor)4, UiFactory.TextColor); UiFactory.SetRect((Component)(object)_promptText, new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(-80f, 34f), new Vector2(40f, 34f)); _panel.SetActive(false); } public void Show(RogueCard[] cards, Action onSelected) { _cards = cards; _onSelected = onSelected; RebuildEntries(); _panel.SetActive(true); _isVisible = true; } public void Tick() { if (_isVisible && Input.GetKeyDown((KeyCode)27)) { Close(); } } private void RebuildEntries() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) foreach (GameObject entry in _entries) { Object.Destroy((Object)(object)entry); } _entries.Clear(); int num = Mathf.Min(_cards.Length, 24); for (int i = 0; i < num; i++) { RogueCard card = _cards[i]; int num2 = i % 4; int num3 = i / 4; float num4 = -516f + (float)num2 * 344f; float num5 = 204f - (float)num3 * 184f; CreateEntry(card, i, new Vector2(num4, num5)); } _promptText.text = ((_cards.Length > 24) ? $"显示前 24 张 / 总计 {_cards.Length} 张。按 ESC 关闭。" : $"已载入 {_cards.Length} 张卡。点击任意卡牌立即选择,按 ESC 关闭。"); } private void CreateEntry(RogueCard card, int index, Vector2 position) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) RogueCard card2 = card; GameObject entry = UiFactory.CreateCard($"CardPoolEntry_{index + 1}", _gridRoot); UiFactory.SetRect((Component)(object)entry.GetComponent(), new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), new Vector2(320f, 156f), position); ((Graphic)entry.GetComponent()).color = new Color(0.024f, 0.038f, 0.035f, 0.95f); _entries.Add(entry); Color color = RogueUiAssetLibrary.RarityPrimaryColor(card2.Rarity); UiFactory.SetRect((Component)(object)UiFactory.CreateImage("Accent", entry.transform, color), new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(0f, 4f), new Vector2(0f, -2f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("Index", entry.transform, $"{index + 1:00}", 14, (TextAnchor)3, UiFactory.AccentColor), new Vector2(0f, 1f), new Vector2(0f, 1f), new Vector2(44f, 24f), new Vector2(34f, -24f)); RogueUiAssetLibrary.BindRarityModule(UiFactory.CreateRect("RarityModuleSlot", entry.transform, new Vector2(1f, 1f), new Vector2(1f, 1f), new Vector2(46f, 46f), new Vector2(-42f, -40f)).transform, card2.Rarity, out Image baseImage, out Image rarityGlow, out Image rarityAccent); UiFactory.Stretch((Component)(object)baseImage, 0f, 0f, 0f, 0f); UiFactory.Stretch((Component)(object)rarityGlow, -6f, -6f, -6f, -6f); UiFactory.Stretch((Component)(object)rarityAccent, 0f, 0f, 0f, 0f); Text obj = UiFactory.CreateText("Title", entry.transform, card2.Name, 18, (TextAnchor)3, UiFactory.TextColor); obj.resizeTextForBestFit = true; obj.resizeTextMinSize = 12; obj.resizeTextMaxSize = 18; UiFactory.SetRect((Component)(object)obj, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-112f, 28f), new Vector2(84f, -24f)); Text obj2 = UiFactory.CreateText("Description", entry.transform, card2.Description, 12, (TextAnchor)0, UiFactory.TextColor); obj2.resizeTextForBestFit = true; obj2.resizeTextMinSize = 9; obj2.resizeTextMaxSize = 12; UiFactory.SetRect((Component)(object)obj2, new Vector2(0f, 1f), new Vector2(1f, 1f), new Vector2(-34f, 58f), new Vector2(17f, -88f)); UiFactory.SetRect((Component)(object)UiFactory.CreateText("Tags", entry.transform, (card2.Tags.Count == 0) ? "无标签" : string.Join(" / ", card2.Tags.Take(3)), 10, (TextAnchor)3, UiFactory.MutedTextColor), new Vector2(0f, 0f), new Vector2(1f, 0f), new Vector2(-34f, 22f), new Vector2(17f, 18f)); ((UnityEvent)entry.AddComponent