-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCompatRetailClassic.lua
More file actions
19 lines (17 loc) · 862 Bytes
/
Copy pathCompatRetailClassic.lua
File metadata and controls
19 lines (17 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GetContainerNumSlots = GetContainerNumSlots or C_Container.GetContainerNumSlots
GetContainerNumFreeSlots = GetContainerNumFreeSlots or C_Container.GetContainerNumFreeSlots
GetContainerItemID = GetContainerItemID or C_Container.GetContainerItemID
GetContainerItemDurability = GetContainerItemDurability or C_Container.GetContainerItemDurability
-- Need this to still be nil in GetItemCount
-- local GetContainerItemInfo = GetContainerItemInfo or C_Container.GetContainerItemInfo
function GetItemCount(bagID, bagSlot)
local itemInfo = C_Container.GetContainerItemInfo(bagID, bagSlot)
return itemInfo and itemInfo.stackCount or 0
end
function GetItemCountAndLink(bagID, bagSlot)
local itemInfo = C_Container.GetContainerItemInfo(bagID, bagSlot)
if itemInfo then
return itemInfo.stackCount, itemInfo.hyperlink
end
return 0, nil
end