mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
Not sure this function is needed. Cleanup otherwise.
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user