From 417e2f786f7f36eb3b7498ced18b045e6a1105f6 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Wed, 18 Jul 2018 20:39:42 +0300 Subject: [PATCH] typo --- !Compatibility/api/wowAPI.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/!Compatibility/api/wowAPI.lua b/!Compatibility/api/wowAPI.lua index 2c6793f..6d4e4a6 100644 --- a/!Compatibility/api/wowAPI.lua +++ b/!Compatibility/api/wowAPI.lua @@ -519,17 +519,17 @@ function GetItemInfoByName(itemName) end 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 - local _, _, itemID = find(itemLink, "(%d+):") + local _, _, itemID = find(item, "(%d+):") if not itemID then return end item = tonumber(itemID) 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 function GetItemCount(itemName)