This commit is contained in:
Bunny67
2018-07-18 20:39:42 +03:00
parent fcdb2e5ecc
commit 417e2f786f
+3 -3
View File
@@ -519,17 +519,17 @@ function GetItemInfoByName(itemName)
end end
function GetItemFamily(item, isBag) function GetItemFamily(item, isBag)
if not item or type(item) ~= "number" or type(item) ~= "string" then return end if not item or (type(item) ~= "number" and type(item) ~= "string") then return end
if type(item) == "string" then if type(item) == "string" then
local _, _, itemID = find(itemLink, "(%d+):") local _, _, itemID = find(item, "(%d+):")
if not itemID then return end if not itemID then return end
item = tonumber(itemID) item = tonumber(itemID)
end end
if item > LAST_ITEM_ID then return end if item > LAST_ITEM_ID then return end
return (isBag and IFDB.ItemBagFamily[item] or IFDB.ItemFamily[item]) or 0 return (isBag and IFDB.BagFamily[item] or IFDB.ItemFamily[item]) or 0
end end
function GetItemCount(itemName) function GetItemCount(itemName)