Signed-off-by: kibsgaard <kibsgaard@curseforge.com>
kibsgaard [11-20-14 - 12:52]
Signed-off-by: kibsgaard <kibsgaard@curseforge.com>
diff --git a/KibsItemLevel.lua b/KibsItemLevel.lua
index b373fc6..cc13976 100644
--- a/KibsItemLevel.lua
+++ b/KibsItemLevel.lua
@@ -371,9 +371,9 @@ function findItemInfo(who)
ilvl = findHeirloomilvl();
end
- _,_,_, color = GetItemQualityColor(quality);
-
-
+ if(quality) then
+ _,_,_, color = GetItemQualityColor(quality);
+ end
if (upgrade and KibsItemLevelConfig.upgrades) then
ActiveFontStrings[i]:SetText(ilvl .." ("..upgrade.."/"..max..")")
@@ -456,11 +456,16 @@ function findHeirloomilvl()
local line = "";
for i = 2, GameTooltip:NumLines() do
line = _G[GameTooltip:GetName().."TextLeft"..i];
+
if (line) then
line = line:GetText();
+
if (line) then
- if(line:match("Item Level")) then
- return tonumber(line:match("%d+"));
+ if(line:match("%d+")) then
+ local number = tonumber(line:match("%d+"));
+ if(number > 0) then
+ return number;
+ end
end
end
end