Signed-off-by: kibsgaard <kibsgaard@curseforge.com>
kibsgaard [11-19-14 - 16:46]
Signed-off-by: kibsgaard <kibsgaard@curseforge.com>
diff --git a/KibsItemLevel.lua b/KibsItemLevel.lua
index 326b479..2282f48 100644
--- a/KibsItemLevel.lua
+++ b/KibsItemLevel.lua
@@ -230,6 +230,9 @@ function KibsItemLevelFrame_VARIABLES_LOADED()
if (KibsItemLevelConfig.Inspection == nil) then
KibsItemLevelConfig.Inspection = KibsItemLevelConfig_defaultInspection;
end
+ if (KibsItemLevelConfig.Color == nil) then
+ KibsItemLevelConfig.Color = KibsItemLevelConfig_defaultColor;
+ end
if (KibsItemLevelConfig.Small == nil) then
KibsItemLevelConfig.Small = KibsItemLevelConfig_defaultSmall;
end
@@ -267,6 +270,12 @@ function KibsItemLevelFrame_VARIABLES_LOADED()
_G[b4:GetName() .. "Text"]:SetText("Smaller ilvl text (requires reload)");
b4:SetScript("OnClick", function(self, button, isDown) if ( self:GetChecked() ) then KibsItemLevelConfig.Small = true; cleanUp(); else KibsItemLevelConfig.Small = false; cleanUp(); end end)
+ local b5 = CreateFrame("CheckButton","Color",ConfigPanel,"UICheckButtonTemplate");
+ b5:SetPoint("TOPLEFT",b4,"BOTTOMLEFT",0,0);
+ b5:SetChecked(KibsItemLevelConfig.Small);
+ _G[b5:GetName() .. "Text"]:SetText("Color ilvl text");
+ b5:SetScript("OnClick", function(self, button, isDown) if ( self:GetChecked() ) then KibsItemLevelConfig.Color = true; cleanUp(); else KibsItemLevelConfig.Color = false; cleanUp(); end end)
+
if(KibsItemLevelConfig.Small) then
fontStyle = "SystemFont_Small";
end
@@ -356,16 +365,26 @@ function findItemInfo(who)
ilvl = 0;
end
- if (ilvl == 1) then
+ local quality = select(3, GetItemInfo(itemlink));
+
+ if (quality == 7) then
ilvl = findHeirloomilvl();
end
+ _,_,_, color = GetItemQualityColor(quality);
+
+
+
if (upgrade and KibsItemLevelConfig.upgrades) then
ActiveFontStrings[i]:SetText(ilvl .." ("..upgrade.."/"..max..")")
else
ActiveFontStrings[i]:SetText(ilvl)
end
+ if(KibsItemLevelConfig.Color) then
+ ActiveFontStrings[i]:SetText("|c" .. color .. ActiveFontStrings[i]:GetText());
+ end
+
if(ilvl)then
tilvl = tilvl + ilvl;
end
@@ -475,7 +494,11 @@ function findSockets(who,slot)
if (line) then
line = line:GetText();
if (line) then
+ if(line:find("Enchanted: "))then
+ print(line);
+ end
if(line:find("Socket")) then
+
texturePath = emptySockets[line:sub(1, line:find("Socket") - 1)];
if (texturePath) then
ActiveIcons[sockets].texture:SetTexture(""..texturePath);