using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Microsoft.CodeAnalysis; using Photon.Pun; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("MonsterSpawnerMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("MonsterSpawnerMod")] [assembly: AssemblyTitle("MonsterSpawnerMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace MonsterSpawnerMod { [BepInPlugin("com.monsterspawner.gui", "Monster Spawn Menu", "1.0.0")] public class Plugin : BaseUnityPlugin { private struct Toast { public string msg; public bool error; public float timer; } private struct SpawnedEntry { public GameObject go; public int id; public string typeId; public string displayName; public bool fromMod; } public class SpawnedTag : MonoBehaviour { } private struct Monster { public string id; public string name; public string alias; public string searchKey; public int danger; public bool unused; public Monster(string id, string name, string alias, int danger, bool unused = false) { this.id = id; this.name = name; this.alias = alias; this.danger = danger; this.unused = unused; searchKey = (name + " " + alias + " " + id + (unused ? " unused ???" : "")).ToLowerInvariant(); } } private struct PendingCapture { public string id; public string name; public int startFrame; public HashSet snap; public HashSet snapOff; } private const string DiscordIconB64 = "iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAKlBMVEVHcExYZfJXZPFYZfJXZPBYZfL///9RX/JHV/HEyPqepffh5P2FjvVsd/StrBPNAAAABXRSTlMA1UaXEmpP0/0AAASaSURBVHicxVvbgqsgDFxBC97+/3cXtFaQXBDQzHnZU1tnTEKIBP7+StArpXXXdcMG94fWSvVFtyrg1l/eFJ1+WgVBHoh4jp0jP/CEhj6b/auhrS8Ua/kUXTszlNA3lFBK30hCX0G/SaiMhZuhB0FX0Kt6eo9iPzR4/B1lRqj1foSCSGhk/gO33dDM/AduuqGl+b/ohPlvKXiC3kOaP1fBc/x5Cp7kz1HwSPydYCPxYX5WQfP8k4LMSI3zLwwiK/dv8FMz0zv8eBi8EAA7kDB4JQB2wGHwHj+cj15zgAfghJdGwIF0JDyeAmMkI+HFCNxxjcMbBjDGGvBza8DPYXRlBvDkyzgvENMyj8sNEeq+AYy1jvzjYdOrdrvgRFjYQFd0Nw3gnm3ayT2mjcN8sf09/S7OE+KkGOqOAYx79k8Ia+2wLsvk/i3LOrj/RpedHVgJgQnYHBA83vGU7AcTq+DMBVwSNNeb54FTcKZD5ot25MkgjECoRsgMQbOU8X8+4GgNoPI8YHkmDIwJdJYHTKEDPLhAzEsC5fyfD3NrleGB0gjcwcShzshCaw3/57OSN+/4LGSTBHMPM22Cng2BSgNwJlBcCNRFgAcdBZoNgVp+ZiB0TBaoyQE/E5C5gInBiiR4gvRBT8ZgOguXgEyHihRQOwZ3kCNR0YOgBT9dF2hKQBsP0D7Q1Chs4wHaBx0lAK7ERleKgqNzdPUpPGwJC1ACwEposr4Ot2talK7+irWQ24jKqCPyEJSFpq81zdU981GGQwqoXEQIAEIgTOzxleBnqW4qCCgB6aMETxLzhMqA0CkSAIRANLNFE3U46QImIIKAEJA6MxrQkYGiR2R+mC0gfZBYQBAikZMB5UQU4sMQiME8CwAC8Cgk8gAQg5kCgOHbSED4IHGMhlEGZXBCAD4ZpbcJgz2mCaVBdSxKQsyG0H1OnusgPU0ATmFobazRggR+Jz4ygUnkrUcqBucjNBEQFRH8Uj4PFplyJuuvDPAUTgjAilK0GpnHEamV3QWsgkAzUY+W5a3KIUYA/mLyjoAOfzV7R4DGX07fEaCI1/PipSkI2Cjo8QWK8rWxGwI6aommemUgBJIJNbVIlQoY7ZLxpjAuQDJEBChqmS6dVcfB2mEiNcyT/076SyQE6IVKCxSFxrpsC7+X+DeTwV8GSkJkNj4WKtH5CLDl6CYdNxesU5R2XXqeVt+oMCvwE3Tl/tcxQK57I6QG3wJ6ewlyxh5W513rp6Fr1+KnbcVr8ozlepPMe9fyLn66pBiYiMbFuVxPLdNcJdAr4JfsQdFHzUtypSySwPUAwrCh6aOuFdcxsL/BxzejDlexXaOob8d1rdwL+cg7YPvm5oRxZZtWceeS79ttTUO2CTN4J2SwD0nvNqNzeXQIWQVZX7t2r8Wb1+Lte/kNDOJbOOQ3schv4xHfyPTeSMD45TeziW/nk9/QKL+lU35Tq/y2XvmNzfJbu+U3t8tv75c/4CB/xEP+kEvbmanwwJfwQac/+aNebYxQc9jtT/6435/4gccaCcKnThvSewgf+90ge/D50MD74jn2HbKH308VzY7//wMg6g7yNt7XjAAAAABJRU5ErkJggg=="; private const string ModVersion = "v1.0.0"; private const string BugReportUrl = "https://github.com/EliteXGHG/MonsterSpawner-Content-Warning/issues/new?title="; private bool _menu; private Rect _wRect = new Rect(20f, 20f, 400f, 600f); private Vector2 _scroll; private Vector2 _killScroll; private int spawnAmount = 1; private float sliderVal = 1f; private string _amtStr = "1"; private int _lastAmt = 1; private bool showLegend; private string searchInput = ""; private string cachedSearch = "\0"; private Monster[] filtered = new Monster[0]; private readonly List favorites = new List(); private readonly List recentSpawns = new List(); private readonly Queue _toastQueue = new Queue(); private readonly List _activeToasts = new List(); private const int MaxToasts = 3; private const int MaxQueued = 8; private ConfigEntry _toggleKey; private ConfigEntry _closeOnEsc; private bool ready; private bool _showKillPanel; private bool _wasCursorVisible; private CursorLockMode _wasCursorLock; private bool _cursorSaved; private static bool MenuOpen; private bool _showBugPopup; private string _bugTitle = ""; private string _bugDesc = ""; private string _bugSteps = ""; private string _bugError = ""; private bool _bugOpenGithub = true; private readonly List _spawned = new List(); private bool _confirmSpawnAll; private bool _confirmKillAll; private float _confirmTimerSpawn; private float _confirmTimerKill; private float _cleanTimer; private float _logTimer; private const int MaxBatchSpawn = 120; private const int SpawnPerFrame = 12; private readonly List _spawnQueue = new List(); private bool _spawning; private readonly Monster[] allMonsters = new Monster[33] { new Monster("Streamer", "Streamer", "CW-000", 6), new Monster("Zombe", "Snail", "Snailman | Zombie | Snail Hugger | CW-001", 1), new Monster("Snatcho", "Snatcho", "Shadow Demon | Snatcher | Grabber Snake | Chokelegs | CW-002", 7), new Monster("Toolkit_Wisk", "Whisk", "Fan | Whisker | The Whisk | CW-003A", 4), new Monster("BigSlap", "Big Slap", "Titan | Tall Monster | Slapper | The Destroyer | CW-004", 10), new Monster("Slurper", "Slurper", "Ceiling Starfish | Ceiling Star | Starfish | CW-005", 3), new Monster("Dog", "Dog", "Gun Dog | GunDog | A.S.T.R.A | Robot Attack Dog | Machine Gun Dog | CW-006", 6), new Monster("Bombs", "Bomber", "Bomb Bot | The Bomber Man | CW-007", 5), new Monster("Knifo", "Knife Ghost", "Knife | Ghost | Knifo | Knif | CW-008", 5), new Monster("Spider", "Spider", "CW-009", 4), new Monster("Mouthe", "Mouthe", "Screamer | Smiling Little Screamer | The Mouthe | CW-010", 0), new Monster("Flicker", "Flicker", "Jellyfish | The Flicker | CW-012", 9), new Monster("EyeGuy", "Eye Guy", "Chicken | Eye Bird | CW-013", 3), new Monster("Weeping", "Weeping", "Maiden | Iron Maiden | The Weeping | Cage | CW-014", 7), new Monster("Ear", "Ear", "Sound Monster | Balala | Ear Monster | The Ear | CW-016", 3), new Monster("Jello", "Jelly", "Slime | Slime Critter | Slimer | Blob | CW-017", 1), new Monster("Harpooner", "Harpooner", "Hookman | Harpoon | CW-020", 7), new Monster("CamCreep", "Cam Creep", "Camera Monster | The Creep | CW-022", 6), new Monster("Puffo", "Puffo", "Blowfish | Babushka | Puff Ball | CW-023", 3), new Monster("Mime", "Mime", "Blinking Waldo | CW-024", 4), new Monster("ButtonRobot", "Robot Button", "Explosive Button | Button | CW-025", 5), new Monster("Worm", "Worm", "The Worm | Leech | CW-026", 1), new Monster("Fire", "Fire Monster", "Fire | Turtle | Fire Beast | Flame Turtle | Fire Horse | Bowser | Godzilla | Firebreather | CW-027", 6), new Monster("BlackHoleBot", "Black Hole Bot", "Drone | Gravity Monster | Black Hole Drone | CW-029", 4), new Monster("UltraKnifo", "Ultra Knifo", "Big Knifo | Knifo EX | Grown-Up Knife Ghost | CW-030", 6), new Monster("SnailSpawner", "Snail Spawner", "Giant Slug | Slug | CW-031", 6), new Monster("Arms", "Arms", "Accordion Man | CW-033", 2), new Monster("Toolkit_Fan", "Fan Tool", "CW-003B | unused", -1, unused: true), new Monster("Toolkit_Hammer", "Hammer Tool", "MCHAMMER | CW-003C", -1, unused: true), new Monster("Toolkit_Iron", "Iron Tool", "TonyStark | CW-003D", -1, unused: true), new Monster("Toolkit_Vaccuum", "Vacuum Tool", "SUCC | CW-003E", -1, unused: true), new Monster("Angler", "Angler", "CW-018 | unused", -1, unused: true), new Monster("Bites", "Bites", "CW-035 | unused", -1, unused: true) }; private static readonly string[] DangerNames = new string[11] { "Harmless", "Small scratch", "Might cause a bit of harm", "Causes some harm", "Eats your HP", "Dangerous", "Very Dangerous", "Extremely Dangerous", "Do not approach", "You may be screwed", "Death is almost certain" }; private static readonly Color[] DangerColors = (Color[])(object)new Color[10] { new Color(0.35f, 0.78f, 0.35f), new Color(0.45f, 0.78f, 0.4f), new Color(0.62f, 0.78f, 0.32f), new Color(0.78f, 0.78f, 0.28f), new Color(0.82f, 0.62f, 0.22f), new Color(0.88f, 0.48f, 0.18f), new Color(0.88f, 0.32f, 0.18f), new Color(0.88f, 0.2f, 0.2f), new Color(0.78f, 0.13f, 0.22f), new Color(0.68f, 0.08f, 0.18f) }; private static readonly Color PillModBg = new Color(0.08f, 0.38f, 0.15f); private static readonly Color PillModFg = new Color(0.75f, 1f, 0.8f); private static readonly Color PillVanBg = new Color(0.3f, 0.33f, 0.4f); private static readonly Color PillVanFg = new Color(0.85f, 0.87f, 0.92f); private static readonly Color ColBg = new Color(0.06f, 0.06f, 0.06f); private static readonly Color ColDark = new Color(0.12f, 0.12f, 0.12f, 0.95f); private static readonly Color ColDarkH = new Color(0.18f, 0.18f, 0.18f, 0.95f); private static readonly Color ColGreen = new Color(0.05f, 0.45f, 0.1f); private static readonly Color ColGreenH = new Color(0.08f, 0.55f, 0.14f); private static readonly Color ColGreenTxt = new Color(0.2f, 1f, 0.4f); private static readonly Color ColRed = new Color(0.5f, 0.07f, 0.07f); private static readonly Color ColRedH = new Color(0.6f, 0.1f, 0.1f); private static readonly Color ColRedTxt = new Color(1f, 0.25f, 0.25f); private static readonly Color ColDiscord = new Color(0.35f, 0.44f, 0.96f); private static readonly Color ColBorder = Color.white; private static readonly Color ColBorderD = new Color(1f, 1f, 1f, 0.12f); private static readonly Color ColStar = new Color(0.96f, 0.77f, 0.26f); private static readonly Color ColTxt = Color.white; private static readonly Color ToastBgErr = new Color(0.5f, 0.07f, 0.07f, 0.5f); private static readonly Color ToastBgOk = new Color(0.05f, 0.35f, 0.1f, 0.5f); private static readonly Color ToastBdErr = new Color(1f, 0.15f, 0.15f, 0.5f); private static readonly Color ToastBdOk = new Color(0.1f, 1f, 0.25f, 0.5f); private static readonly Color RowEven = new Color(0.13f, 0.13f, 0.13f); private static readonly Color RowOdd = new Color(0.1f, 0.1f, 0.1f); private static readonly Color PanelBg = new Color(0.08f, 0.08f, 0.08f); private static readonly Color ToastShadow = new Color(0f, 0f, 0f, 0.2f); private const int PAD = 10; private const int BW = 2; private const int RAD = 12; private readonly Dictionary _rrCache = new Dictionary(); private readonly Dictionary _solidCache = new Dictionary(); private static Color[] _rrBuf; private GUIStyle _ls; private GUIStyle _ts; private GUIStyle _secS; private GUIStyle _fBtn; private GUIStyle _killBtn; private GUIStyle _killArrow; private GUIStyle _catBtn; private GUIStyle _monBtn; private GUIStyle _favOn; private GUIStyle _favOff; private GUIStyle _preset; private GUIStyle _amtField; private GUIStyle _legendBtn; private GUIStyle _footer; private GUIStyle _footerBtn; private GUIStyle _discordBtn; private GUIStyle _winStyle; private GUIStyle _searchField; private GUIStyle _searchHint; private GUIStyle _toastStyle; private GUIStyle _grabS; private GUIStyle _bugArea; private GUIStyle _bugSub; private GUIStyle _killCountStyle; private GUIStyle _pill; private Material _tickMat; private Texture2D _discordIcon; private GUIContent _discordContent; private GUIStyle[] _lvStyles; private GUIStyle[] _dvStyles; private GUISkin _skin; private static readonly int WinId = StableWinId(); private readonly GUIContent _gcBuf = new GUIContent(); private static readonly string _grabRaw = "grab grab grab grab grab grab grab grab grab grab grab"; private static string _grabRich; private readonly Queue _repLog = new Queue(); private const int RepCap = 40; private int _dragType; private Rect _dragTrack; private readonly HashSet _closedSections = new HashSet(); private int _sceneCacheFrame = -1; private readonly List _sceneCache = new List(); private int _snapFrame = -1; private readonly HashSet _snapIds = new HashSet(); private readonly HashSet _snapInactiveIds = new HashSet(); private HashSet _snapShared; private HashSet _snapInactiveShared; private readonly List _monsterKeys = new List(); private readonly List _pendingCaptures = new List(); private readonly List _freshBuf = new List(256); private bool _capturing; private float _vanillaTimer; private readonly HashSet _modIds = new HashSet(); private readonly HashSet _vanillaSeen = new HashSet(); private bool _isKilling; private float _killTimer; private static readonly Stack> _pool = new Stack>(); private Texture2D MkT(Color c) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) int key = ((int)(c.r * 255f) << 24) | ((int)(c.g * 255f) << 16) | ((int)(c.b * 255f) << 8) | (int)(c.a * 255f); if (_solidCache.TryGetValue(key, out var value) && (Object)(object)value != (Object)null) { return value; } value = new Texture2D(1, 1, (TextureFormat)4, false); value.SetPixel(0, 0, c); value.Apply(); _solidCache[key] = value; return value; } private Texture2D MakeDiscordIcon(int w, int h) { //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Expected O, but got Unknown //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_0297: 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) w = Mathf.Max(w, 8); h = Mathf.Max(h, 8); Color[] array = (Color[])(object)new Color[w * h]; float num = 4f; float num2 = num - 0.5f; float num3 = 1f; float num4 = (float)w - 1f; float num5 = 3f; float num6 = (float)h - 0.5f; float num7 = 2.6f; float num8 = 5.5f; float num9 = (float)w - 5.5f; float num10 = 3f; float num11 = 1.5f; float num12 = (float)h * 0.52f; float num13 = 3.4f; for (int i = 0; i < h; i++) { float num14 = (float)i + 0.5f; for (int j = 0; j < w; j++) { float num15 = (float)j + 0.5f; float num16 = 0f; float num17 = -1f; if (num15 < num3 + num && num14 < num5 + num) { num16 = num3 + num - num15; num17 = num5 + num - num14; } else if (num15 > num4 - num && num14 < num5 + num) { num16 = num15 - (num4 - num); num17 = num5 + num - num14; } else if (num15 < num3 + num && num14 > num6 - num) { num16 = num3 + num - num15; num17 = num14 - (num6 - num); } else if (num15 > num4 - num && num14 > num6 - num) { num16 = num15 - (num4 - num); num17 = num14 - (num6 - num); } else if (num15 < num3 || num15 > num4 || num14 < num5 || num14 > num6) { array[i * w + j] = Color.clear; continue; } float num18 = 1f; if (num17 >= 0f) { num18 = Mathf.Clamp01(1f - (Mathf.Sqrt(num16 * num16 + num17 * num17) - num2)); } float num19 = Mathf.Sqrt((num15 - num8) * (num15 - num8) + (num14 - num10) * (num14 - num10)); float num20 = Mathf.Sqrt((num15 - num9) * (num15 - num9) + (num14 - num10) * (num14 - num10)); float num21 = Mathf.Clamp01(num7 + 0.5f - Mathf.Min(num19, num20)); float num22 = Mathf.Max(num18, num21); if (num22 <= 0f) { array[i * w + j] = Color.clear; continue; } float num23 = ((num15 < (float)w * 0.5f) ? ((float)w * 0.5f - num13) : ((float)w * 0.5f + num13)); float num24 = num15 - num23; float num25 = num14 - num12; float num26 = Mathf.Clamp01(num11 + 0.5f - Mathf.Sqrt(num24 * num24 + num25 * num25)); array[i * w + j] = new Color(1f, 1f, 1f, num22 * (1f - num26)); } } Texture2D val = new Texture2D(w, h, (TextureFormat)4, false); val.SetPixels(array); val.Apply(); return val; } private Texture2D RoundedRect(int w, int h, Color fill, int rad) { //IL_000e: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Expected O, but got Unknown //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) if (w <= 0 || h <= 0 || rad <= 0) { return MkT(fill); } w = Mathf.Max(w, 2); h = Mathf.Max(h, 2); rad = Mathf.Min(rad, Mathf.Min(w, h) / 2); Color32 val = Color32.op_Implicit(fill); long key = (long)((ulong)(((long)w << 42) | ((long)h << 30)) | ((ulong)val.r << 22) | ((ulong)val.g << 14) | ((ulong)val.b << 6) | ((ulong)val.a << 2)) | (long)(rad & 0xFF); if (_rrCache.TryGetValue(key, out var value) && (Object)(object)value != (Object)null) { return value; } int num = w * h; Color[] array = ((_rrBuf != null && _rrBuf.Length == num) ? _rrBuf : (_rrBuf = (Color[])(object)new Color[num])); float num2 = rad; float num3 = num2 - 0.5f; for (int i = 0; i < h; i++) { int num4 = i * w; float num5 = i; for (int j = 0; j < w; j++) { float num6 = 0f; float num7 = 0f; if ((float)j < num2 && (float)i < num2) { num6 = num2 - (float)j; num7 = num2 - num5; } else if ((float)j >= (float)w - num2 && (float)i < num2) { num6 = (float)j - ((float)w - num2 - 1f); num7 = num2 - num5; } else if ((float)j < num2 && (float)i >= (float)h - num2) { num6 = num2 - (float)j; num7 = num5 - ((float)h - num2 - 1f); } else { if (!((float)j >= (float)w - num2) || !((float)i >= (float)h - num2)) { array[num4 + j] = fill; continue; } num6 = (float)j - ((float)w - num2 - 1f); num7 = num5 - ((float)h - num2 - 1f); } float num8 = Mathf.Sqrt(num6 * num6 + num7 * num7); array[num4 + j] = new Color(fill.r, fill.g, fill.b, fill.a * Mathf.Clamp01(1f - (num8 - num3))); } } value = new Texture2D(w, h, (TextureFormat)4, false); value.SetPixels(array); value.Apply(); _rrCache[key] = value; return value; } private Texture2D RoundedRect(int w, int h, Color fill, int rad, bool topL, bool topR, bool botR, bool botL) { //IL_000e: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Expected O, but got Unknown //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0246: 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_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) if (w <= 0 || h <= 0 || rad <= 0) { return MkT(fill); } w = Mathf.Max(w, 2); h = Mathf.Max(h, 2); rad = Mathf.Min(rad, Mathf.Min(w, h) / 2); Color32 val = Color32.op_Implicit(fill); int num = (topL ? 8 : 0) | (topR ? 4 : 0) | (botR ? 2 : 0) | (botL ? 1 : 0); long key = (long)((ulong)(((long)w << 42) | ((long)h << 30)) | ((ulong)val.r << 22) | ((ulong)val.g << 14) | ((ulong)val.b << 6) | ((ulong)val.a << 2)) | (long)((rad & 0xFF) | 0x100 | (num << 9)); if (_rrCache.TryGetValue(key, out var value) && (Object)(object)value != (Object)null) { return value; } int num2 = w * h; Color[] array = ((_rrBuf != null && _rrBuf.Length == num2) ? _rrBuf : (_rrBuf = (Color[])(object)new Color[num2])); float num3 = rad; float num4 = num3 - 0.5f; for (int i = 0; i < h; i++) { int num5 = i * w; float num6 = i; for (int j = 0; j < w; j++) { float num7 = 0f; float num8 = 0f; bool flag = false; if ((float)j < num3 && (float)i < num3 && topL) { num7 = num3 - (float)j; num8 = num3 - num6; flag = true; } else if ((float)j >= (float)w - num3 && (float)i < num3 && topR) { num7 = (float)j - ((float)w - num3 - 1f); num8 = num3 - num6; flag = true; } else if ((float)j < num3 && (float)i >= (float)h - num3 && botL) { num7 = num3 - (float)j; num8 = num6 - ((float)h - num3 - 1f); flag = true; } else if ((float)j >= (float)w - num3 && (float)i >= (float)h - num3 && botR) { num7 = (float)j - ((float)w - num3 - 1f); num8 = num6 - ((float)h - num3 - 1f); flag = true; } if (!flag) { array[num5 + j] = fill; continue; } float num9 = Mathf.Sqrt(num7 * num7 + num8 * num8); array[num5 + j] = new Color(fill.r, fill.g, fill.b, fill.a * Mathf.Clamp01(1f - (num9 - num4))); } } value = new Texture2D(w, h, (TextureFormat)4, false); value.SetPixels(array); value.Apply(); _rrCache[key] = value; return value; } private static int StableWinId() { int num = 23; string text = "com.monsterspawner.gui"; for (int i = 0; i < text.Length; i++) { num = num * 31 + text[i]; } return num; } private void InitStyles() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Expected O, but got Unknown //IL_0151: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Expected O, but got Unknown //IL_01b9: Expected O, but got Unknown //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_026d: Expected O, but got Unknown //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Expected O, but got Unknown //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Expected O, but got Unknown //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Expected O, but got Unknown //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_042e: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Expected O, but got Unknown //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04a0: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0514: Expected O, but got Unknown //IL_0514: Unknown result type (might be due to invalid IL or missing references) //IL_0520: Expected O, but got Unknown //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_054a: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_056f: 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_0587: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_059e: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Expected O, but got Unknown //IL_05bf: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05e5: Unknown result type (might be due to invalid IL or missing references) //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_0641: 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_0657: Expected O, but got Unknown //IL_0662: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_066f: Unknown result type (might be due to invalid IL or missing references) //IL_0676: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_068c: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: 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_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_06ff: Expected O, but got Unknown //IL_070a: Unknown result type (might be due to invalid IL or missing references) //IL_070f: Unknown result type (might be due to invalid IL or missing references) //IL_0717: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_0729: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_074b: 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_075b: Unknown result type (might be due to invalid IL or missing references) //IL_0766: Unknown result type (might be due to invalid IL or missing references) //IL_0776: Unknown result type (might be due to invalid IL or missing references) //IL_077c: Unknown result type (might be due to invalid IL or missing references) //IL_0786: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_0795: Expected O, but got Unknown //IL_0795: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Expected O, but got Unknown //IL_07ac: Unknown result type (might be due to invalid IL or missing references) //IL_07b1: 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) //IL_07c0: Unknown result type (might be due to invalid IL or missing references) //IL_07c7: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07e6: Expected O, but got Unknown //IL_07e6: Unknown result type (might be due to invalid IL or missing references) //IL_07eb: Unknown result type (might be due to invalid IL or missing references) //IL_07f5: Expected O, but got Unknown //IL_07fa: Expected O, but got Unknown //IL_0805: Unknown result type (might be due to invalid IL or missing references) //IL_080a: Unknown result type (might be due to invalid IL or missing references) //IL_0812: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0824: Unknown result type (might be due to invalid IL or missing references) //IL_082b: Unknown result type (might be due to invalid IL or missing references) //IL_0830: Unknown result type (might be due to invalid IL or missing references) //IL_083a: Expected O, but got Unknown //IL_083a: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_0858: Unknown result type (might be due to invalid IL or missing references) //IL_085e: Unknown result type (might be due to invalid IL or missing references) //IL_0868: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_0886: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_0896: Unknown result type (might be due to invalid IL or missing references) //IL_08a2: Expected O, but got Unknown //IL_08ad: Unknown result type (might be due to invalid IL or missing references) //IL_08b2: Unknown result type (might be due to invalid IL or missing references) //IL_08ba: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Unknown result type (might be due to invalid IL or missing references) //IL_08cc: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_08db: Expected O, but got Unknown //IL_08db: Unknown result type (might be due to invalid IL or missing references) //IL_08e9: Unknown result type (might be due to invalid IL or missing references) //IL_08f9: 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_0909: Unknown result type (might be due to invalid IL or missing references) //IL_0917: Unknown result type (might be due to invalid IL or missing references) //IL_0927: Unknown result type (might be due to invalid IL or missing references) //IL_092d: Unknown result type (might be due to invalid IL or missing references) //IL_0937: Unknown result type (might be due to invalid IL or missing references) //IL_0943: Expected O, but got Unknown //IL_094e: Unknown result type (might be due to invalid IL or missing references) //IL_0953: Unknown result type (might be due to invalid IL or missing references) //IL_095b: Unknown result type (might be due to invalid IL or missing references) //IL_0966: Unknown result type (might be due to invalid IL or missing references) //IL_0971: Unknown result type (might be due to invalid IL or missing references) //IL_098b: Unknown result type (might be due to invalid IL or missing references) //IL_099c: 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_09ac: Unknown result type (might be due to invalid IL or missing references) //IL_09c6: Unknown result type (might be due to invalid IL or missing references) //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09dd: Unknown result type (might be due to invalid IL or missing references) //IL_09e7: Unknown result type (might be due to invalid IL or missing references) //IL_09f3: Expected O, but got Unknown //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Unknown result type (might be due to invalid IL or missing references) //IL_0a0b: Unknown result type (might be due to invalid IL or missing references) //IL_0a16: Unknown result type (might be due to invalid IL or missing references) //IL_0a21: Unknown result type (might be due to invalid IL or missing references) //IL_0a3b: Unknown result type (might be due to invalid IL or missing references) //IL_0a4c: Unknown result type (might be due to invalid IL or missing references) //IL_0a61: 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_0a85: Unknown result type (might be due to invalid IL or missing references) //IL_0a96: Unknown result type (might be due to invalid IL or missing references) //IL_0a9c: Unknown result type (might be due to invalid IL or missing references) //IL_0aa6: Unknown result type (might be due to invalid IL or missing references) //IL_0ab2: Expected O, but got Unknown //IL_0abd: Unknown result type (might be due to invalid IL or missing references) //IL_0ac2: Unknown result type (might be due to invalid IL or missing references) //IL_0aca: Unknown result type (might be due to invalid IL or missing references) //IL_0ad5: Unknown result type (might be due to invalid IL or missing references) //IL_0adc: Unknown result type (might be due to invalid IL or missing references) //IL_0ae6: Unknown result type (might be due to invalid IL or missing references) //IL_0af7: Unknown result type (might be due to invalid IL or missing references) //IL_0afd: Unknown result type (might be due to invalid IL or missing references) //IL_0b07: Unknown result type (might be due to invalid IL or missing references) //IL_0b11: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b28: Unknown result type (might be due to invalid IL or missing references) //IL_0b32: Unknown result type (might be due to invalid IL or missing references) //IL_0b3e: Expected O, but got Unknown //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0b4e: Unknown result type (might be due to invalid IL or missing references) //IL_0b56: Unknown result type (might be due to invalid IL or missing references) //IL_0b61: Unknown result type (might be due to invalid IL or missing references) //IL_0b68: Unknown result type (might be due to invalid IL or missing references) //IL_0b8a: Unknown result type (might be due to invalid IL or missing references) //IL_0b9b: Unknown result type (might be due to invalid IL or missing references) //IL_0ba1: Unknown result type (might be due to invalid IL or missing references) //IL_0bab: Unknown result type (might be due to invalid IL or missing references) //IL_0bcd: Unknown result type (might be due to invalid IL or missing references) //IL_0bde: Unknown result type (might be due to invalid IL or missing references) //IL_0be4: Unknown result type (might be due to invalid IL or missing references) //IL_0bee: Unknown result type (might be due to invalid IL or missing references) //IL_0bfa: Expected O, but got Unknown //IL_0bff: Unknown result type (might be due to invalid IL or missing references) //IL_0c09: Expected O, but got Unknown //IL_0c0d: Unknown result type (might be due to invalid IL or missing references) //IL_0c13: Expected O, but got Unknown //IL_0cc9: Unknown result type (might be due to invalid IL or missing references) //IL_0cd3: Expected O, but got Unknown //IL_0cde: Unknown result type (might be due to invalid IL or missing references) //IL_0ce3: Unknown result type (might be due to invalid IL or missing references) //IL_0cea: Unknown result type (might be due to invalid IL or missing references) //IL_0cf2: Unknown result type (might be due to invalid IL or missing references) //IL_0cf9: Unknown result type (might be due to invalid IL or missing references) //IL_0d04: Unknown result type (might be due to invalid IL or missing references) //IL_0d0b: Unknown result type (might be due to invalid IL or missing references) //IL_0d12: Unknown result type (might be due to invalid IL or missing references) //IL_0d1d: Unknown result type (might be due to invalid IL or missing references) //IL_0d2e: Unknown result type (might be due to invalid IL or missing references) //IL_0d34: Unknown result type (might be due to invalid IL or missing references) //IL_0d3e: Unknown result type (might be due to invalid IL or missing references) //IL_0d58: Unknown result type (might be due to invalid IL or missing references) //IL_0d69: Unknown result type (might be due to invalid IL or missing references) //IL_0d6f: Unknown result type (might be due to invalid IL or missing references) //IL_0d79: Unknown result type (might be due to invalid IL or missing references) //IL_0d93: Unknown result type (might be due to invalid IL or missing references) //IL_0da4: Unknown result type (might be due to invalid IL or missing references) //IL_0daa: Unknown result type (might be due to invalid IL or missing references) //IL_0db4: Unknown result type (might be due to invalid IL or missing references) //IL_0db9: Unknown result type (might be due to invalid IL or missing references) //IL_0dc3: Expected O, but got Unknown //IL_0dc3: Unknown result type (might be due to invalid IL or missing references) //IL_0dc8: Unknown result type (might be due to invalid IL or missing references) //IL_0dd2: Expected O, but got Unknown //IL_0dd7: Expected O, but got Unknown //IL_0de2: Unknown result type (might be due to invalid IL or missing references) //IL_0de7: Unknown result type (might be due to invalid IL or missing references) //IL_0dee: Unknown result type (might be due to invalid IL or missing references) //IL_0df6: Unknown result type (might be due to invalid IL or missing references) //IL_0dfd: Unknown result type (might be due to invalid IL or missing references) //IL_0e04: Unknown result type (might be due to invalid IL or missing references) //IL_0e0a: Unknown result type (might be due to invalid IL or missing references) //IL_0e14: Unknown result type (might be due to invalid IL or missing references) //IL_0e20: Expected O, but got Unknown //IL_0e41: Unknown result type (might be due to invalid IL or missing references) //IL_0e61: Unknown result type (might be due to invalid IL or missing references) //IL_0e81: Unknown result type (might be due to invalid IL or missing references) //IL_0eb4: Unknown result type (might be due to invalid IL or missing references) //IL_0ee8: Unknown result type (might be due to invalid IL or missing references) //IL_0f1c: Unknown result type (might be due to invalid IL or missing references) //IL_0f3d: Unknown result type (might be due to invalid IL or missing references) //IL_0f47: Expected O, but got Unknown //IL_0f6b: Unknown result type (might be due to invalid IL or missing references) //IL_0f9f: Unknown result type (might be due to invalid IL or missing references) //IL_0fd3: Unknown result type (might be due to invalid IL or missing references) //IL_1009: Unknown result type (might be due to invalid IL or missing references) //IL_1013: Expected O, but got Unknown //IL_103e: Unknown result type (might be due to invalid IL or missing references) //IL_1043: Unknown result type (might be due to invalid IL or missing references) //IL_104a: Unknown result type (might be due to invalid IL or missing references) //IL_1059: Unknown result type (might be due to invalid IL or missing references) //IL_105f: Unknown result type (might be due to invalid IL or missing references) //IL_1069: Unknown result type (might be due to invalid IL or missing references) //IL_1070: Unknown result type (might be due to invalid IL or missing references) //IL_107f: Unknown result type (might be due to invalid IL or missing references) //IL_1085: Unknown result type (might be due to invalid IL or missing references) //IL_108f: Unknown result type (might be due to invalid IL or missing references) //IL_1096: Unknown result type (might be due to invalid IL or missing references) //IL_10a5: Unknown result type (might be due to invalid IL or missing references) //IL_10ab: Unknown result type (might be due to invalid IL or missing references) //IL_10b5: Unknown result type (might be due to invalid IL or missing references) //IL_10bc: Unknown result type (might be due to invalid IL or missing references) //IL_10cb: Unknown result type (might be due to invalid IL or missing references) //IL_10d1: Unknown result type (might be due to invalid IL or missing references) //IL_10db: Unknown result type (might be due to invalid IL or missing references) //IL_10e2: Unknown result type (might be due to invalid IL or missing references) //IL_10f1: Unknown result type (might be due to invalid IL or missing references) //IL_10f7: Unknown result type (might be due to invalid IL or missing references) //IL_1101: Unknown result type (might be due to invalid IL or missing references) //IL_1108: 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) //IL_111d: Unknown result type (might be due to invalid IL or missing references) //IL_1127: Unknown result type (might be due to invalid IL or missing references) //IL_112e: Unknown result type (might be due to invalid IL or missing references) //IL_113d: Unknown result type (might be due to invalid IL or missing references) //IL_1143: Unknown result type (might be due to invalid IL or missing references) //IL_114d: Unknown result type (might be due to invalid IL or missing references) //IL_1152: Unknown result type (might be due to invalid IL or missing references) //IL_115c: Expected O, but got Unknown //IL_115c: Unknown result type (might be due to invalid IL or missing references) //IL_1161: Unknown result type (might be due to invalid IL or missing references) //IL_116b: Expected O, but got Unknown //IL_116b: Unknown result type (might be due to invalid IL or missing references) //IL_1170: Unknown result type (might be due to invalid IL or missing references) //IL_117a: Expected O, but got Unknown //IL_117a: Unknown result type (might be due to invalid IL or missing references) //IL_117b: 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_1192: Expected O, but got Unknown //IL_0c2c: Unknown result type (might be due to invalid IL or missing references) //IL_0c36: Expected O, but got Unknown //IL_11d7: Unknown result type (might be due to invalid IL or missing references) //IL_11c1: Unknown result type (might be due to invalid IL or missing references) //IL_11dc: Unknown result type (might be due to invalid IL or missing references) //IL_11ec: Unknown result type (might be due to invalid IL or missing references) //IL_11f1: Unknown result type (might be due to invalid IL or missing references) //IL_11f8: Unknown result type (might be due to invalid IL or missing references) //IL_1200: Unknown result type (might be due to invalid IL or missing references) //IL_1206: Unknown result type (might be due to invalid IL or missing references) //IL_120e: Expected O, but got Unknown //IL_121c: Unknown result type (might be due to invalid IL or missing references) //IL_1221: Unknown result type (might be due to invalid IL or missing references) //IL_1229: Unknown result type (might be due to invalid IL or missing references) //IL_122f: Unknown result type (might be due to invalid IL or missing references) //IL_123a: Expected O, but got Unknown //IL_0c66: Unknown result type (might be due to invalid IL or missing references) ready = true; int w = (int)(((Rect)(ref _wRect)).width - 20f); RectOffset overflow = new RectOffset(0, 0, 2, 3); GUIStyle val = new GUIStyle(GUI.skin.label) { fontSize = 11, alignment = (TextAnchor)3 }; val.normal.textColor = ColTxt; val.overflow = overflow; _ls = val; GUIStyle val2 = new GUIStyle(GUI.skin.label) { fontSize = 18, fontStyle = (FontStyle)1 }; val2.normal.textColor = Color.white; val2.overflow = overflow; _ts = val2; GUIStyle val3 = new GUIStyle(GUI.skin.label) { fontSize = 11, fontStyle = (FontStyle)1 }; val3.normal.textColor = Color.white; val3.overflow = overflow; _secS = val3; GUIStyle val4 = new GUIStyle(GUI.skin.label) { fontSize = 10 }; val4.normal.textColor = ColTxt; val4.alignment = (TextAnchor)4; val4.overflow = overflow; _footer = val4; _toastStyle = new GUIStyle(GUI.skin.label) { fontSize = 15, fontStyle = (FontStyle)1, alignment = (TextAnchor)4, wordWrap = true, overflow = new RectOffset(0, 0, 3, 4) }; GUIStyle val5 = new GUIStyle(GUI.skin.label) { fontSize = 11, alignment = (TextAnchor)3, wordWrap = true }; val5.normal.textColor = new Color(0.82f, 0.83f, 0.86f); val5.padding = new RectOffset(0, 0, 0, 0); val5.overflow = new RectOffset(0, 0, 0, 0); _bugSub = val5; GUIStyle val6 = new GUIStyle(GUI.skin.textArea) { fontSize = 11, alignment = (TextAnchor)0, wordWrap = true }; val6.normal.background = RoundedRect(356, 62, ColDark, 6); val6.normal.textColor = Color.white; val6.focused.background = RoundedRect(356, 62, new Color(0.22f, 0.22f, 0.22f), 6); val6.focused.textColor = Color.white; val6.padding = new RectOffset(8, 8, 6, 6); val6.overflow = new RectOffset(0, 0, 0, 0); _bugArea = val6; GUIStyle val7 = new GUIStyle(GUI.skin.textField) { fontSize = 11, fixedHeight = 30f, alignment = (TextAnchor)3 }; val7.normal.background = RoundedRect(w, 30, ColDark, 12); val7.normal.textColor = ColTxt; val7.focused.background = RoundedRect(w, 30, new Color(0.22f, 0.22f, 0.22f), 12); val7.focused.textColor = Color.white; val7.hover.background = RoundedRect(w, 30, ColDarkH, 12); val7.hover.textColor = ColTxt; val7.padding = new RectOffset(10, 10, 0, 0); val7.overflow = overflow; _searchField = val7; GUIStyle val8 = new GUIStyle(GUI.skin.label) { fontSize = 11, fontStyle = (FontStyle)0, alignment = (TextAnchor)3 }; val8.normal.textColor = new Color(1f, 1f, 1f, 0.45f); val8.padding = new RectOffset(10, 10, 0, 0); val8.overflow = overflow; _searchHint = val8; GUIStyle val9 = new GUIStyle(GUI.skin.button) { fontSize = 10, fontStyle = (FontStyle)1, fixedHeight = 22f, fixedWidth = 34f }; val9.normal.background = RoundedRect(34, 22, ColDark, 12); val9.normal.textColor = Color.white; val9.hover.background = RoundedRect(34, 22, ColDarkH, 12); val9.hover.textColor = Color.white; val9.overflow = overflow; _preset = val9; GUIStyle val10 = new GUIStyle(GUI.skin.textField) { fontSize = 11, fontStyle = (FontStyle)1, fixedHeight = 22f, alignment = (TextAnchor)4 }; val10.normal.background = RoundedRect(38, 22, ColDark, 5); val10.normal.textColor = Color.white; val10.hover.background = RoundedRect(38, 22, ColDarkH, 5); val10.hover.textColor = Color.white; val10.focused.background = RoundedRect(38, 22, new Color(0.22f, 0.22f, 0.22f), 5); val10.focused.textColor = Color.white; val10.padding = new RectOffset(2, 2, 0, 0); val10.overflow = overflow; _amtField = val10; GUIStyle val11 = new GUIStyle(GUI.skin.button) { fontSize = 12, fontStyle = (FontStyle)1, fixedHeight = 28f }; val11.normal.background = RoundedRect(188, 28, ColGreen, 12); val11.normal.textColor = ColGreenTxt; val11.hover.background = RoundedRect(188, 28, ColGreenH, 12); val11.hover.textColor = ColGreenTxt; val11.overflow = overflow; _fBtn = val11; GUIStyle val12 = new GUIStyle(GUI.skin.button) { fontSize = 11, fontStyle = (FontStyle)1, fixedHeight = 28f, alignment = (TextAnchor)4 }; val12.normal.background = RoundedRect(188, 28, ColRed, 12, topL: true, topR: false, botR: false, botL: true); val12.normal.textColor = ColRedTxt; val12.hover.background = RoundedRect(188, 28, ColRedH, 12, topL: true, topR: false, botR: false, botL: true); val12.hover.textColor = ColRedTxt; val12.overflow = overflow; _killBtn = val12; GUIStyle val13 = new GUIStyle(GUI.skin.button) { fontSize = 11, fontStyle = (FontStyle)1, fixedHeight = 28f, fixedWidth = 28f, alignment = (TextAnchor)4 }; val13.normal.background = RoundedRect(28, 28, ColRed, 12, topL: false, topR: true, botR: true, botL: false); val13.normal.textColor = ColRedTxt; val13.hover.background = RoundedRect(28, 28, ColRedH, 12, topL: false, topR: true, botR: true, botL: false); val13.hover.textColor = ColRedTxt; val13.overflow = overflow; _killArrow = val13; GUIStyle val14 = new GUIStyle(GUI.skin.button) { fontSize = 9, fixedHeight = 16f, fontStyle = (FontStyle)1, alignment = (TextAnchor)4 }; val14.normal.background = RoundedRect(34, 16, ColRed, 4); val14.normal.textColor = ColRedTxt; val14.hover.background = RoundedRect(34, 16, ColRedH, 4); val14.hover.textColor = ColRedTxt; val14.padding = new RectOffset(0, 0, 0, 0); val14.overflow = overflow; _killCountStyle = val14; GUIStyle val15 = new GUIStyle(GUI.skin.label) { fontSize = 10, fontStyle = (FontStyle)1, alignment = (TextAnchor)4 }; val15.normal.textColor = Color.white; val15.padding = new RectOffset(0, 0, 0, 0); val15.overflow = new RectOffset(0, 0, 0, 0); _pill = val15; GUIStyle val16 = new GUIStyle(GUI.skin.button) { fontSize = 10, fontStyle = (FontStyle)1, fixedHeight = 24f, alignment = (TextAnchor)3, padding = new RectOffset(8, 8, 0, 0) }; val16.normal.background = RoundedRect(362, 24, ColDark, 6); val16.normal.textColor = Color.white; val16.hover.background = RoundedRect(362, 24, ColDarkH, 6); val16.hover.textColor = Color.white; val16.overflow = overflow; _catBtn = val16; GUIStyle val17 = new GUIStyle(GUI.skin.button) { fontSize = 11, fixedHeight = 26f, alignment = (TextAnchor)3, padding = new RectOffset(6, 6, 0, 0) }; val17.normal.background = RoundedRect(220, 26, ColDark, 5); val17.normal.textColor = ColTxt; val17.hover.background = RoundedRect(220, 26, ColDarkH, 5); val17.hover.textColor = Color.white; val17.overflow = overflow; _monBtn = val17; GUIStyle val18 = new GUIStyle(GUI.skin.button) { fontSize = 12, fixedHeight = 26f, fixedWidth = 26f }; val18.normal.background = RoundedRect(26, 26, new Color(0.15f, 0.12f, 0.02f), 12); val18.normal.textColor = ColStar; val18.hover.background = RoundedRect(26, 26, new Color(0.22f, 0.18f, 0.04f), 12); val18.hover.textColor = ColStar; val18.overflow = overflow; _favOn = val18; GUIStyle val19 = new GUIStyle(GUI.skin.button) { fontSize = 12, fixedHeight = 26f, fixedWidth = 26f }; val19.normal.background = RoundedRect(26, 26, new Color(0.1f, 0.1f, 0.1f), 12); val19.normal.textColor = new Color(0.5f, 0.5f, 0.5f); val19.hover.background = RoundedRect(26, 26, new Color(0.18f, 0.18f, 0.18f), 12); val19.hover.textColor = ColStar; val19.overflow = overflow; _favOff = val19; GUIStyle val20 = new GUIStyle(GUI.skin.button) { fontSize = 10, fixedHeight = 20f, alignment = (TextAnchor)4 }; val20.normal.background = RoundedRect(w, 20, ColDark, 12); val20.normal.textColor = ColTxt; val20.hover.background = RoundedRect(w, 20, ColDarkH, 12); val20.hover.textColor = ColTxt; val20.overflow = overflow; _legendBtn = val20; GUIStyle val21 = new GUIStyle(GUI.skin.button) { fontSize = 10, fixedHeight = 26f, alignment = (TextAnchor)4 }; val21.normal.background = RoundedRect(134, 26, new Color(0.22f, 0.22f, 0.22f, 0.95f), 12); val21.normal.textColor = Color.white; val21.hover.background = RoundedRect(134, 26, new Color(0.28f, 0.28f, 0.28f, 0.95f), 12); val21.hover.textColor = Color.white; val21.overflow = overflow; _footerBtn = val21; _discordIcon = new Texture2D(2, 2, (TextureFormat)4, false); try { Texture2D val22 = new Texture2D(2, 2, (TextureFormat)4, false); if (ImageConversion.LoadImage(val22, Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAAKlBMVEVHcExYZfJXZPFYZfJXZPBYZfL///9RX/JHV/HEyPqepffh5P2FjvVsd/StrBPNAAAABXRSTlMA1UaXEmpP0/0AAASaSURBVHicxVvbgqsgDFxBC97+/3cXtFaQXBDQzHnZU1tnTEKIBP7+StArpXXXdcMG94fWSvVFtyrg1l/eFJ1+WgVBHoh4jp0jP/CEhj6b/auhrS8Ua/kUXTszlNA3lFBK30hCX0G/SaiMhZuhB0FX0Kt6eo9iPzR4/B1lRqj1foSCSGhk/gO33dDM/AduuqGl+b/ohPlvKXiC3kOaP1fBc/x5Cp7kz1HwSPydYCPxYX5WQfP8k4LMSI3zLwwiK/dv8FMz0zv8eBi8EAA7kDB4JQB2wGHwHj+cj15zgAfghJdGwIF0JDyeAmMkI+HFCNxxjcMbBjDGGvBza8DPYXRlBvDkyzgvENMyj8sNEeq+AYy1jvzjYdOrdrvgRFjYQFd0Nw3gnm3ayT2mjcN8sf09/S7OE+KkGOqOAYx79k8Ia+2wLsvk/i3LOrj/RpedHVgJgQnYHBA83vGU7AcTq+DMBVwSNNeb54FTcKZD5ot25MkgjECoRsgMQbOU8X8+4GgNoPI8YHkmDIwJdJYHTKEDPLhAzEsC5fyfD3NrleGB0gjcwcShzshCaw3/57OSN+/4LGSTBHMPM22Cng2BSgNwJlBcCNRFgAcdBZoNgVp+ZiB0TBaoyQE/E5C5gInBiiR4gvRBT8ZgOguXgEyHihRQOwZ3kCNR0YOgBT9dF2hKQBsP0D7Q1Chs4wHaBx0lAK7ERleKgqNzdPUpPGwJC1ACwEposr4Ot2talK7+irWQ24jKqCPyEJSFpq81zdU981GGQwqoXEQIAEIgTOzxleBnqW4qCCgB6aMETxLzhMqA0CkSAIRANLNFE3U46QImIIKAEJA6MxrQkYGiR2R+mC0gfZBYQBAikZMB5UQU4sMQiME8CwAC8Cgk8gAQg5kCgOHbSED4IHGMhlEGZXBCAD4ZpbcJgz2mCaVBdSxKQsyG0H1OnusgPU0ATmFobazRggR+Jz4ygUnkrUcqBucjNBEQFRH8Uj4PFplyJuuvDPAUTgjAilK0GpnHEamV3QWsgkAzUY+W5a3KIUYA/mLyjoAOfzV7R4DGX07fEaCI1/PipSkI2Cjo8QWK8rWxGwI6aommemUgBJIJNbVIlQoY7ZLxpjAuQDJEBChqmS6dVcfB2mEiNcyT/076SyQE6IVKCxSFxrpsC7+X+DeTwV8GSkJkNj4WKtH5CLDl6CYdNxesU5R2XXqeVt+oMCvwE3Tl/tcxQK57I6QG3wJ6ewlyxh5W513rp6Fr1+KnbcVr8ozlepPMe9fyLn66pBiYiMbFuVxPLdNcJdAr4JfsQdFHzUtypSySwPUAwrCh6aOuFdcxsL/BxzejDlexXaOob8d1rdwL+cg7YPvm5oRxZZtWceeS79ttTUO2CTN4J2SwD0nvNqNzeXQIWQVZX7t2r8Wb1+Lte/kNDOJbOOQ3schv4xHfyPTeSMD45TeziW/nk9/QKL+lU35Tq/y2XvmNzfJbu+U3t8tv75c/4CB/xEP+kEvbmanwwJfwQac/+aNebYxQc9jtT/6435/4gccaCcKnThvSewgf+90ge/D50MD74jn2HbKH308VzY7//wMg6g7yNt7XjAAAAABJRU5ErkJggg=="))) { _discordIcon = new Texture2D(16, 16, (TextureFormat)4, false); for (int i = 0; i < 16; i++) { for (int j = 0; j < 16; j++) { _discordIcon.SetPixel(j, i, val22.GetPixelBilinear(((float)j + 0.5f) / 16f, ((float)i + 0.5f) / 16f)); } } _discordIcon.Apply(); Object.Destroy((Object)(object)val22); } else { _discordIcon = MakeDiscordIcon(22, 16); } } catch { _discordIcon = MakeDiscordIcon(22, 16); } _discordContent = new GUIContent("eliteghg_", (Texture)(object)_discordIcon); GUIStyle val23 = new GUIStyle(GUI.skin.button) { richText = true, fontSize = 10, fontStyle = (FontStyle)0, fixedHeight = 26f, alignment = (TextAnchor)4, imagePosition = (ImagePosition)0 }; val23.normal.background = RoundedRect(104, 26, ColDiscord, 12); val23.normal.textColor = Color.white; val23.hover.background = RoundedRect(104, 26, new Color(0.42f, 0.52f, 1f), 12); val23.hover.textColor = Color.white; val23.active.background = RoundedRect(104, 26, new Color(0.28f, 0.36f, 0.85f), 12); val23.active.textColor = Color.white; val23.padding = new RectOffset(0, 0, 0, 0); val23.margin = new RectOffset(0, 0, 0, 0); _discordBtn = val23; GUIStyle val24 = new GUIStyle(GUI.skin.label) { richText = true, fontSize = 9, fontStyle = (FontStyle)1, alignment = (TextAnchor)4 }; val24.normal.textColor = Color.white; val24.overflow = overflow; _grabS = val24; _skin = Object.Instantiate(GUI.skin); _skin.scrollView.normal.background = MkT(Color.clear); _skin.box.normal.background = MkT(Color.clear); _skin.box.onNormal.background = MkT(Color.clear); _skin.verticalScrollbar.normal.background = RoundedRect(14, 40, new Color(0.08f, 0.08f, 0.08f), 7); _skin.verticalScrollbar.hover.background = RoundedRect(14, 40, new Color(0.1f, 0.1f, 0.1f), 7); _skin.verticalScrollbar.active.background = RoundedRect(14, 40, new Color(0.12f, 0.12f, 0.12f), 7); _skin.verticalScrollbar.border = new RectOffset(6, 6, 10, 10); _skin.verticalScrollbarThumb.normal.background = RoundedRect(14, 40, new Color(0.38f, 0.38f, 0.38f), 7); _skin.verticalScrollbarThumb.hover.background = RoundedRect(14, 40, new Color(0.52f, 0.52f, 0.52f), 7); _skin.verticalScrollbarThumb.active.background = RoundedRect(14, 40, new Color(0.62f, 0.62f, 0.62f), 7); _skin.verticalScrollbarThumb.fixedWidth = 0f; _skin.verticalScrollbarThumb.border = new RectOffset(6, 6, 10, 10); _skin.verticalScrollbar.fixedWidth = 14f; _skin.horizontalScrollbar.fixedHeight = 0f; GUIStyle val25 = new GUIStyle(); val25.normal.background = MkT(Color.clear); val25.normal.textColor = Color.white; val25.focused.background = MkT(Color.clear); val25.focused.textColor = Color.white; val25.active.background = MkT(Color.clear); val25.active.textColor = Color.white; val25.onNormal.background = MkT(Color.clear); val25.onNormal.textColor = Color.white; val25.onFocused.background = MkT(Color.clear); val25.onFocused.textColor = Color.white; val25.onActive.background = MkT(Color.clear); val25.onActive.textColor = Color.white; val25.hover.background = MkT(Color.clear); val25.hover.textColor = Color.white; val25.border = new RectOffset(0, 0, 0, 0); val25.padding = new RectOffset(0, 0, 0, 0); val25.margin = new RectOffset(0, 0, 0, 0); val25.contentOffset = Vector2.zero; val25.fontSize = 11; _winStyle = val25; _lvStyles = (GUIStyle[])(object)new GUIStyle[11]; _dvStyles = (GUIStyle[])(object)new GUIStyle[11]; for (int k = 0; k < 11; k++) { Color textColor = (Color)((k == 0) ? new Color(0.75f, 0.77f, 0.8f) : DangerColors[k - 1]); GUIStyle[] lvStyles = _lvStyles; int num = k; GUIStyle val26 = new GUIStyle(_ls) { fontStyle = (FontStyle)1, fontSize = 10 }; val26.normal.textColor = textColor; lvStyles[num] = val26; GUIStyle[] dvStyles = _dvStyles; int num2 = k; GUIStyle val27 = new GUIStyle(_ls) { fontSize = 10 }; val27.normal.textColor = ColTxt; dvStyles[num2] = val27; } GUIStyle[] array = (GUIStyle[])(object)new GUIStyle[24] { _ls, _ts, _secS, _footer, _toastStyle, _searchField, _searchHint, _preset, _amtField, _fBtn, _killBtn, _killArrow, _killCountStyle, _pill, _bugArea, _bugSub, _catBtn, _monBtn, _favOn, _favOff, _legendBtn, _footerBtn, _discordBtn, _winStyle }; foreach (GUIStyle obj2 in array) { obj2.margin.left = 0; obj2.margin.right = 0; } for (int m = 0; m < 11; m++) { _lvStyles[m].margin.left = 0; _lvStyles[m].margin.right = 0; _dvStyles[m].margin.left = 0; _dvStyles[m].margin.right = 0; } _skin.verticalScrollbar.margin.left = 0; _skin.verticalScrollbar.margin.right = 0; } private void Awake() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Expected O, but got Unknown _toggleKey = ((BaseUnityPlugin)this).Config.Bind("General", "ToggleKey", new KeyboardShortcut((KeyCode)285, Array.Empty()), "Key to open/close the spawner window"); _closeOnEsc = ((BaseUnityPlugin)this).Config.Bind("General", "CloseOnEsc", false, "Also close the window with Escape"); BuildMonsterKeys(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"[MS] MonsterSpawnerMod v1.0.0 loaded"); try { Harmony val = new Harmony("com.monsterspawner.gui"); MethodInfo method = typeof(GlobalInputHandler).GetMethod("CanTakeInput", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { val.Patch((MethodBase)method, new HarmonyMethod(typeof(Plugin), "CanTakeInputPrefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } else { ((BaseUnityPlugin)this).Logger.LogError((object)"[MS] Harmony: CanTakeInput not found"); } MethodInfo method2 = typeof(PlayerInput).GetMethod("Update", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method2 != null) { val.Patch((MethodBase)method2, new HarmonyMethod(typeof(Plugin), "PlayerInputPrefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } else { ((BaseUnityPlugin)this).Logger.LogError((object)"[MS] Harmony: PlayerInput.Update not found"); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("[MS] Harmony patch failed: " + ex)); } try { string text = PlayerPrefs.GetString("MS_Favs", ""); if (string.IsNullOrEmpty(text)) { return; } string[] array = text.Split(','); foreach (string text2 in array) { if (!string.IsNullOrEmpty(text2) && !favorites.Contains(text2)) { favorites.Add(text2); } } } catch { } } private void SaveFavorites() { try { PlayerPrefs.SetString("MS_Favs", string.Join(",", favorites.ToArray())); PlayerPrefs.Save(); } catch { } } private static bool CanTakeInputPrefix(ref bool __result) { if (MenuOpen) { __result = false; return false; } return true; } private static bool PlayerInputPrefix(PlayerInput __instance) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (!MenuOpen || __instance == null) { return true; } __instance.movementInput = Vector2.zero; __instance.lookInput = Vector2.zero; __instance.jumpWasPressed = false; __instance.jumpIsPressed = false; __instance.sprintIsPressed = false; __instance.interactWasPressed = false; __instance.interactIsPressed = false; return false; } private void OpenMenu() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) _wasCursorVisible = Cursor.visible; _wasCursorLock = Cursor.lockState; _cursorSaved = true; _menu = true; MenuOpen = true; Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; } private void CloseMenu() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) _menu = false; MenuOpen = false; _showBugPopup = false; if (_cursorSaved) { try { Cursor.visible = _wasCursorVisible; Cursor.lockState = _wasCursorLock; return; } catch { Cursor.visible = false; Cursor.lockState = (CursorLockMode)1; return; } } Cursor.visible = false; Cursor.lockState = (CursorLockMode)1; } private void Update() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) KeyboardShortcut value = _toggleKey.Value; if (((KeyboardShortcut)(ref value)).IsDown()) { if (_menu) { CloseMenu(); _showBugPopup = false; } else if (!PhotonNetwork.IsMasterClient) { ShowToast("Only the host can use the spawner!", error: true); } else { OpenMenu(); } } else if (_closeOnEsc.Value && Input.GetKeyDown((KeyCode)27) && _menu) { CloseMenu(); _showBugPopup = false; } if (_showBugPopup && Input.GetKeyDown((KeyCode)27)) { _showBugPopup = false; } UpdateToasts(); if (_confirmTimerSpawn > 0f) { _confirmTimerSpawn -= Time.unscaledDeltaTime; if (_confirmTimerSpawn <= 0f) { _confirmSpawnAll = false; } } if (_confirmTimerKill > 0f) { _confirmTimerKill -= Time.unscaledDeltaTime; if (_confirmTimerKill <= 0f) { _confirmKillAll = false; } } _cleanTimer -= Time.unscaledDeltaTime; if (_cleanTimer <= 0f) { _cleanTimer = 2f; CleanDead(); } if (Input.GetMouseButtonUp(0)) { _dragType = 0; } if (_isKilling) { _killTimer -= Time.unscaledDeltaTime; if (_killTimer <= 0f) { _isKilling = false; ((BaseUnityPlugin)this).Logger.LogWarning((object)"[MS-Kill] _isKilling safety reset (stuck for 5s)"); } } if (_menu) { ScanVanilla(); } } private void LateUpdate() { if (_menu) { Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; } } private void OnGUI() { //IL_0037: 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_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Invalid comparison between Unknown and I4 //IL_00fc: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Expected O, but got Unknown //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) if (!ready) { InitStyles(); } if (_menu) { Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; Event current = Event.current; if (_showBugPopup && current != null && ((int)current.type == 0 || (int)current.type == 1)) { Rect val = BugCardRect(); if (!((Rect)(ref val)).Contains(current.mousePosition)) { current.Use(); } } GUISkin skin = GUI.skin; if ((Object)(object)_skin != (Object)null) { GUI.skin = _skin; } try { float x = ((Rect)(ref _wRect)).x; float y = ((Rect)(ref _wRect)).y; float width = ((Rect)(ref _wRect)).width; float height = ((Rect)(ref _wRect)).height; int num = (int)width; int num2 = (int)height; for (int num3 = 3; num3 >= 0; num3--) { float num4 = (float)num3 / 3f; float num5 = 5f * num4; GUI.DrawTexture(new Rect(x - num5, y - num5, width + num5 * 2f, height + num5 * 2f), (Texture)(object)RoundedRect((int)(width + num5 * 2f), (int)(height + num5 * 2f), new Color(0f, 0f, 0f, 0.35f * (1f - num4)), 12 + (int)(num5 * 0.3f))); } int num6 = 3; GUI.DrawTexture(new Rect(x - (float)num6, y - (float)num6, width + (float)(num6 * 2), height + (float)(num6 * 2)), (Texture)(object)RoundedRect(num + num6 * 2, num2 + num6 * 2, ColBorder, 12)); _wRect = GUI.Window(WinId, _wRect, new WindowFunction(DrawWindow), "", _winStyle); ((Rect)(ref _wRect)).x = Mathf.Clamp(((Rect)(ref _wRect)).x, 0f - ((Rect)(ref _wRect)).width + 100f, (float)Screen.width - 100f); ((Rect)(ref _wRect)).y = Mathf.Clamp(((Rect)(ref _wRect)).y, 0f, (float)Screen.height - 60f); } finally { GUI.skin = skin; } } DrawToast(); if (_showBugPopup) { DrawBugReportPopup(); } } private void DrawWindow(int id) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) GUI.DrawTexture(new Rect(0f, 0f, ((Rect)(ref _wRect)).width, ((Rect)(ref _wRect)).height), (Texture)(object)RoundedRect((int)((Rect)(ref _wRect)).width, (int)((Rect)(ref _wRect)).height, ColBg, 12)); GUILayout.BeginVertical(Array.Empty()); GUILayout.Space(4f); DrawContent(); GUILayout.Space(4f); GUILayout.EndVertical(); GUI.DragWindow(new Rect(0f, 0f, 10000f, 28f)); } private void DrawBorder(Rect r, Color c) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) int num = (int)((Rect)(ref r)).width; int num2 = (int)((Rect)(ref r)).height; GUI.DrawTexture(new Rect(((Rect)(ref r)).x - 1f, ((Rect)(ref r)).y - 1f, ((Rect)(ref r)).width + 2f, ((Rect)(ref r)).height + 2f), (Texture)(object)RoundedRect(num + 2, num2 + 2, c, 12)); GUI.DrawTexture(r, (Texture)(object)RoundedRect(num, num2, ColDark, 12)); } private void DrawToast() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) float num = Mathf.Min(340f, (float)Screen.width - 20f); float num2 = 44f; float num3 = 50f; Rect val = default(Rect); for (int i = 0; i < _activeToasts.Count; i++) { Toast toast = _activeToasts[i]; ((Rect)(ref val))..ctor(Mathf.Max(10f, ((float)Screen.width - num) * 0.5f), num3, num, num2); Color fill = (toast.error ? ToastBgErr : ToastBgOk); Color fill2 = (toast.error ? ToastBdErr : ToastBdOk); GUI.DrawTexture(new Rect(((Rect)(ref val)).x + 2f, ((Rect)(ref val)).y + 2f, num, num2), (Texture)(object)RoundedRect((int)num, (int)num2, ToastShadow, 12)); GUI.DrawTexture(new Rect(((Rect)(ref val)).x - 2f, ((Rect)(ref val)).y - 2f, num + 4f, num2 + 4f), (Texture)(object)RoundedRect((int)num + 4, (int)num2 + 4, fill2, 12)); GUI.DrawTexture(val, (Texture)(object)RoundedRect((int)num, (int)num2, fill, 12)); _toastStyle.normal.textColor = (toast.error ? Color.red : Color.green); GUI.Label(val, toast.msg, _toastStyle); num3 += num2 + 6f; } } private void ShowToast(string msg, bool error) { if (_toastQueue.Count >= 8) { _toastQueue.Dequeue(); } _toastQueue.Enqueue(new Toast { msg = msg, error = error, timer = (error ? 3.5f : 2.5f) }); } private void UpdateToasts() { while (_activeToasts.Count < 3 && _toastQueue.Count > 0) { _activeToasts.Add(_toastQueue.Dequeue()); } for (int num = _activeToasts.Count - 1; num >= 0; num--) { Toast value = _activeToasts[num]; value.timer -= Time.unscaledDeltaTime; if (value.timer <= 0f) { _activeToasts.RemoveAt(num); } else { _activeToasts[num] = value; } } } private void Rep(string s) { string item = "[" + DateTime.Now.ToString("HH:mm:ss") + "] " + s; _repLog.Enqueue(item); while (_repLog.Count > 40) { _repLog.Dequeue(); } ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Rep] " + s)); } private string BuildReportText(string title, string desc, string steps) { int num = 0; int num2 = 0; for (int i = 0; i < _spawned.Count; i++) { if ((Object)(object)_spawned[i].go != (Object)null) { if (_spawned[i].fromMod) { num++; } else { num2++; } } } string text = "offline"; try { text = (PhotonNetwork.IsConnected ? ("online master=" + PhotonNetwork.IsMasterClient + " players=" + PhotonNetwork.CountOfPlayers) : "offline"); } catch { text = "?"; } string text2 = "?"; try { text2 = SystemInfo.operatingSystem; } catch { } string text3 = "?"; try { text3 = Application.unityVersion; } catch { } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine("## Bug Report"); stringBuilder.AppendLine("### Title"); stringBuilder.AppendLine(string.IsNullOrEmpty(title) ? "(none)" : title); stringBuilder.AppendLine("### Description"); stringBuilder.AppendLine(string.IsNullOrEmpty(desc) ? "(none)" : desc); stringBuilder.AppendLine("### Steps to Reproduce"); stringBuilder.AppendLine(string.IsNullOrEmpty(steps) ? "(none)" : steps); stringBuilder.AppendLine("### System"); stringBuilder.AppendLine("Mod: MonsterSpawnerMod v1.0.0 | OS: " + text2 + " | Unity: " + text3); stringBuilder.AppendLine("Scene objects: " + SceneGOs().Count + " | Tracked: " + _spawned.Count + " (mod=" + num + " vanilla=" + num2 + ") | Seen: " + _vanillaSeen.Count); stringBuilder.AppendLine("Photon: " + text + " | Amount: x" + spawnAmount + " | Filter: \"" + searchInput + "\""); stringBuilder.AppendLine("### Recent events"); foreach (string item in _repLog) { stringBuilder.AppendLine(item); } stringBuilder.AppendLine("### Log tail (mod)"); stringBuilder.Append(BugLogTail()); return stringBuilder.ToString(); } private string BugLogTail() { try { string path = Path.Combine(Paths.BepInExRootPath, "LogOutput.log"); if (!File.Exists(path)) { try { path = Path.Combine(Paths.GameRootPath, "BepInEx/LogOutput.log"); } catch { } } List list = new List(); using (FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { using StreamReader streamReader = new StreamReader(stream); string text; while ((text = streamReader.ReadLine()) != null) { if (text.Contains("[MS-") || text.Contains("Monster Spawn Menu")) { list.Add(text); } } } int num = Mathf.Max(0, list.Count - 60); StringBuilder stringBuilder = new StringBuilder(); for (int i = num; i < list.Count; i++) { stringBuilder.AppendLine(list[i]); } if (list.Count == 0) { stringBuilder.AppendLine("(no mod log lines found)"); } return stringBuilder.ToString(); } catch (Exception ex) { return "(log unavailable: " + ex.Message + ")"; } } private void SubmitBugReport() { if (string.IsNullOrEmpty(_bugTitle.Trim()) && string.IsNullOrEmpty(_bugDesc.Trim())) { _bugError = "ADD A TITLE OR DESCRIPTION"; return; } _bugError = ""; GUIUtility.systemCopyBuffer = BuildReportText(_bugTitle.Trim(), _bugDesc.Trim(), _bugSteps.Trim()); ShowToast("COPIED TO CLIPBOARD", error: false); if (_bugOpenGithub && !string.IsNullOrEmpty("https://github.com/EliteXGHG/MonsterSpawner-Content-Warning/issues/new?title=")) { try { Application.OpenURL("https://github.com/EliteXGHG/MonsterSpawner-Content-Warning/issues/new?title=" + Uri.EscapeDataString(_bugTitle.Trim())); } catch { } } _showBugPopup = false; try { DumpCensus(); } catch { } } private void BugFieldHeights(out float hDesc, out float hSteps) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown hDesc = Mathf.Clamp(_bugArea.CalcHeight(new GUIContent(_bugDesc), 392f), 80f, 150f); hSteps = Mathf.Clamp(_bugArea.CalcHeight(new GUIContent(_bugSteps), 392f), 80f, 150f); } private Rect BugCardRect() { //IL_0044: Unknown result type (might be due to invalid IL or missing references) BugFieldHeights(out var hDesc, out var hSteps); float num = 344f + hDesc + hSteps; return new Rect(((float)Screen.width - 440f) * 0.5f, Mathf.Max(10f, ((float)Screen.height - num) * 0.5f), 440f, num); } private void DrawBugReportPopup() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: 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_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: 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) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Invalid comparison between Unknown and I4 //IL_0a20: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Invalid comparison between Unknown and I4 //IL_0443: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_0aad: Unknown result type (might be due to invalid IL or missing references) //IL_0ab3: Invalid comparison between Unknown and I4 //IL_0a57: Unknown result type (might be due to invalid IL or missing references) //IL_0a6c: Unknown result type (might be due to invalid IL or missing references) //IL_087b: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Invalid comparison between Unknown and I4 //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0aeb: Unknown result type (might be due to invalid IL or missing references) //IL_0abc: Unknown result type (might be due to invalid IL or missing references) //IL_0ac8: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_0b2e: Unknown result type (might be due to invalid IL or missing references) //IL_0b34: Invalid comparison between Unknown and I4 //IL_0ada: Unknown result type (might be due to invalid IL or missing references) //IL_0ad3: Unknown result type (might be due to invalid IL or missing references) //IL_0b6d: Unknown result type (might be due to invalid IL or missing references) //IL_0b3d: Unknown result type (might be due to invalid IL or missing references) //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0bc7: Unknown result type (might be due to invalid IL or missing references) //IL_0bf0: Unknown result type (might be due to invalid IL or missing references) //IL_0b5c: Unknown result type (might be due to invalid IL or missing references) //IL_0b55: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_064f: Invalid comparison between Unknown and I4 //IL_06c9: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_06ce: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_071d: Expected O, but got Unknown if (!_showBugPopup || !_menu) { return; } GUI.DrawTexture(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), (Texture)(object)RoundedRect(Screen.width, Screen.height, new Color(0f, 0f, 0f, 0.8f), 0)); float num = 440f; BugFieldHeights(out var hDesc, out var hSteps); float num2 = 344f + hDesc + hSteps; float num3 = ((float)Screen.width - num) * 0.5f; float num4 = Mathf.Max(10f, ((float)Screen.height - num2) * 0.5f); Rect val = new Rect(num3, num4, num, num2); float num5 = 2f; GUI.DrawTexture(new Rect(num3 - num5, num4 - num5, num + num5 * 2f, num2 + num5 * 2f), (Texture)(object)RoundedRect((int)(num + num5 * 2f), (int)(num2 + num5 * 2f), Color.white, 14)); GUI.DrawTexture(val, (Texture)(object)RoundedRect((int)num, (int)num2, new Color(0.16f, 0.16f, 0.17f, 1f), 12)); float num6 = num3 + 24f; float num7 = num - 48f; float num8 = num4 + 24f; Color val2 = default(Color); ((Color)(ref val2))..ctor(0.55f, 0.55f, 0.57f, 1f); float num9 = num6 + 2f; float num10 = num8 + 8f; GUI.DrawTexture(new Rect(num9, num10 + 4f, 6f, 2f), (Texture)(object)MkT(val2)); GUI.DrawTexture(new Rect(num9, num10 + 9f, 6f, 2f), (Texture)(object)MkT(val2)); GUI.DrawTexture(new Rect(num9, num10 + 14f, 6f, 2f), (Texture)(object)MkT(val2)); GUI.DrawTexture(new Rect(num9 + 18f, num10 + 4f, 6f, 2f), (Texture)(object)MkT(val2)); GUI.DrawTexture(new Rect(num9 + 18f, num10 + 9f, 6f, 2f), (Texture)(object)MkT(val2)); GUI.DrawTexture(new Rect(num9 + 18f, num10 + 14f, 6f, 2f), (Texture)(object)MkT(val2)); GUI.DrawTexture(new Rect(num9 + 9f, num10 - 3f, 2f, 4f), (Texture)(object)MkT(val2)); GUI.DrawTexture(new Rect(num9 + 13f, num10 - 3f, 2f, 4f), (Texture)(object)MkT(val2)); GUI.DrawTexture(new Rect(num9 + 5f, num10, 14f, 20f), (Texture)(object)RoundedRect(14, 20, val2, 7)); GUI.DrawTexture(new Rect(num9 + 8f, num10 + 1f, 8f, 4f), (Texture)(object)RoundedRect(8, 4, val2, 2)); GUI.DrawTexture(new Rect(num9 + 9f, num10 + 2f, 2f, 2f), (Texture)(object)RoundedRect(2, 2, Color.white, 1)); GUI.DrawTexture(new Rect(num9 + 13f, num10 + 2f, 2f, 2f), (Texture)(object)RoundedRect(2, 2, Color.white, 1)); GUI.DrawTexture(new Rect(num9 + 11f, num10 + 5f, 2f, 14f), (Texture)(object)MkT(val2)); GUI.Label(new Rect(num6 + 30f, num8, num7 - 30f, 36f), "Report a Bug", _ts); num8 += 40f; GUI.Label(new Rect(num6, num8, num7, 22f), "Describe the issue. System info + logs auto-copy to clipboard.", _bugSub); num8 += 28f; GUI.Label(new Rect(num6, num8, num7, 22f), "Title", _ls); num8 += 24f; Rect val3 = default(Rect); ((Rect)(ref val3))..ctor(num6, num8, num7, 34f); if ((int)Event.current.type == 7) { GUI.DrawTexture(val3, (Texture)(object)RoundedRect((int)num7, 34, new Color(0.14f, 0.14f, 0.18f, 1f), 6)); } GUI.SetNextControlName("bugTitle"); _bugTitle = GUI.TextField(val3, _bugTitle, _searchField); num8 += 42f; GUI.Label(new Rect(num6, num8, num7, 22f), "Description", _ls); num8 += 24f; Rect val4 = default(Rect); ((Rect)(ref val4))..ctor(num6, num8, num7, hDesc); if ((int)Event.current.type == 7) { GUI.DrawTexture(val4, (Texture)(object)RoundedRect((int)num7, (int)hDesc, new Color(0.14f, 0.14f, 0.18f, 1f), 6)); } GUI.SetNextControlName("bugDesc"); _bugDesc = GUI.TextArea(val4, _bugDesc, _bugArea); num8 += hDesc + 8f; GUI.Label(new Rect(num6, num8, num7, 22f), "Steps to Reproduce", _ls); num8 += 24f; Rect val5 = default(Rect); ((Rect)(ref val5))..ctor(num6, num8, num7, hSteps); if ((int)Event.current.type == 7) { GUI.DrawTexture(val5, (Texture)(object)RoundedRect((int)num7, (int)hSteps, new Color(0.14f, 0.14f, 0.18f, 1f), 6)); } GUI.SetNextControlName("bugSteps"); _bugSteps = GUI.TextArea(val5, _bugSteps, _bugArea); num8 += hSteps + 8f; Rect val6 = default(Rect); ((Rect)(ref val6))..ctor(num6, num8 + 1f, 24f, 24f); bool flag = ((Rect)(ref val6)).Contains(Event.current.mousePosition); if ((int)Event.current.type == 0 && Event.current.button == 0 && flag) { _bugOpenGithub = !_bugOpenGithub; Event.current.Use(); } if ((int)Event.current.type == 7) { Color fill = ((!_bugOpenGithub) ? (flag ? new Color(0.75f, 0.18f, 0.18f, 1f) : new Color(0.55f, 0.12f, 0.12f, 1f)) : (flag ? new Color(0.18f, 0.68f, 0.32f, 1f) : new Color(0.13f, 0.55f, 0.24f, 1f))); GUI.DrawTexture(val6, (Texture)(object)RoundedRect(24, 24, fill, 6)); if ((Object)(object)_tickMat == (Object)null) { try { Shader val7 = Shader.Find("Hidden/Internal-Colored"); if ((Object)(object)val7 != (Object)null) { _tickMat = new Material(val7) { hideFlags = (HideFlags)61 }; } } catch { } } if ((Object)(object)_tickMat != (Object)null) { float x = ((Rect)(ref val6)).x; float num11 = ((Rect)(ref val6)).y + ((Rect)(ref val6)).height; _tickMat.SetPass(0); GL.PushMatrix(); GL.LoadPixelMatrix(); if (_bugOpenGithub) { GL.Begin(7); GL.Color(Color.white); DrawCircleGL(x + 5f, num11 - 14f, 2.5f); DrawCircleGL(x + 7f, num11 - 11f, 2.5f); DrawCircleGL(x + 9f, num11 - 8f, 2.5f); DrawCircleGL(x + 11f, num11 - 7.5f, 2.5f); DrawCircleGL(x + 13f, num11 - 7f, 2.5f); DrawCircleGL(x + 15f, num11 - 6.5f, 2.5f); DrawCircleGL(x + 17f, num11 - 6f, 2.5f); DrawCircleGL(x + 19f, num11 - 5.5f, 2.5f); GL.End(); } else { GL.Begin(7); GL.Color(new Color(1f, 0.4f, 0.4f, 0.95f)); DrawCircleGL(x + 6f, num11 - 18f, 2.5f); DrawCircleGL(x + 8f, num11 - 15.5f, 2.5f); DrawCircleGL(x + 10f, num11 - 13f, 2.5f); DrawCircleGL(x + 12f, num11 - 10.5f, 2.5f); DrawCircleGL(x + 14f, num11 - 8f, 2.5f); DrawCircleGL(x + 16f, num11 - 6.5f, 2.5f); DrawCircleGL(x + 18f, num11 - 6f, 2.5f); DrawCircleGL(x + 6f, num11 - 6f, 2.5f); DrawCircleGL(x + 8f, num11 - 8f, 2.5f); DrawCircleGL(x + 10f, num11 - 10f, 2.5f); DrawCircleGL(x + 12f, num11 - 12f, 2.5f); DrawCircleGL(x + 14f, num11 - 14f, 2.5f); DrawCircleGL(x + 16f, num11 - 16f, 2.5f); DrawCircleGL(x + 18f, num11 - 18f, 2.5f); GL.End(); } GL.PopMatrix(); } } GUI.Label(new Rect(num6 + 34f, num8, num7 - 34f, 24f), "Open GitHub issue page on submit", _ls); num8 += 30f; if (!string.IsNullOrEmpty(_bugError)) { _pill.normal.textColor = Color.red; GUI.Label(new Rect(num6, num8, num7, 18f), _bugError, _pill); num8 += 20f; } float num12 = 160f; Rect val8 = default(Rect); ((Rect)(ref val8))..ctor(num6, num8, 100f, 34f); if ((int)Event.current.type == 7) { bool flag2 = ((Rect)(ref val8)).Contains(Event.current.mousePosition); GUI.DrawTexture(val8, (Texture)(object)RoundedRect(100, 34, flag2 ? ColDarkH : ColDark, 12)); } if (GUI.Button(val8, "CANCEL", _footerBtn)) { _showBugPopup = false; _bugError = ""; } Rect val9 = default(Rect); ((Rect)(ref val9))..ctor(num6 + num7 - num12, num8, num12, 34f); if ((int)Event.current.type == 7) { bool flag3 = ((Rect)(ref val9)).Contains(Event.current.mousePosition); GUI.DrawTexture(val9, (Texture)(object)RoundedRect((int)num12, 34, flag3 ? ColDarkH : ColDark, 12)); } if (GUI.Button(val9, "SUBMIT REPORT", _footerBtn)) { SubmitBugReport(); } num8 += 42f; float num13 = 150f; float num14 = 112f; float num15 = num13 + num14 + 6f; float num16 = num6 + (num7 - num15) * 0.5f; GUI.Label(new Rect(num16, num8, num13, 30f), "Message me on Discord:", _ls); if (GUI.Button(new Rect(num16 + num13 + 6f, num8, num14, 30f), _discordContent, _discordBtn)) { GUIUtility.systemCopyBuffer = "eliteghg_"; ShowToast("Discord tag copied to clipboard!", error: false); } } private void DrawCircleGL(float cx, float cy, float r) { int num = 10; float num2 = MathF.PI * 2f / (float)num; for (int i = 0; i < num; i++) { float num3 = num2 * (float)i; float num4 = num2 * (float)(i + 1); float num5 = cx + Mathf.Cos(num3) * r; float num6 = cy + Mathf.Sin(num3) * r; float num7 = cx + Mathf.Cos(num4) * r; float num8 = cy + Mathf.Sin(num4) * r; GL.Vertex3(cx, cy, 0f); GL.Vertex3(num5, num6, 0f); GL.Vertex3(num7, num8, 0f); GL.Vertex3(cx, cy, 0f); } } private void DumpCensus() { //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown List list = SceneGOs(); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Census] begin objects=" + list.Count)); int num = 0; foreach (GameObject item in list) { try { if ((Object)(object)item == (Object)null || (Object)(object)item.transform.parent != (Object)null) { continue; } StringBuilder stringBuilder = new StringBuilder(256); stringBuilder.Append("[MS-Census] ").Append(((Object)item).name).Append(" ::"); Component[] components = item.GetComponents(); foreach (Component val in components) { if (!((Object)(object)val == (Object)null)) { stringBuilder.Append(' ').Append(((object)val).GetType().Name); } } ((BaseUnityPlugin)this).Logger.LogInfo((object)stringBuilder.ToString()); if (++num > 400) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"[MS-Census] ...truncated"); break; } foreach (Transform item2 in item.transform) { Transform val2 = item2; try { if ((Object)(object)val2 == (Object)null) { continue; } StringBuilder stringBuilder2 = new StringBuilder(256); stringBuilder2.Append("[MS-Census] + ").Append(((Object)((Component)val2).gameObject).name).Append(" ::"); components = ((Component)val2).gameObject.GetComponents(); foreach (Component val3 in components) { if (!((Object)(object)val3 == (Object)null)) { stringBuilder2.Append(' ').Append(((object)val3).GetType().Name); } } ((BaseUnityPlugin)this).Logger.LogInfo((object)stringBuilder2.ToString()); if (++num <= 2000) { continue; } break; } catch { } } if (num <= 2000) { continue; } ((BaseUnityPlugin)this).Logger.LogInfo((object)"[MS-Census] ...truncated"); break; } catch { } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"[MS-Census] end"); } private void DrawContent() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Invalid comparison between Unknown and I4 //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06b0: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_06bb: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_0756: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07d0: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_0af1: Unknown result type (might be due to invalid IL or missing references) //IL_0b10: Unknown result type (might be due to invalid IL or missing references) //IL_0b15: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) //IL_0867: Unknown result type (might be due to invalid IL or missing references) //IL_0860: Unknown result type (might be due to invalid IL or missing references) //IL_08a9: Unknown result type (might be due to invalid IL or missing references) //IL_08db: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_08f0: Unknown result type (might be due to invalid IL or missing references) //IL_0922: Unknown result type (might be due to invalid IL or missing references) //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_097c: Unknown result type (might be due to invalid IL or missing references) //IL_098a: Unknown result type (might be due to invalid IL or missing references) //IL_09a7: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginHorizontal(Array.Empty()); GUILayout.FlexibleSpace(); GUILayout.Label(BuildGrabText(), _grabS, Array.Empty()); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.Space(2f); GUILayout.BeginHorizontal((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }); GUILayout.Space(10f); GUILayout.Label("Monster Spawner v1.0.0", _ts, Array.Empty()); GUILayout.FlexibleSpace(); _footer.fontSize = 9; _footer.normal.textColor = new Color(1f, 1f, 1f, 0.4f); GUILayout.Label("[F4]", _footer, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(28f) }); GUILayout.Space(10f); _footer.fontSize = 10; _footer.normal.textColor = ColTxt; GUILayout.EndHorizontal(); GUILayout.Space(4f); GUILayout.BeginHorizontal((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(30f) }); GUILayout.Space(10f); Rect rect = GUILayoutUtility.GetRect(0f, 30f, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.Height(30f) }); searchInput = GUI.TextField(rect, searchInput, _searchField); if (string.IsNullOrEmpty(searchInput) && (int)Event.current.type == 7) { GUI.Label(rect, "Search...", _searchHint); } GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(6f); GUILayout.BeginHorizontal((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }); GUILayout.Space(10f); GUILayout.Label("Amount:", _ls, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); GUILayout.Space(5f); DrawSlider(GUILayoutUtility.GetRect(152f, 28f, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(152f), GUILayout.Height(28f) }), ref sliderVal, 1f, 50f); spawnAmount = Mathf.RoundToInt(sliderVal); GUILayout.Space(5f); if (spawnAmount != _lastAmt) { _amtStr = spawnAmount.ToString(); _lastAmt = spawnAmount; } string text = GUILayout.TextField(_amtStr, _amtField, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(38f), GUILayout.Height(22f) }); if (text != _amtStr) { _amtStr = text; if (int.TryParse(text, out var result)) { result = (spawnAmount = Mathf.Clamp(result, 1, 50)); sliderVal = result; _lastAmt = result; _amtStr = result.ToString(); } } GUILayout.Space(4f); GUILayout.FlexibleSpace(); if (GUILayout.Button("x1", _preset, Array.Empty())) { spawnAmount = 1; sliderVal = 1f; } GUILayout.Space(2f); if (GUILayout.Button("x5", _preset, Array.Empty())) { spawnAmount = 5; sliderVal = 5f; } GUILayout.Space(2f); if (GUILayout.Button("x10", _preset, Array.Empty())) { spawnAmount = 10; sliderVal = 10f; } GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(6f); CleanDead(); RefreshFiltered(); int count = _spawned.Count; int num = 0; for (int i = 0; i < filtered.Length; i++) { if (!filtered[i].unused) { num++; } } num *= spawnAmount; GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Space(10f); if (_confirmSpawnAll) { if (GUILayout.Button(_spawning ? ("SPAWNING (" + _spawnQueue.Count + ")...") : ("CONFIRM SPAWN? (" + num + ")"), _fBtn, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(28f), GUILayout.ExpandWidth(true) })) { if (!_spawning) { EnqueueSpawnAll(); } _confirmSpawnAll = false; } } else if (num > 0 && GUILayout.Button("SPAWN ALL (" + num + ")", _fBtn, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(28f), GUILayout.ExpandWidth(true) })) { _confirmSpawnAll = true; _confirmTimerSpawn = 4f; } GUILayout.Space(6f); if (_confirmKillAll) { if (GUILayout.Button("CONFIRM KILL?", _killBtn, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(28f), GUILayout.ExpandWidth(true) })) { KillAll(); _confirmKillAll = false; } } else if (GUILayout.Button("KILL ALL (" + count + ")", _killBtn, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(28f), GUILayout.ExpandWidth(true) })) { _confirmKillAll = true; _confirmTimerKill = 4f; } GUILayout.Space(6f); if (GUILayout.Button(_showKillPanel ? "▲" : "▼", _killArrow, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(28f), GUILayout.Width(28f) })) { _showKillPanel = !_showKillPanel; } GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(4f); if (_showKillPanel) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Space(10f); float num2 = ((Rect)(ref _wRect)).width - 20f; float num3 = 22f; float num4 = 24f; int num5 = 6; float num6 = (float)Mathf.Min(Mathf.Max(count, 1), num5) * num3; float num7 = num4 + num6 + 8f; GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num2), GUILayout.Height(num7) }); Rect rect2 = GUILayoutUtility.GetRect(num2, num7); GUI.DrawTexture(rect2, (Texture)(object)RoundedRect((int)num2, (int)num7, PanelBg, 12)); DrawBorder(rect2, ColBorderD); GUI.Label(new Rect(((Rect)(ref rect2)).x + 8f, ((Rect)(ref rect2)).y + 1f, num2 - 16f, num4 - 2f), "Spawned (" + count + ")", _secS); int num8 = -1; if (count == 0) { GUI.Label(new Rect(((Rect)(ref rect2)).x + 8f, ((Rect)(ref rect2)).y + num4 + 4f, num2 - 16f, num3), "No monsters tracked", _ls); } else { Rect val = default(Rect); ((Rect)(ref val))..ctor(((Rect)(ref rect2)).x + 3f, ((Rect)(ref rect2)).y + num4 + 2f, num2 - 6f, num6 + 2f); float num9 = (float)count * num3; bool flag = num9 > ((Rect)(ref val)).height; float num10 = ((Rect)(ref val)).width - (float)(flag ? 16 : 0); _killScroll = GUI.BeginScrollView(val, _killScroll, new Rect(0f, 0f, num10, num9)); int num11 = 0; for (int j = 0; j < _spawned.Count; j++) { if (num11 >= count) { break; } SpawnedEntry e = _spawned[j]; if (!((Object)(object)e.go == (Object)null) && e.go.activeInHierarchy) { float num12 = (float)num11 * num3; GUI.DrawTexture(new Rect(0f, num12, num10, num3 - 1f), (Texture)(object)RoundedRect((int)num10, (int)(num3 - 1f), (num11 % 2 == 0) ? RowEven : RowOdd, 5)); float num13 = num3 - 6f; float num14 = num12 + (num3 - 1f - num13) * 0.5f; float num15 = num10 - 34f; if (GUI.Button(new Rect(num15, num14, 34f, num13), "Kill", _killCountStyle)) { num8 = j; } float num16 = 52f; float num17 = num15 - 4f - num16; GUI.DrawTexture(new Rect(num17, num14, num16, num13), (Texture)(object)RoundedRect((int)num16, (int)num13, e.fromMod ? PillModBg : PillVanBg, 4)); _pill.normal.textColor = (e.fromMod ? PillModFg : PillVanFg); GUI.Label(new Rect(num17, num14, num16, num13), e.fromMod ? "MOD" : "VANILLA", _pill); int num18 = DangerFor(e); float num19 = 30f; float num20 = num17 - 4f - num19; GUI.DrawTexture(new Rect(num20, num14, num19, num13), (Texture)(object)RoundedRect((int)num19, (int)num13, DangerPillBg(num18), 4)); _pill.normal.textColor = DangerPillFg(num18); GUI.Label(new Rect(num20, num14, num19, num13), (num18 >= 0) ? ("L" + num18) : "L?", _pill); GUI.Label(new Rect(4f, num14, num20 - 8f, num13), e.displayName, _ls); num11++; } } GUI.EndScrollView(); } if (num8 >= 0) { KillOne(num8); } GUILayout.EndVertical(); GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(4f); } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Space(10f); if (GUILayout.Button(showLegend ? "▼ Hide Danger Guide" : "▶ Show Danger Guide", _legendBtn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) })) { showLegend = !showLegend; } GUILayout.Space(10f); GUILayout.EndHorizontal(); if (showLegend) { DrawLegend(); } GUILayout.Space(2f); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Space(10f); _scroll = GUILayout.BeginScrollView(_scroll, false, false, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); if (favorites.Count > 0) { List list = PoolList(); for (int k = 0; k < allMonsters.Length; k++) { if (favorites.Contains(allMonsters[k].id)) { list.Add(allMonsters[k]); } } if (list.Count > 0) { DrawSection("Favorites", list); } PoolReturn(list); } if (recentSpawns.Count > 0) { List list2 = PoolList(); int num21 = recentSpawns.Count - 1; while (num21 >= 0 && list2.Count < 8) { Monster item = FindById(recentSpawns[num21]); if (item.id != null) { list2.Add(item); } num21--; } if (list2.Count > 0) { DrawSection("Recent", list2); } PoolReturn(list2); } for (int l = 0; l <= 10; l++) { List list3 = null; for (int m = 0; m < filtered.Length; m++) { if (filtered[m].danger == l && !filtered[m].unused) { if (list3 == null) { list3 = PoolList(); } list3.Add(filtered[m]); } } if (list3 != null) { if (list3.Count > 0) { DrawSection("L" + l + " " + DangerNames[l], list3); } PoolReturn(list3); } } List list4 = null; for (int n = 0; n < filtered.Length; n++) { if (filtered[n].unused) { if (list4 == null) { list4 = PoolList(); } list4.Add(filtered[n]); } } if (list4 != null) { if (list4.Count > 0) { DrawSection("??? Unused Entities", list4); } PoolReturn(list4); } GUILayout.EndScrollView(); GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Space(10f); if (GUILayout.Button("Report a Bug", _footerBtn, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.Height(24f) })) { _showBugPopup = true; _bugError = ""; } GUILayout.Space(10f); GUILayout.EndHorizontal(); GUILayout.Space(2f); } private void DrawSlider(Rect area, ref float value, float min, float max) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Invalid comparison between Unknown and I4 //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Invalid comparison between Unknown and I4 //IL_00a0: 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_024f: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Invalid comparison between Unknown and I4 //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Invalid comparison between Unknown and I4 //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019a: 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_0183: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_026b: 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_027d: 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_02b5: Unknown result type (might be due to invalid IL or missing references) float num = ((Rect)(ref area)).x + (((Rect)(ref area)).width - 140f) * 0.5f; float num2 = ((Rect)(ref area)).y + (((Rect)(ref area)).height - 6f) * 0.5f; Rect val = default(Rect); ((Rect)(ref val))..ctor(num, num2, 140f, 6f); float num3 = (value - min) / (max - min); Rect val2 = default(Rect); ((Rect)(ref val2))..ctor(((Rect)(ref val)).x + num3 * 140f - 7f, ((Rect)(ref val)).y + -4f, 14f, 14f); Event current = Event.current; if ((int)current.type == 7) { bool flag = ((Rect)(ref val)).Contains(current.mousePosition); GUI.DrawTexture(new Rect(((Rect)(ref val)).x - 10f, ((Rect)(ref val)).y - 9f, 160f, 24f), (Texture)(object)RoundedRect(160, 24, new Color(0.15f, 0.15f, 0.15f, flag ? 0.12f : 0.06f), 6)); GUI.DrawTexture(val, (Texture)(object)RoundedRect(140, 6, new Color(0.1f, 0.1f, 0.1f), 3)); if (num3 > 0.01f) { GUI.DrawTexture(new Rect(((Rect)(ref val)).x, ((Rect)(ref val)).y, Mathf.Max(num3 * 140f, 6f), 6f), (Texture)(object)RoundedRect(Mathf.Max((int)(num3 * 140f), 6), 6, new Color(0.35f, 0.35f, 0.35f), 3)); } GUI.DrawTexture(val2, (Texture)(object)RoundedRect(14, 14, Color.white, 3)); } if ((int)current.type == 1 && current.button == 0 && _dragType == 2) { _dragType = 0; } if (_dragType == 2 && (int)current.type == 3 && current.button == 0) { value = Mathf.Round(Mathf.Lerp(min, max, Mathf.Clamp01((current.mousePosition.x - ((Rect)(ref _dragTrack)).x) / 140f))); current.Use(); } Rect val3 = default(Rect); ((Rect)(ref val3))..ctor(((Rect)(ref val)).x - 14f, ((Rect)(ref val)).y - 10f, 168f, 26f); if ((int)current.type == 0 && current.button == 0 && _dragType == 0 && ((Rect)(ref val3)).Contains(current.mousePosition)) { value = Mathf.Round(Mathf.Lerp(min, max, Mathf.Clamp01((current.mousePosition.x - ((Rect)(ref val)).x) / 140f))); current.Use(); _dragType = 2; _dragTrack = val; } if ((int)current.type == 6 && ((Rect)(ref val)).Contains(current.mousePosition) && _dragType == 0) { value = Mathf.Round(Mathf.Clamp(value - current.delta.y * 2.5f, min, max)); current.Use(); } } private void DrawLegend() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) GUILayout.Space(2f); float num = ((Rect)(ref _wRect)).width - 20f; float num2 = 20f; float num3 = 11f * num2 + 44f; Rect rect = GUILayoutUtility.GetRect(num, num3); GUI.DrawTexture(rect, (Texture)(object)RoundedRect((int)num, (int)num3, ColDark, 12)); DrawBorder(rect, ColBorderD); GUI.Label(new Rect(((Rect)(ref rect)).x + 10f, ((Rect)(ref rect)).y + 6f, ((Rect)(ref rect)).width, 16f), "Danger Level Guide", _secS); for (int i = 0; i < 11; i++) { float num4 = ((Rect)(ref rect)).y + 26f + (float)i * num2; GUI.DrawTexture(new Rect(((Rect)(ref rect)).x + 12f, num4 + 4f, 10f, 10f), (Texture)(object)MkT((Color)((i == 0) ? new Color(0.3f, 0.32f, 0.36f) : DangerColors[i - 1]))); GUI.Label(new Rect(((Rect)(ref rect)).x + 26f, num4 + 2f, 20f, 16f), "L" + i, _lvStyles[i]); GUI.Label(new Rect(((Rect)(ref rect)).x + 46f, num4 + 2f, ((Rect)(ref rect)).width - 52f, 16f), DangerNames[i], _dvStyles[i]); } } private void DrawSection(string title, List monsters) { //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) bool flag = !_closedSections.Contains(title); float num = ((Rect)(ref _wRect)).width - 20f - 18f; if (GUILayout.Button((flag ? "▼ " : "▶ ") + title + " (" + monsters.Count + ")", _catBtn, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(num) })) { if (flag) { _closedSections.Add(title); } else { _closedSections.Remove(title); } } if (!flag) { return; } GUILayout.Space(2f); float num2 = num - 88f; for (int i = 0; i < monsters.Count; i++) { Monster monster = monsters[i]; GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Space(10f); bool flag2 = favorites.Contains(monster.id); if (GUILayout.Button(flag2 ? "★" : "☆", flag2 ? _favOn : _favOff, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(26f), GUILayout.Height(26f) })) { if (flag2) { favorites.Remove(monster.id); } else { favorites.Add(monster.id); } SaveFavorites(); } GUILayout.Space(8f); string text = monster.name + ((!string.IsNullOrEmpty(monster.alias)) ? (" (" + monster.alias + ")") : "") + ((spawnAmount > 1) ? (" x" + spawnAmount) : ""); int spawnedCount = GetSpawnedCount(monster.id); if (spawnedCount > 0) { text = text + " [" + spawnedCount + "]"; } _gcBuf.text = text; float num3 = Mathf.Clamp(_monBtn.CalcSize(_gcBuf).x, 60f, num2); if (monster.unused) { GUI.enabled = false; GUILayout.Button(text, _monBtn, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(26f), GUILayout.Width(num3) }); GUI.enabled = true; GUILayout.Space(4f); Rect rect = GUILayoutUtility.GetRect(30f, 26f, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(30f), GUILayout.Height(26f) }); Rect val = new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + 5f, 30f, 16f); GUI.DrawTexture(val, (Texture)(object)RoundedRect(30, 16, new Color(0.35f, 0.22f, 0.22f), 4)); _pill.normal.textColor = new Color(0.85f, 0.5f, 0.5f); GUI.Label(val, "N/A", _pill); } else { if (GUILayout.Button(text, _monBtn, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Height(26f), GUILayout.Width(num3) })) { for (int j = 0; j < spawnAmount; j++) { Spawn(monster.id); } } GUILayout.Space(4f); Rect rect2 = GUILayoutUtility.GetRect(30f, 26f, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(30f), GUILayout.Height(26f) }); Rect val2 = new Rect(((Rect)(ref rect2)).x, ((Rect)(ref rect2)).y + 5f, 30f, 16f); GUI.DrawTexture(val2, (Texture)(object)RoundedRect(30, 16, DangerPillBg(monster.danger), 4)); _pill.normal.textColor = DangerPillFg(monster.danger); GUI.Label(val2, "L" + monster.danger, _pill); } GUILayout.Space(10f); GUILayout.EndHorizontal(); if (i < monsters.Count - 1) { GUILayout.Space(4f); } } GUILayout.Space(4f); } private string BuildGrabText() { if (_grabRich != null) { return _grabRich; } StringBuilder stringBuilder = new StringBuilder(_grabRaw.Length * 12); for (int i = 0; i < _grabRaw.Length; i++) { float num = ((float)i + 1f) / 5f; float num2 = (float)(_grabRaw.Length - i) / 5f; float num3 = Mathf.Clamp01((num < num2) ? num : num2); stringBuilder.Append("") .Append(_grabRaw[i]) .Append(""); } _grabRich = stringBuilder.ToString(); return _grabRich; } private void RefreshFiltered() { string text = (string.IsNullOrEmpty(searchInput) ? "" : searchInput.ToLowerInvariant()); if (text == cachedSearch) { return; } cachedSearch = text; if (text == "") { filtered = allMonsters; return; } List list = PoolList(); for (int i = 0; i < allMonsters.Length; i++) { if (allMonsters[i].searchKey.Contains(text)) { list.Add(allMonsters[i]); } } filtered = ((list.Count == allMonsters.Length) ? allMonsters : list.ToArray()); PoolReturn(list); } private Monster FindById(string id) { for (int i = 0; i < allMonsters.Length; i++) { if (allMonsters[i].id == id) { return allMonsters[i]; } } return default(Monster); } private int DangerFor(SpawnedEntry e) { Monster monster = FindById(e.typeId); if (monster.id != null && monster.danger >= 0 && monster.danger <= 10) { return monster.danger; } if (e.fromMod) { return -1; } return VanillaDanger(e.displayName); } private int VanillaDanger(string displayName) { if (string.IsNullOrEmpty(displayName)) { return -1; } string text = FlatName(displayName); if (text.Length == 0) { return -1; } Monster[] array = allMonsters; for (int i = 0; i < array.Length; i++) { Monster monster = array[i]; if (StrHas(displayName, monster.id) || StrHas(displayName, monster.name)) { return monster.danger; } string text2 = FlatName(monster.id); if (text2.Length >= 5 && text.Contains(text2)) { return monster.danger; } text2 = FlatName(monster.name); if (text2.Length >= 5 && text.Contains(text2)) { return monster.danger; } if (string.IsNullOrEmpty(monster.alias)) { continue; } string[] array2 = monster.alias.Split('|'); foreach (string text3 in array2) { if (StrHas(displayName, text3.Trim())) { return monster.danger; } } } return -1; } private static Color DangerPillBg(int danger) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (danger < 1 || danger > 10) { return new Color(0.3f, 0.32f, 0.36f); } Color val = DangerColors[danger - 1]; return new Color(val.r * 0.38f, val.g * 0.38f, val.b * 0.38f); } private static Color DangerPillFg(int danger) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return Color.white; } private void Spawn(string id) { if (!PhotonNetwork.IsMasterClient) { ShowToast("Only the host can use the spawner!", error: true); return; } Monster monster = FindById(id); if (monster.unused) { ShowToast(id + " has no prefab in the game — cannot spawn (cut content)", error: true); return; } try { EnsureSnapFrame(); MonsterSpawner.SpawnMonster(id); recentSpawns.Remove(id); recentSpawns.Add(id); if (recentSpawns.Count > 20) { recentSpawns.RemoveAt(0); } QueueCapture(id, (monster.id != null) ? monster.name : id); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("[MonsterSpawn] " + id + ": " + ex.Message)); ShowToast("✘ Failed to spawn: " + id, error: true); } } private void EnqueueSpawnAll() { _spawnQueue.Clear(); for (int i = 0; i < filtered.Length; i++) { if (_spawnQueue.Count >= 120) { break; } if (filtered[i].unused) { continue; } for (int j = 0; j < spawnAmount; j++) { if (_spawnQueue.Count >= 120) { break; } _spawnQueue.Add(filtered[i].id); } } if (filtered.Length * spawnAmount > 120) { ShowToast("Spawn queue capped at " + 120 + " for performance", error: true); } if (!_spawning) { ((MonoBehaviour)this).StartCoroutine(SpawnBatchRoutine()); } } private IEnumerator SpawnBatchRoutine() { _spawning = true; int total = _spawnQueue.Count; int done = 0; while (_spawnQueue.Count > 0) { if ((Object)(object)this == (Object)null || (Object)(object)((Component)this).gameObject == (Object)null) { yield break; } int num = Mathf.Min(12, _spawnQueue.Count); for (int i = 0; i < num; i++) { string id = _spawnQueue[0]; _spawnQueue.RemoveAt(0); Spawn(id); done++; } yield return null; } _spawning = false; Rep("spawnbatch " + done + "/" + total); } private List SceneGOs() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) if (_sceneCacheFrame != Time.frameCount) { _sceneCacheFrame = Time.frameCount; _sceneCache.Clear(); GameObject[] array = Resources.FindObjectsOfTypeAll(); foreach (GameObject val in array) { if ((Object)(object)val != (Object)null) { Scene scene = val.scene; if (((Scene)(ref scene)).isLoaded) { _sceneCache.Add(val); } } } } return _sceneCache; } private static bool IsBotBrain(string tn) { if (tn.StartsWith("Bot_") && tn != "Bot_Nav_Navmesh" && tn != "Bot_Nav_Flying" && tn != "Bot_SimpleMovement" && tn != "Bot_SimpleFlying" && tn != "Bot_LookY") { return tn != "Bot_RagdollCharacter"; } return false; } private static bool HasBotSelf(GameObject go) { Component[] components = go.GetComponents(); foreach (Component val in components) { if (!((Object)(object)val == (Object)null) && IsBotBrain(((object)val).GetType().Name)) { return true; } } return false; } private static bool HasPlayerType(GameObject go) { Component[] components = go.GetComponents(); foreach (Component val in components) { if (!((Object)(object)val == (Object)null) && IsPlayerComp(((object)val).GetType().Name)) { return true; } } return false; } private static bool IsPlayerComp(string tn) { if (!tn.Contains("Player") && !(tn == "FirstPersonController")) { return tn == "SFX_Player"; } return true; } private static bool IsUnderPlayer(GameObject go) { Transform val = go.transform; for (int i = 0; i < 20; i++) { if (!((Object)(object)val != (Object)null)) { break; } val = val.parent; if ((Object)(object)val == (Object)null) { break; } GameObject gameObject = ((Component)val).gameObject; if (HasPlayerType(gameObject) && !HasMonsterComp(gameObject)) { return true; } } return false; } private bool IsMonsterLike(GameObject go) { if ((Object)(object)go == (Object)null) { return false; } bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; bool flag5 = false; bool flag6 = false; bool flag7 = false; bool flag8 = false; bool flag9 = false; Component[] components = go.GetComponents(); foreach (Component val in components) { if ((Object)(object)val == (Object)null) { continue; } string name = ((object)val).GetType().Name; if (IsBotBrain(name)) { flag = true; } else { if (name.StartsWith("Attack_") || name.StartsWith("Attacks_")) { flag2 = true; } if (IsPlayerComp(name)) { flag7 = true; } } if (!flag3 && (name.IndexOf("Monster", StringComparison.OrdinalIgnoreCase) >= 0 || name.IndexOf("Enemy", StringComparison.OrdinalIgnoreCase) >= 0 || name.IndexOf("Creature", StringComparison.OrdinalIgnoreCase) >= 0)) { flag3 = true; } if (!flag4 && (name.IndexOf("Spawner", StringComparison.OrdinalIgnoreCase) >= 0 || name.IndexOf("Manager", StringComparison.OrdinalIgnoreCase) >= 0 || name.IndexOf("Item", StringComparison.OrdinalIgnoreCase) >= 0 || name.IndexOf("Trigger", StringComparison.OrdinalIgnoreCase) >= 0 || name.IndexOf("Zone", StringComparison.OrdinalIgnoreCase) >= 0 || name.IndexOf("Volume", StringComparison.OrdinalIgnoreCase) >= 0)) { flag4 = true; } if (!flag9 && IsMonsterCompStr(name)) { flag9 = true; } if (!flag8 && IsItemSubstr(name)) { flag8 = true; } switch (name) { case "PhotonView": case "Rigidbody": case "Rigidbody2D": case "Animator": case "Animation": case "NavMeshAgent": case "CharacterController": flag5 = true; switch (name) { case "Animator": case "Animation": case "NavMeshAgent": case "CharacterController": flag6 = true; break; } break; } } if (flag7 && !flag && !flag9) { return false; } if (!flag && flag8) { return false; } bool flag10 = flag || (flag2 && (flag6 || HasMonsterKeyName(go))); if (flag10 && IsProjectileName(((Object)go).name)) { flag10 = false; } if (!flag10 && !(flag3 && !flag4 && flag5)) { return NamedMonsterLike(go); } return true; } private static bool HasItemComp(GameObject go) { Component[] components = go.GetComponents(); foreach (Component val in components) { if (!((Object)(object)val == (Object)null) && IsItemSubstr(((object)val).GetType().Name)) { return true; } } return false; } private static bool IsItemSubstr(string tn) { if (tn.IndexOf("Item", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("Pick", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("Hold", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("Carry", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("Equip", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("Inventory", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("Drop", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("Throw", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("Usable", StringComparison.OrdinalIgnoreCase) < 0) { return tn.IndexOf("Grabb", StringComparison.OrdinalIgnoreCase) >= 0; } return true; } private static bool IsProjectileName(string n) { if (string.IsNullOrEmpty(n)) { return false; } string text = n.ToLowerInvariant(); if (!text.Contains("projectile") && !text.Contains("bullet") && !text.Contains("pellet") && !text.Contains("arrow") && !text.Contains("rocket") && !text.Contains("grenade") && !text.Contains("shrapnel") && !text.Contains("explosion") && !text.Contains("blast") && !text.Contains("debris") && !text.Contains("thrown") && !text.Contains("dropped") && !text.Contains("ammo")) { return text.Contains("shell"); } return true; } private static bool HasActor(GameObject go) { Component[] components = go.GetComponents(); foreach (Component val in components) { if (!((Object)(object)val == (Object)null)) { switch (((object)val).GetType().Name) { case "PhotonView": case "Rigidbody": case "Rigidbody2D": case "Animator": case "NavMeshAgent": case "CharacterController": return true; } } } return false; } private static string FlatName(string n) { if (n == null) { return ""; } StringBuilder stringBuilder = new StringBuilder(n.Length); string text = n.ToLowerInvariant(); foreach (char c in text) { if (c != ' ' && c != '_' && c != '-' && c != '(' && c != ')') { stringBuilder.Append(c); } } return stringBuilder.ToString().Replace("clone", ""); } private static bool IsNameSep(char ch) { if (ch != ' ' && ch != '_' && ch != '-' && ch != '(') { return ch == ')'; } return true; } private static bool AffixMatch(string goName, string key) { if (string.IsNullOrEmpty(goName) || string.IsNullOrEmpty(key)) { return false; } string text = goName.ToLowerInvariant(); int startIndex = 0; while ((startIndex = text.IndexOf(key, startIndex, StringComparison.Ordinal)) >= 0) { bool num = startIndex == 0 || IsNameSep(goName[startIndex - 1]) || (startIndex < goName.Length && char.IsUpper(goName[startIndex]) && (char.IsLower(goName[startIndex - 1]) || char.IsDigit(goName[startIndex - 1]))); int num2 = startIndex + key.Length; bool flag = num2 >= goName.Length || IsNameSep(goName[num2]) || (num2 < goName.Length && char.IsLower(goName[num2 - 1]) && char.IsUpper(goName[num2])); if (num && flag) { return true; } startIndex++; } return false; } private void BuildMonsterKeys() { _monsterKeys.Clear(); Monster[] array = allMonsters; for (int i = 0; i < array.Length; i++) { Monster monster = array[i]; AddMonsterKey(monster.id); AddMonsterKey(monster.name); if (!string.IsNullOrEmpty(monster.alias)) { string[] array2 = monster.alias.Split('|'); foreach (string text in array2) { AddMonsterKey(text.Trim()); } } } } private void AddMonsterKey(string k) { if (!string.IsNullOrEmpty(k)) { string text = FlatName(k); if (text.Length > 0 && !_monsterKeys.Contains(text)) { _monsterKeys.Add(text); } } } private bool NamedMonsterLike(GameObject go) { if ((Object)(object)go == (Object)null || !HasMonsterKeyName(go)) { return false; } if (HasItemComp(go)) { return false; } if (!HasMonsterActor(go)) { return HasBotSelf(go); } return true; } private static bool HasMonsterActor(GameObject go) { Component[] components = go.GetComponents(); foreach (Component val in components) { if (!((Object)(object)val == (Object)null)) { switch (((object)val).GetType().Name) { case "Animator": case "Animation": case "NavMeshAgent": case "CharacterController": return true; } } } return false; } private bool HasMonsterKeyName(GameObject go) { if ((Object)(object)go == (Object)null || _monsterKeys.Count == 0) { return false; } string name = ((Object)go).name; if (string.IsNullOrEmpty(name)) { return false; } string text = name.ToLowerInvariant(); if (text.Contains("manager") || text.Contains("handler") || text.Contains("zone") || text.Contains("trigger") || text.Contains("volume") || text.Contains("spawnpoint") || text.Contains("spawn point")) { return false; } string text2 = FlatName(name); if (text2.Length == 0) { return false; } for (int i = 0; i < _monsterKeys.Count; i++) { string text3 = _monsterKeys[i]; if (text3.Length >= 5) { if (text2.Contains(text3)) { return true; } } else if (AffixMatch(name, text3)) { return true; } } return false; } private static bool IsMonsterCompStr(string tn) { if (tn.IndexOf("Monster", StringComparison.OrdinalIgnoreCase) < 0 && tn.IndexOf("BotSounds", StringComparison.OrdinalIgnoreCase) < 0) { return tn.IndexOf("BudgetCost", StringComparison.OrdinalIgnoreCase) >= 0; } return true; } private static bool HasMonsterComp(GameObject go) { Component[] components = go.GetComponents(); foreach (Component val in components) { if (!((Object)(object)val == (Object)null) && IsMonsterCompStr(((object)val).GetType().Name)) { return true; } } return false; } private GameObject MonsterRoot(GameObject go) { GameObject val = go; for (int i = 0; i < 10; i++) { if (HasItemComp(val) || (HasPlayerType(val) && !HasMonsterComp(val))) { return null; } Transform parent = val.transform.parent; if ((Object)(object)parent == (Object)null) { break; } GameObject gameObject = ((Component)parent).gameObject; if ((Object)(object)gameObject.GetComponent() != (Object)null) { val = gameObject; break; } if (HasBotSelf(gameObject)) { val = gameObject; continue; } if (parent.childCount > 1) { break; } val = gameObject; } if (HasPlayerType(val) && !HasMonsterComp(val)) { return null; } return val; } private void EnsureSnapFrame() { if (_snapFrame == Time.frameCount) { return; } _snapFrame = Time.frameCount; _snapIds.Clear(); _snapInactiveIds.Clear(); foreach (GameObject item in SceneGOs()) { try { if (!((Object)(object)item == (Object)null)) { int instanceID = ((Object)item).GetInstanceID(); _snapIds.Add(instanceID); if (!item.activeInHierarchy) { _snapInactiveIds.Add(instanceID); } } } catch { } } _snapShared = new HashSet(_snapIds); _snapInactiveShared = new HashSet(_snapInactiveIds); } private void QueueCapture(string id, string name) { EnsureSnapFrame(); _pendingCaptures.Add(new PendingCapture { id = id, name = name, startFrame = Time.frameCount, snap = _snapShared, snapOff = _snapInactiveShared }); if (!_capturing) { ((MonoBehaviour)this).StartCoroutine(CaptureRoutine()); } } private IEnumerator CaptureRoutine() { _capturing = true; while (_pendingCaptures.Count > 0) { yield return null; if ((Object)(object)this == (Object)null || (Object)(object)((Component)this).gameObject == (Object)null) { break; } try { ProcessCaptures(); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("[MS-Capture] " + ex.Message)); } } _capturing = false; } private static bool StrHas(string hay, string needle) { if (!string.IsNullOrEmpty(hay) && !string.IsNullOrEmpty(needle)) { return hay.IndexOf(needle, StringComparison.OrdinalIgnoreCase) >= 0; } return false; } private static string CleanGoName(string n) { if (n == null) { return ""; } return n.Replace("(Clone)", "").Trim(); } private static bool SpawnNameMatch(string goName, string id, string name) { string text = CleanGoName(goName); if (text.Length == 0) { return false; } if (!string.IsNullOrEmpty(id)) { if (text.Equals(id, StringComparison.OrdinalIgnoreCase)) { return true; } string text2 = FlatName(id); if (text2.Length > 0 && FlatName(text).Equals(text2)) { return true; } if (AffixMatch(text, text2)) { return true; } } if (!string.IsNullOrEmpty(name)) { if (text.Equals(name, StringComparison.OrdinalIgnoreCase)) { return true; } string text3 = FlatName(name); if (text3.Length > 0 && FlatName(text).Equals(text3)) { return true; } if (AffixMatch(text, text3)) { return true; } } return false; } private void ProcessCaptures() { _freshBuf.Clear(); foreach (GameObject item in SceneGOs()) { try { if (!((Object)(object)item == (Object)null) && !((Object)(object)item.GetComponent() != (Object)null) && item.activeInHierarchy) { _freshBuf.Add(item); } } catch { } } for (int i = 0; i < _pendingCaptures.Count; i++) { PendingCapture pc = _pendingCaptures[i]; int num = Time.frameCount - pc.startFrame; GameObject val = null; GameObject val2 = null; GameObject val3 = null; for (int j = 0; j < _freshBuf.Count; j++) { GameObject val4 = _freshBuf[j]; GameObject val5 = null; try { if ((Object)(object)val4 == (Object)null || (Object)(object)val4.GetComponent() != (Object)null) { continue; } int instanceID = ((Object)val4).GetInstanceID(); int num2; int num3; if (pc.snap != null) { num2 = ((!pc.snap.Contains(instanceID)) ? 1 : 0); if (num2 == 0 && pc.snapOff != null) { num3 = (pc.snapOff.Contains(instanceID) ? 1 : 0); goto IL_0110; } } else { num2 = 1; } num3 = 0; goto IL_0110; IL_0110: bool flag = (byte)num3 != 0; if ((num2 != 0 || flag) && IsMonsterLike(val4)) { val5 = MonsterRoot(val4); if (!((Object)(object)val5 == (Object)null) && !((Object)(object)val5.GetComponent() != (Object)null)) { goto IL_0156; } } } catch { } continue; IL_0156: if (SpawnNameMatch(((Object)val5).name, pc.id, pc.name) || SpawnNameMatch(((Object)val4).name, pc.id, pc.name)) { val = val5; break; } if ((Object)(object)val2 == (Object)null && (HasMonsterKeyName(val4) || HasMonsterKeyName(val5))) { val2 = val5; } if ((Object)(object)val3 == (Object)null) { val3 = val5; } } if ((Object)(object)val != (Object)null) { ClaimCapture(pc, val, null); _pendingCaptures.RemoveAt(i); i--; } else if (num >= 30 && (Object)(object)val2 != (Object)null) { ClaimCapture(pc, val2, null); _pendingCaptures.RemoveAt(i); i--; } else if (num >= 90 && (Object)(object)val3 != (Object)null) { ClaimCapture(pc, val3, "tier1c-any"); _pendingCaptures.RemoveAt(i); i--; } else { if (num < 150) { continue; } GameObject val6 = null; for (int num4 = _freshBuf.Count - 1; num4 >= 0; num4--) { GameObject val7 = _freshBuf[num4]; try { int num5; int num6; if (!((Object)(object)val7 == (Object)null) && !((Object)(object)val7.GetComponent() != (Object)null)) { int instanceID2 = ((Object)val7).GetInstanceID(); if (pc.snap != null) { num5 = ((!pc.snap.Contains(instanceID2)) ? 1 : 0); if (num5 == 0 && pc.snapOff != null) { num6 = (pc.snapOff.Contains(instanceID2) ? 1 : 0); goto IL_02f2; } } else { num5 = 1; } num6 = 0; goto IL_02f2; } goto end_IL_0295; IL_02f2: bool flag2 = (byte)num6 != 0; if ((num5 != 0 || flag2) && !HasItemComp(val7)) { GameObject val8 = MonsterRoot(val7); if (!((Object)(object)val8 == (Object)null) && !((Object)(object)val8.GetComponent() != (Object)null) && !HasItemComp(val8) && (HasMonsterKeyName(val7) || HasMonsterKeyName(val8)) && (HasActor(val7) || HasActor(val8))) { val6 = val8; break; } } end_IL_0295:; } catch { } } if ((Object)(object)val6 != (Object)null) { ClaimCapture(pc, val6, "tier2-newness"); } else { MissCapture(pc); } _pendingCaptures.RemoveAt(i); i--; } } } private void ClaimCapture(PendingCapture pc, GameObject root, string how) { int instanceID = ((Object)root).GetInstanceID(); for (int i = 0; i < _spawned.Count; i++) { if ((Object)(object)_spawned[i].go != (Object)null && ((Object)_spawned[i].go).GetInstanceID() == instanceID) { if (SpawnNameMatch(((Object)root).name, pc.id, pc.name)) { SpawnedEntry value = _spawned[i]; value.typeId = pc.id; value.displayName = pc.name; value.fromMod = true; value.id = instanceID; _spawned[i] = value; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Capture] id=" + pc.id + " already tracked (" + ((Object)root).name + ")")); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Capture] id=" + pc.id + " bumped vanilla (" + ((Object)root).name + ") — left as vanilla")); } ShowToast("✔ Spawned " + pc.name, error: false); return; } } try { root.AddComponent(); } catch { } _spawned.Add(new SpawnedEntry { go = root, id = instanceID, typeId = pc.id, displayName = pc.name, fromMod = true }); ShowToast("✔ Spawned " + pc.name, error: false); if (how == null && pc.snap != null && pc.snap.Contains(instanceID) && pc.snapOff != null && pc.snapOff.Contains(instanceID)) { how = "woke"; } if (!string.IsNullOrEmpty(how)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Capture] id=" + pc.id + " claimed=" + ((Object)root).name + " (" + how + ")")); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Capture] id=" + pc.id + " claimed=" + ((Object)root).name)); } } private void MissCapture(PendingCapture pc) { ShowToast("✘ Couldn't spawn: " + pc.id, error: true); Rep("capture MISS id=" + pc.id + " scene=" + SceneGOs().Count); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Capture] MISS id=" + pc.id + " scene=" + SceneGOs().Count)); } private void ScanVanilla() { _vanillaTimer -= Time.unscaledDeltaTime; if (_vanillaTimer > 0f) { return; } _vanillaTimer = 1f; _modIds.Clear(); for (int i = 0; i < _spawned.Count; i++) { if ((Object)(object)_spawned[i].go != (Object)null) { _modIds.Add(((Object)_spawned[i].go).GetInstanceID()); } } int num = 0; foreach (GameObject item in SceneGOs()) { try { if ((Object)(object)item == (Object)null || (Object)(object)item.GetComponent() != (Object)null || !item.activeInHierarchy || _modIds.Contains(((Object)item).GetInstanceID()) || !IsMonsterLike(item)) { continue; } num++; GameObject val = MonsterRoot(item); if (!((Object)(object)val == (Object)null)) { int instanceID = ((Object)val).GetInstanceID(); if (!_modIds.Contains(instanceID) && !_vanillaSeen.Contains(instanceID)) { _vanillaSeen.Add(instanceID); _spawned.Add(new SpawnedEntry { go = val, id = instanceID, typeId = "", displayName = ((Object)val).name.Replace("(Clone)", "").Trim(), fromMod = false }); } } } catch { } } _logTimer -= 1f; if (_logTimer <= 0f) { _logTimer = 5f; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Scan] scene=" + SceneGOs().Count + " matched=" + num + " tracked=" + _spawned.Count + " seen=" + _vanillaSeen.Count)); } } private int GetSpawnedCount(string id) { int num = 0; for (int i = 0; i < _spawned.Count; i++) { if (_spawned[i].typeId == id && (Object)(object)_spawned[i].go != (Object)null) { num++; } } return num; } private void DestroyGO(GameObject go) { if ((Object)(object)go == (Object)null) { return; } string name = ((Object)go).name; try { go.SetActive(false); } catch { } HashSet hashSet = new HashSet(); try { Component[] componentsInChildren = go.GetComponentsInChildren(); foreach (Component val in componentsInChildren) { if ((Object)(object)val != (Object)null && IsBotBrain(((object)val).GetType().Name)) { hashSet.Add(((Object)val.gameObject).GetInstanceID()); } } } catch { } try { Component[] componentsInChildren = go.GetComponentsInChildren(); foreach (Component val2 in componentsInChildren) { if ((Object)(object)val2 == (Object)null || !(val2 is MonoBehaviour) || !hashSet.Contains(((Object)val2.gameObject).GetInstanceID())) { continue; } Type type = ((object)val2).GetType(); while (type != null && type != typeof(object)) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (MethodInfo methodInfo in methods) { switch (methodInfo.Name) { case "CallDie": case "DoKilling": case "Die": case "KillLocal": case "OnKill": case "Destroy": try { if (methodInfo.GetParameters().Length == 0) { methodInfo.Invoke(val2, null); } } catch { } break; } } type = type.BaseType; } } } catch { } try { Component[] componentsInChildren = go.GetComponentsInChildren(); foreach (Component val3 in componentsInChildren) { if ((Object)(object)val3 == (Object)null) { continue; } try { PropertyInfo property = ((object)val3).GetType().GetProperty("health", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property != null && property.CanWrite) { try { if (property.PropertyType == typeof(int)) { property.SetValue(val3, 0); } else if (property.PropertyType == typeof(float)) { property.SetValue(val3, 0f); } else if (property.PropertyType == typeof(double)) { property.SetValue(val3, 0.0); } else if (property.PropertyType == typeof(bool)) { property.SetValue(val3, false); } } catch { } } PropertyInfo property2 = ((object)val3).GetType().GetProperty("justDied", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property2 != null && property2.CanWrite) { property2.SetValue(val3, true); } PropertyInfo property3 = ((object)val3).GetType().GetProperty("dead", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (property3 != null && property3.CanWrite) { property3.SetValue(val3, true); } } catch { } } } catch { } try { PhotonView component = go.GetComponent(); if (PhotonNetwork.IsConnected && (Object)(object)component != (Object)null) { try { PhotonNetwork.Destroy(go); } catch { } } if ((Object)(object)go != (Object)null) { Object.Destroy((Object)(object)go); } ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-Destroy] destroyed " + name)); } catch { try { if ((Object)(object)go != (Object)null) { Object.Destroy((Object)(object)go); } } catch { } } } private bool DestroySpawned(int index) { if (index < 0 || index >= _spawned.Count) { return false; } SpawnedEntry spawnedEntry = _spawned[index]; if ((Object)(object)spawnedEntry.go == (Object)null) { _spawned.RemoveAt(index); return false; } GameObject go = spawnedEntry.go; DestroyGO(go); _vanillaSeen.Remove(((Object)go).GetInstanceID()); _spawned.RemoveAt(index); return true; } private void CleanDead() { for (int num = _spawned.Count - 1; num >= 0; num--) { SpawnedEntry spawnedEntry = _spawned[num]; if ((Object)(object)spawnedEntry.go == (Object)null) { _vanillaSeen.Remove(spawnedEntry.id); _spawned.RemoveAt(num); } } } private void KillAll() { if (!_isKilling) { _isKilling = true; _killTimer = 5f; ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-KillAll] starting — tracked=" + _spawned.Count)); ((MonoBehaviour)this).StartCoroutine(KillAllRoutine()); } } private void SweepUntracked(ref int killed) { _modIds.Clear(); for (int i = 0; i < _spawned.Count; i++) { if ((Object)(object)_spawned[i].go != (Object)null) { _modIds.Add(((Object)_spawned[i].go).GetInstanceID()); } } HashSet hashSet = new HashSet(); foreach (GameObject item in SceneGOs()) { GameObject val = null; try { if ((Object)(object)item == (Object)null || (Object)(object)item.GetComponent() != (Object)null || !item.activeInHierarchy || _modIds.Contains(((Object)item).GetInstanceID()) || !IsMonsterLike(item)) { continue; } val = MonsterRoot(item); goto IL_00cf; } catch { } continue; IL_00cf: if ((Object)(object)val == (Object)null) { continue; } int instanceID = ((Object)val).GetInstanceID(); if (!_modIds.Contains(instanceID) && hashSet.Add(instanceID)) { try { DestroyGO(val); killed++; } catch { } } } } private IEnumerator KillAllRoutine() { int killed = 0; try { CleanDead(); _vanillaTimer = 0f; ScanVanilla(); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-KillAll] pass 1 — tracked=" + _spawned.Count)); for (int num = _spawned.Count - 1; num >= 0; num--) { try { if (DestroySpawned(num)) { killed++; } } catch { try { if (num >= 0 && num < _spawned.Count) { if ((Object)(object)_spawned[num].go != (Object)null) { Object.Destroy((Object)(object)_spawned[num].go); } _spawned.RemoveAt(num); } } catch { } } } SweepUntracked(ref killed); _vanillaSeen.Clear(); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("[MS-KillAll] pass 1 exception: " + ex)); } yield return null; if ((Object)(object)this == (Object)null || (Object)(object)((Component)this).gameObject == (Object)null) { _isKilling = false; _killTimer = 0f; yield break; } try { CleanDead(); _vanillaTimer = 0f; ScanVanilla(); ((BaseUnityPlugin)this).Logger.LogInfo((object)("[MS-KillAll] pass 2 — tracked=" + _spawned.Count)); for (int num2 = _spawned.Count - 1; num2 >= 0; num2--) { try { if (DestroySpawned(num2)) { killed++; } } catch { try { if (num2 >= 0 && num2 < _spawned.Count) { if ((Object)(object)_spawned[num2].go != (Object)null) { Object.Destroy((Object)(object)_spawned[num2].go); } _spawned.RemoveAt(num2); } } catch { } } } SweepUntracked(ref killed); _vanillaSeen.Clear(); } catch (Exception ex2) { ((BaseUnityPlugin)this).Logger.LogError((object)("[MS-KillAll] pass 2 exception: " + ex2)); } _isKilling = false; _killTimer = 0f; ShowToast((killed <= 0) ? "No monsters to kill" : ((killed == 1) ? "Killed 1 monster" : ("Killed " + killed + " monsters")), killed == 0); Rep("killall killed=" + killed + " remaining=" + _spawned.Count); } private void KillOne(int index) { if (index < 0 || index >= _spawned.Count) { return; } GameObject go = _spawned[index].go; string displayName = _spawned[index].displayName; CleanDead(); if ((Object)(object)go == (Object)null) { return; } int instanceID = ((Object)go).GetInstanceID(); DestroyGO(go); _vanillaSeen.Remove(instanceID); for (int num = _spawned.Count - 1; num >= 0; num--) { GameObject go2 = _spawned[num].go; if ((Object)(object)go2 == (Object)null || ((Object)go2).GetInstanceID() == instanceID) { _spawned.RemoveAt(num); } } ShowToast("Killed " + displayName, error: false); } private static List PoolList() { if (_pool.Count <= 0) { return new List(16); } return _pool.Pop(); } private static void PoolReturn(List l) { l.Clear(); _pool.Push(l); } } }