Not sure this function is needed. Cleanup otherwise.

This commit is contained in:
Crum
2018-02-20 15:31:58 -06:00
parent 5df31cd2dc
commit b511a9b9d1
+17 -17
View File
@@ -402,22 +402,22 @@ function GetItemInfoByName(itemName)
end end
function GetItemCount(itemName) function GetItemCount(itemName)
local count = 0 local count = 0
for bag = 4, 0, -1 do for bag = 4, 0, -1 do
for slot = 1, GetContainerNumSlots(bag) do for slot = 1, GetContainerNumSlots(bag) do
local _, itemCount = GetContainerItemInfo(bag, slot); local _, itemCount = GetContainerItemInfo(bag, slot)
if itemCount then if itemCount then
local itemLink = GetContainerItemLink(bag,slot) local itemLink = GetContainerItemLink(bag,slot)
local _, _, itemParse = strfind(itemLink, "(%d+):") local _, _, itemParse = strfind(itemLink, "(%d+):")
local queryName, _, _, _, _, _ = GetItemInfo(itemParse) local queryName, _, _, _, _, _ = GetItemInfo(itemParse)
if queryName and queryName ~= "" then if queryName and queryName ~= "" then
if queryName == itemName then if queryName == itemName then
count = count + itemCount; count = count + itemCount
end end
end end
end end
end end
end end
return count return count
end end