From 8e736c62c657c1e25422f45d1355d355690f03d7 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Thu, 20 Jul 2023 01:42:21 +0200 Subject: [PATCH] Fix very stupid bug with shields. --- Glamourer/Gui/Tabs/DebugTab.cs | 4 ++++ Glamourer/Services/ItemManager.cs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Glamourer/Gui/Tabs/DebugTab.cs b/Glamourer/Gui/Tabs/DebugTab.cs index 23e19f2..718271f 100644 --- a/Glamourer/Gui/Tabs/DebugTab.cs +++ b/Glamourer/Gui/Tabs/DebugTab.cs @@ -906,6 +906,8 @@ public unsafe class DebugTab : ITab design.DoApplyVisorToggle(), design.DoApplyWeaponVisible(), design.WriteProtected()); using var font = ImRaii.PushFont(UiBuilder.MonoFont); ImGuiUtil.TextWrapped(base64); + if (ImGui.IsItemClicked()) + ImGui.SetClipboardText(base64); } } @@ -978,6 +980,7 @@ public unsafe class DebugTab : ITab ImGui.SameLine(); } + ImGui.NewLine(); } if (_parse64Failure != null && _base64Bytes.Length > 0) @@ -993,6 +996,7 @@ public unsafe class DebugTab : ITab ImGui.SameLine(); } + ImGui.NewLine(); } } diff --git a/Glamourer/Services/ItemManager.cs b/Glamourer/Services/ItemManager.cs index c0eeb6b..1ccfcc3 100644 --- a/Glamourer/Services/ItemManager.cs +++ b/Glamourer/Services/ItemManager.cs @@ -88,7 +88,7 @@ public class ItemManager : IDisposable if (itemId == NothingId(type)) return NothingItem(type); - if (!ItemService.AwaitedService.TryGetValue(itemId, false, out var item)) + if (!ItemService.AwaitedService.TryGetValue(itemId, type is FullEquipType.Shield, out var item)) return new EquipItem(string.Intern($"Unknown #{itemId}"), itemId, 0, 0, 0, 0, 0); if (item.Type != type)