From 351276f3ec0dad699b8bc1e32f37b635952e4c92 Mon Sep 17 00:00:00 2001 From: g4m3r7ag Date: Tue, 25 Jan 2022 03:21:25 -0500 Subject: [PATCH] moved SecurePostHook to Main.OnAddOnLoaded --- PolloxsDailyQuestTracker/DailyQuestTracker.lua | 13 +++++++++++++ PolloxsDailyQuestTracker/timer.lua | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/PolloxsDailyQuestTracker/DailyQuestTracker.lua b/PolloxsDailyQuestTracker/DailyQuestTracker.lua index 1480395..4d057b5 100644 --- a/PolloxsDailyQuestTracker/DailyQuestTracker.lua +++ b/PolloxsDailyQuestTracker/DailyQuestTracker.lua @@ -473,6 +473,19 @@ function Main.OnAddOnLoaded(event, addonName) -- The event fires each time *any* addon loads - but we only care about when our own addon loads if addonName == Main.name then EVENT_MANAGER:UnregisterForEvent(Main.name, EVENT_ADD_ON_LOADED) + + SecurePostHook(INTERACTION, "UpdateShadowyConnectionsOnTimeComplete", function(self, control, data) + local timeRemaining = GetTimeToShadowyConnectionsResetInSeconds() + if timeRemaining <= 0 then + d("UpdateShadowyConnectionsOnTimeComplete") + end + end) + SecurePostHook(INTERACTION, "UpdateShadowyConnectionsChatterOption", function(self, control, data) + local timeRemaining = GetTimeToShadowyConnectionsResetInSeconds() + if timeRemaining <= 0 then + d("UpdateShadowyConnectionsChatterOption") + end + end) EVENT_MANAGER:RegisterForEvent(Main.name, EVENT_QUEST_ADDED, Main.onQuestAdded) EVENT_MANAGER:RegisterForEvent(Main.name, EVENT_QUEST_COMPLETE, Main.onQuestComplete) diff --git a/PolloxsDailyQuestTracker/timer.lua b/PolloxsDailyQuestTracker/timer.lua index 2e0c436..4f5d856 100644 --- a/PolloxsDailyQuestTracker/timer.lua +++ b/PolloxsDailyQuestTracker/timer.lua @@ -68,7 +68,7 @@ function Timer:resetBequeatherTimer() end) end end - +--]] function Timer:resetBequeatherTimer() if IsSkillAbilityPurchased(5, 1, 4) ~= true then self.questTimers[TIMER_TYPE.BEQUEATHER] = "na" @@ -76,8 +76,8 @@ function Timer:resetBequeatherTimer() Timer:resetTimer(TIMER_TYPE.BEQUEATHER, GetTimeToShadowyConnectionsResetInSeconds()) end end ---]] +--[[ function Timer:resetBequeatherTimer() if IsSkillAbilityPurchased(5, 1, 4) ~= true then self.questTimers[TIMER_TYPE.BEQUEATHER] = "na" @@ -97,7 +97,7 @@ function Timer:resetBequeatherTimer() end) end end - +--]] --[[ There seems to be a slight delay between when EVENT_ACTIVITY_FINDER_ACTIVITY_COMPLETE fires, and when GetLFGCooldownTimeRemainingSeconds is actually updated. I have not found a reliable