diff --git a/module_bags.lua b/module_bags.lua index 13cdf89..b99cf6d 100644 --- a/module_bags.lua +++ b/module_bags.lua @@ -13,16 +13,16 @@ function child:scanBag(bag) local slot = 1 local itemlist = {} local empty = true - while(slot<=GetContainerNumSlots(bag)) do + while(slot<=C_Container.GetContainerNumSlots(bag)) do local item = Item:CreateFromBagAndSlot(bag, slot) if(item) then - local _, itemCount = GetContainerItemInfo(bag, slot) + local itemInfo = C_Container.GetContainerItemInfo(bag, slot) local id = item:GetItemID() if(id) then empty = false itemlist[id] = itemlist[id] or {} 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) end end