/Tukui/modules/chat/sounds.lua
http://github.com/Asphyxia/Tukui · Lua · 17 lines · 12 code · 2 blank · 3 comment · 6 complexity · cbd7787a888ce95cfaf3c3ddea7eaf05 MD5 · raw file
- local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
- if C["chat"].enable ~= true then return end
- ------------------------------------------------------------------------
- -- Play sound files system
- ------------------------------------------------------------------------
- if C.chat.whispersound then
- local SoundSys = CreateFrame("Frame")
- SoundSys:RegisterEvent("CHAT_MSG_WHISPER")
- SoundSys:RegisterEvent("CHAT_MSG_BN_WHISPER")
- SoundSys:HookScript("OnEvent", function(self, event, ...)
- if event == "CHAT_MSG_WHISPER" or "CHAT_MSG_BN_WHISPER" then
- PlaySoundFile(C["media"].whisper)
- end
- end)
- end