Update ChannelDinger to be a little more reliable

This commit is contained in:
2024-08-24 22:43:21 +02:00
parent 3b6b9995cf
commit 9cb48bd6e6
3 changed files with 29 additions and 24 deletions

View File

@@ -9,20 +9,13 @@ function(e, ...)
if caster == aura_env.player and id == 198590 then
if se == "SPELL_CAST_SUCCESS" then
local finalTick = aura_env.EstimateSemiFinalTick() * 1.06
if aura_env.ticker ~= nil then
aura_env.ticker:Cancel()
aura_env.ticker = nil
end
aura_env.ticker = C_Timer.NewTimer(finalTick, function()
WeakAuras.ScanEvents("PLAY_SOUND", "Interface\\AddOns\\WeakAuras\\Media\\Sounds\\RobotBlip.ogg")
end)
aura_env.statee:set(1)
end
if se == "SPELL_DAMAGE" then
aura_env.tick:set(aura_env.tick + 1)
end
if se == "SPELL_AURA_REMOVED" then
if aura_env.ticker ~= nil then
aura_env.ticker:Cancel()
aura_env.ticker = nil
end
aura_env.statee:set(0)
end
end
end