Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --sound files
- local File1 = "Interface/AddOns/SnC_Audio/OnDeath"
- local File2 = "Interface/AddOns/SnC_Audio/Warlock_Meta"
- local File3 = "Interface/AddOns/SnC_Audio/Warlock_Meta_Critical"
- function SnC_OnLoad()
- this:RegisterEvent('PLAYER_DEAD')
- this:RegisterEvent('UNIT_CASTSPELL_SUCCEEDED')
- this:RegisterEvent('SPELL_DAMAGE')
- end
- function SnC_OnEvent(self, event, ...)
- if (event == 'PLAYER_DEAD') then
- PlaySoundFile(File1)
- end
- if (event == 'UNIT_CASTSPELL_SUCCEEDED') then
- if arg2 == 'Metamorphosis' then
- PlaySoundFile(File2)
- end
- end
- while UnitBuff("player", "Metamorphosis") do
- local timestamp, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)
- if CombatLog_Object_IsA(sourceFlags, COMBATLOG_FILTER_MINE) then
- if (event == "SPELL_DAMAGE") then
- critical = select(18, ...)
- if critical then
- PlaySoundFile(File3)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement