PageRenderTime 165ms CodeModel.GetById 81ms app.highlight 5ms RepoModel.GetById 75ms app.codeStats 1ms

/Tukui/modules/chat/sounds.lua

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