From 6725ad1f96ca173ffcc96ed265916404b20c3878 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sun, 7 Jun 2015 03:21:10 +0400 Subject: [PATCH] Update quest settings on profile change also preventing weird errors --- ElvUI_SLE/modules/quests.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ElvUI_SLE/modules/quests.lua b/ElvUI_SLE/modules/quests.lua index b857d26..d759158 100644 --- a/ElvUI_SLE/modules/quests.lua +++ b/ElvUI_SLE/modules/quests.lua @@ -19,6 +19,8 @@ local statedriver = { function Q:ChangeState(event) if InCombatLockdown() then self:RegisterEvent("PLAYER_REGEN_ENABLED", "ChangeState") return end if event == "PLAYER_REGEN_ENABLED" then self:UnregisterEvent("PLAYER_REGEN_ENABLED") end + if not Q.db then return end + if not Q.db.visibility then return end if IsResting() then statedriver[Q.db.visibility.rested](frame) @@ -48,4 +50,9 @@ function Q:Initialize() frame = ObjectiveTrackerFrame self:RegisterEvent("PLAYER_ENTERING_WORLD", "ChangeState") self:RegisterEvent("PLAYER_UPDATE_RESTING", "ChangeState") + + hooksecurefunc(E, "UpdateAll", function() + Q:ChangeState() + collectgarbage('collect'); + end) end \ No newline at end of file -- 1.7.9.5