Skip to content

Commit 4e1f4f1

Browse files
committed
fix #10
1 parent 147f493 commit 4e1f4f1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

SomethingNeedDoing/LuaMacro/Modules/InventoryModule.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ public unsafe class InventoryModule : LuaModuleBase
1515
[LuaFunction] public InventoryContainerWrapper GetInventoryContainer(InventoryType container) => new(container);
1616
[LuaFunction] public InventoryItemWrapper GetInventoryItem(InventoryType container, int slot) => new(container, slot);
1717

18-
[LuaFunction][Changelog("12.9")] public unsafe int GetItemCount(uint itemId) => InventoryManager.Instance()->GetInventoryItemCount(itemId % 500_000, itemId % 500_000 != itemId);
19-
[LuaFunction][Changelog("12.9")] public unsafe int GetHqItemCount(uint itemId) => InventoryManager.Instance()->GetInventoryItemCount(itemId % 500_000, true);
18+
[LuaFunction]
19+
[Changelog("12.9")]
20+
[Changelog("12.10", ChangelogType.Fixed, "Support for Key Items")]
21+
public int GetItemCount(uint itemId) => InventoryManager.Instance()->GetInventoryItemCount(itemId < 2_000_000 ? itemId % 500_000 : itemId, itemId % 500_000 != itemId);
22+
[LuaFunction][Changelog("12.9")] public int GetHqItemCount(uint itemId) => InventoryManager.Instance()->GetInventoryItemCount(itemId % 500_000, true);
2023

2124
[LuaFunction]
2225
public unsafe InventoryItemWrapper? GetInventoryItem(uint itemId)

0 commit comments

Comments
 (0)