Files

18 lines
604 B
Lua

-- If performance becomes an issue try UNIT_SPELLCAST_START/STOP/SUCCEEDED
--COMBAT_LOG_EVENT_UNFILTERED
function(...)
local se = select(3, ...);
local spellId = select(13, ...);
if (spellId ~= nil and se == "SPELL_CAST_START") then
local entry = aura_env.spells[spellId];
if (entry ~= nil and (entry.mode == 1 or entry.mode == 3)) then
aura_env.playSound(entry.name);
end
end
if (spellId ~= nil and se == "SPELL_CAST_SUCCESS") then
local entry = aura_env.spells[spellId];
if (entry ~= nil and (entry.mode == 2 or entry.mode == 3)) then
aura_env.playSound(entry.name);
end
end
end