Add channelDinger
Plays a ding when semi final tick of a channel ticks
This commit is contained in:
28
FreshShit/ChannelDinger/event.lua
Normal file
28
FreshShit/ChannelDinger/event.lua
Normal 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
|
||||
Reference in New Issue
Block a user