Fix very stupid bug with shields.

This commit is contained in:
Ottermandias 2023-07-20 01:42:21 +02:00
parent 55af7f7371
commit 8e736c62c6
2 changed files with 5 additions and 1 deletions

View file

@ -906,6 +906,8 @@ public unsafe class DebugTab : ITab
design.DoApplyVisorToggle(), design.DoApplyWeaponVisible(), design.WriteProtected()); design.DoApplyVisorToggle(), design.DoApplyWeaponVisible(), design.WriteProtected());
using var font = ImRaii.PushFont(UiBuilder.MonoFont); using var font = ImRaii.PushFont(UiBuilder.MonoFont);
ImGuiUtil.TextWrapped(base64); ImGuiUtil.TextWrapped(base64);
if (ImGui.IsItemClicked())
ImGui.SetClipboardText(base64);
} }
} }
@ -978,6 +980,7 @@ public unsafe class DebugTab : ITab
ImGui.SameLine(); ImGui.SameLine();
} }
ImGui.NewLine();
} }
if (_parse64Failure != null && _base64Bytes.Length > 0) if (_parse64Failure != null && _base64Bytes.Length > 0)
@ -993,6 +996,7 @@ public unsafe class DebugTab : ITab
ImGui.SameLine(); ImGui.SameLine();
} }
ImGui.NewLine();
} }
} }

View file

@ -88,7 +88,7 @@ public class ItemManager : IDisposable
if (itemId == NothingId(type)) if (itemId == NothingId(type))
return NothingItem(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); return new EquipItem(string.Intern($"Unknown #{itemId}"), itemId, 0, 0, 0, 0, 0);
if (item.Type != type) if (item.Type != type)