Added another ilvl-update when addon is loaded on logon. Fixed yet another nil-error.
Kibsgaard [12-27-13 - 23:49]
Added another ilvl-update when addon is loaded on logon. Fixed yet another nil-error.
Signed-off-by: Kibsgaard <http://www.curseforge.com/profiles/Kibsgaard/>
diff --git a/KibsItemLevel.lua b/KibsItemLevel.lua
index 53da1f8..af03ef7 100644
--- a/KibsItemLevel.lua
+++ b/KibsItemLevel.lua
@@ -100,6 +100,7 @@ function eventHandler(self,event,...)
end
elseif(KibsItemLevelConfig.Character) then
findItemInfo("player");
+ KIL_wait(5,findItemInfo,"player");
end
end
end
@@ -301,12 +302,14 @@ function findSockets(who,slot,slotID)
line = _G[GameTooltip:GetName().."TextLeft"..i];
if (line) then
line = line:GetText();
- if(line:find("Socket")) then
- texturePath = emptySockets[line:sub(1, line:find("Socket") - 1)];
- if (texturePath) then
- ActiveIcons[sockets].texture:SetTexture(""..texturePath);
- ActiveIcons[sockets].texture:SetAlpha(1.0);
- sockets = sockets + 1;
+ if (line) then
+ if(line:find("Socket")) then
+ texturePath = emptySockets[line:sub(1, line:find("Socket") - 1)];
+ if (texturePath) then
+ ActiveIcons[sockets].texture:SetTexture(""..texturePath);
+ ActiveIcons[sockets].texture:SetAlpha(1.0);
+ sockets = sockets + 1;
+ end
end
end
end
diff --git a/KibsItemLevel.toc b/KibsItemLevel.toc
index 1df2b4b..287cace 100644
--- a/KibsItemLevel.toc
+++ b/KibsItemLevel.toc
@@ -1,5 +1,5 @@
## Interface: 50400
-## Version: 0.2.0
+## Version: 0.2.1
## Title: KibsItemLevel
## Author: Kibs
## SavedVariables: KibsItemLevelConfig