From ca7cacf229221ecddbd46b6a4d5fe84fdbd6c8fc Mon Sep 17 00:00:00 2001 From: Alex Shubert Date: Tue, 23 Oct 2012 14:19:16 +0400 Subject: [PATCH] fixed saved variable access for hooked function. saved vars were nil for a new users --- AutoTurnIn.lua | 3 +++ QuestLevel.lua | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/AutoTurnIn.lua b/AutoTurnIn.lua index 6a7ff7a..27038ff 100644 --- a/AutoTurnIn.lua +++ b/AutoTurnIn.lua @@ -87,6 +87,9 @@ function AutoTurnIn:OnEnable() self:SetEnabled(DB.enabled) self:RegisterGossipEvents() + hooksecurefunc("QuestLog_Update", AutoTurnIn.ShowQuestLevelInLog) + hooksecurefunc(QuestLogScrollFrame, "update", AutoTurnIn.ShowQuestLevelInLog) + hooksecurefunc("WatchFrame_Update", AutoTurnIn.ShowQuestLevelInWatchFrame) end function AutoTurnIn:OnDisable() diff --git a/QuestLevel.lua b/QuestLevel.lua index 9a8395e..32b67e3 100644 --- a/QuestLevel.lua +++ b/QuestLevel.lua @@ -39,9 +39,6 @@ function AutoTurnIn:ShowQuestLevelInLog() end end end --- Quest level in a log. -hooksecurefunc("QuestLog_Update", AutoTurnIn.ShowQuestLevelInLog) -hooksecurefunc(QuestLogScrollFrame, "update", AutoTurnIn.ShowQuestLevelInLog) function AutoTurnIn:ShowQuestLevelInWatchFrame() if not AutoTurnInCharacterDB.watchlevel then @@ -69,4 +66,3 @@ function AutoTurnIn:ShowQuestLevelInWatchFrame() end end end -hooksecurefunc("WatchFrame_Update", AutoTurnIn.ShowQuestLevelInWatchFrame) \ No newline at end of file -- 1.7.9.5