From d559ec34813b9c18e5d2fe494d67621d4878f2d9 Mon Sep 17 00:00:00 2001 From: Kibsgaard Date: Sat, 28 Dec 2013 00:49:28 +0100 Subject: [PATCH] Added another ilvl-update when addon is loaded on logon. Fixed yet another nil-error. Signed-off-by: Kibsgaard --- KibsItemLevel.lua | 15 +++++++++------ KibsItemLevel.toc | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) 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 -- 1.7.9.5