diff --git a/Dalamud/Game/Inventory/GameInventory.cs b/Dalamud/Game/Inventory/GameInventory.cs index 0ddf0dcafc..02412c5513 100644 --- a/Dalamud/Game/Inventory/GameInventory.cs +++ b/Dalamud/Game/Inventory/GameInventory.cs @@ -403,6 +403,9 @@ internal class GameInventoryPluginScoped : IInternalDisposableService, IGameInve /// public event IGameInventory.InventoryChangedDelegate? ItemMergedExplicit; + /// + public ReadOnlySpan GetInventoryItems(GameInventoryType type) => GameInventoryItem.GetReadOnlySpanOfInventory(type); + /// void IInternalDisposableService.DisposeService() { diff --git a/Dalamud/Plugin/Services/IGameInventory.cs b/Dalamud/Plugin/Services/IGameInventory.cs index a1b1114d7e..0dff1ff034 100644 --- a/Dalamud/Plugin/Services/IGameInventory.cs +++ b/Dalamud/Plugin/Services/IGameInventory.cs @@ -103,4 +103,11 @@ public interface IGameInventory /// public event InventoryChangedDelegate ItemMergedExplicit; + + /// + /// Gets all item slots of the specified inventory type. + /// + /// The type of inventory to get the items for. + /// A read-only span of all items in the specified inventory type. + public ReadOnlySpan GetInventoryItems(GameInventoryType type); }