Add channelDinger

Plays a ding when semi final tick of a channel ticks
This commit is contained in:
2024-08-16 22:29:08 +02:00
parent 4fd6cec919
commit 77f1ac5d7a
3 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
-- COMBAT_LOG_EVENT_UNFILTERED
function(e, ...)
local se, err = CLEUParser.GetSubevent(...)
if err ~= nil then return end
local caster, err = CLEUParser.GetSourceGUID(...)
if err ~= nil then return end
local id, err = CLEUParser.GetSpellId(...)
if err ~= nil then return end
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)
end
if se == "SPELL_AURA_REMOVED" then
if aura_env.ticker ~= nil then
aura_env.ticker:Cancel()
aura_env.ticker = nil
end
end
end
end