Skip to content

Commit

Permalink
more bequeather work
Browse files Browse the repository at this point in the history
  • Loading branch information
g4m3r7ag committed Jan 24, 2022
1 parent 2e22929 commit 8fb9ece
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion PolloxsDailyQuestTracker/timer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,47 @@ function Timer.onRidingSkillImprovement(eventCode, ridingSkillType, previous, cu
end
end

--[[
function Timer:resetBequeatherTimer()
self:resetTimer(TIMER_TYPE.BEQUEATHER, GetTimeToShadowyConnectionsResetInSeconds())
if IsSkillAbilityPurchased(5, 1, 4) ~= true then
self.questTimers[TIMER_TYPE.BEQUEATHER] = "na"
else
SecurePostHook(INTERACTION, "UpdateShadowyConnectionsChatterOption", function(selfInteraction, control, data)
local timeRemaining = GetTimeToShadowyConnectionsResetInSeconds()
if timeRemaining ~= 0 and not data.optionUsable then
self:resetTimer(TIMER_TYPE.BEQUEATHER, GetTimeToShadowyConnectionsResetInSeconds())
end
end)
end
end
function Timer:resetBequeatherTimer()
if IsSkillAbilityPurchased(5, 1, 4) ~= true then
self.questTimers[TIMER_TYPE.BEQUEATHER] = "na"
else
Timer:resetTimer(TIMER_TYPE.BEQUEATHER, GetTimeToShadowyConnectionsResetInSeconds())
end
end
--]]

function Timer:resetBequeatherTimer()
if IsSkillAbilityPurchased(5, 1, 4) ~= true then
self.questTimers[TIMER_TYPE.BEQUEATHER] = "na"
elseif GetTimeToShadowyConnectionsResetInSeconds() ~= 0 then
self:resetTimer(TIMER_TYPE.BEQUEATHER, GetTimeToShadowyConnectionsResetInSeconds())
else
SecurePostHook(INTERACTION, "UpdateShadowyConnectionsChatterOption", function(selfInteraction, control, data)
local timeRemaining = GetTimeToShadowyConnectionsResetInSeconds()
local bequeatherdelays = {5, 10, 20}
if timeRemaining ~= 0 then
self:resetTimer(TIMER_TYPE.BEQUEATHER, GetTimeToShadowyConnectionsResetInSeconds())
else
for _, delay in ipairs(bequeatherdelays) do
zo_callLater(function() Timer:resetBequeatherTimer() end, 1000 * delay)
end
end
end)
end
end

--[[
Expand Down

0 comments on commit 8fb9ece

Please sign in to comment.