From 3dee511b9adb9a1da98442619d9e8093dab0caa5 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Sun, 9 Mar 2025 23:13:33 +0100 Subject: [PATCH] Update some obsoletes. --- Glamourer/Gui/Tabs/DebugTab/InventoryPanel.cs | 2 +- Glamourer/Interop/InventoryService.cs | 2 +- Glamourer/Unlocks/ItemUnlockManager.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Glamourer/Gui/Tabs/DebugTab/InventoryPanel.cs b/Glamourer/Gui/Tabs/DebugTab/InventoryPanel.cs index b021656..f57a57e 100644 --- a/Glamourer/Gui/Tabs/DebugTab/InventoryPanel.cs +++ b/Glamourer/Gui/Tabs/DebugTab/InventoryPanel.cs @@ -23,7 +23,7 @@ public unsafe class InventoryPanel : IGameDataDrawer ImGuiUtil.CopyOnClickSelectable($"0x{(ulong)inventory:X}"); var equip = inventory->GetInventoryContainer(InventoryType.EquippedItems); - if (equip == null || equip->Loaded == 0) + if (equip == null || equip->IsLoaded) return; ImGuiUtil.CopyOnClickSelectable($"0x{(ulong)equip:X}"); diff --git a/Glamourer/Interop/InventoryService.cs b/Glamourer/Interop/InventoryService.cs index 4b98d46..c30ae06 100644 --- a/Glamourer/Interop/InventoryService.cs +++ b/Glamourer/Interop/InventoryService.cs @@ -182,7 +182,7 @@ public sealed unsafe class InventoryService : IDisposable, IRequiredService // Invoked after calling Original, so the item is already moved. var inventory = manager->GetInventoryContainer(targetContainer); - if (inventory == null || inventory->Loaded == 0 || inventory->Size <= targetSlot) + if (inventory == null || inventory->IsLoaded || inventory->Size <= targetSlot) return false; var item = inventory->GetInventorySlot((int)targetSlot); diff --git a/Glamourer/Unlocks/ItemUnlockManager.cs b/Glamourer/Unlocks/ItemUnlockManager.cs index 0fc1675..6708267 100644 --- a/Glamourer/Unlocks/ItemUnlockManager.cs +++ b/Glamourer/Unlocks/ItemUnlockManager.cs @@ -168,7 +168,7 @@ public class ItemUnlockManager : ISavable, IDisposable, IReadOnlyDictionaryGetInventoryContainer(type); - if (container != null && container->Loaded != 0 && _currentInventoryIndex < container->Size) + if (container != null && container->IsLoaded && _currentInventoryIndex < container->Size) { Glamourer.Log.Excessive($"[UnlockScanner] Scanning {_currentInventory} {type} {_currentInventoryIndex}/{container->Size}."); var item = container->GetInventorySlot(_currentInventoryIndex++);