Fix C_Container prefix use

This commit is contained in:
Robin Hüskes 2022-10-06 12:29:55 +02:00
parent 7b5ddd9e01
commit 8cd03059f9
1 changed files with 3 additions and 3 deletions

View File

@ -13,16 +13,16 @@ function child:scanBag(bag)
local slot = 1 local slot = 1
local itemlist = {} local itemlist = {}
local empty = true local empty = true
while(slot<=GetContainerNumSlots(bag)) do while(slot<=C_Container.GetContainerNumSlots(bag)) do
local item = Item:CreateFromBagAndSlot(bag, slot) local item = Item:CreateFromBagAndSlot(bag, slot)
if(item) then if(item) then
local _, itemCount = GetContainerItemInfo(bag, slot) local itemInfo = C_Container.GetContainerItemInfo(bag, slot)
local id = item:GetItemID() local id = item:GetItemID()
if(id) then if(id) then
empty = false empty = false
itemlist[id] = itemlist[id] or {} itemlist[id] = itemlist[id] or {}
itemlist[id]['count'] = itemlist[id]['count'] or 0 itemlist[id]['count'] = itemlist[id]['count'] or 0
itemlist[id]['count'] = itemlist[id]['count'] + itemCount itemlist[id]['count'] = itemlist[id]['count'] + itemInfo['stackCount']
child:getName(id) child:getName(id)
end end
end end