Mercurial > wow > spotlight-hidden-artifact-skin-tracking
changeset 14:6ee128c4bd4d v0.7.1.4
One more bug fix with initializing the addon.
author | Vynn <mischivin@gmail.com> |
---|---|
date | Mon, 06 Feb 2017 10:41:09 -0500 |
parents | f653da97b5bd |
children | 61b695a1f64e |
files | Spotlight.lua |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Spotlight.lua Mon Feb 06 10:40:29 2017 -0500 +++ b/Spotlight.lua Mon Feb 06 10:41:09 2017 -0500 @@ -1,3 +1,5 @@ +local initizlized = false; + local dataobj = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Spotlight", { type = "data source", text = "Nothing to track!", @@ -23,7 +25,7 @@ SlashHandler(msg); end -local function Initialize () +local function Initialize() if not Spotlight.Status then Spotlight.Status = { Dungeons = { @@ -136,10 +138,11 @@ local function EventHandler(self, event, ...) if event == "VARIABLES_LOADED" then if Initialize() then - print("|T" .. GetInventoryItemTexture("player", 16) .. ":0|t |cffe5cc80Spotlight v" .. GetAddOnMetadata("Spotlight", "Version") .. " Loaded!|r") + initialized = true; + print("|T" .. (Spotlight.Icon or 1355359) .. ":0|t |cffe5cc80Spotlight v" .. GetAddOnMetadata("Spotlight", "Version") .. " Loaded!|r"); end end - if event == "CRITERIA_UPDATE" or "PLAYER_ENTERING_WORLD" then + if event == "CRITERIA_UPDATE" or "PLAYER_ENTERING_WORLD" and initialized then Spotlight.Update(); end end