-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCore.lua
26 lines (20 loc) · 796 Bytes
/
Core.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
local name, addon = ...
--------------------------------------------------------------------------------
-- Locals
--
local tostring = tostring
local format = format
addon.SendMessage = BigWigsLoader.SendMessage
--------------------------------------------------------------------------------
-- Event Handlers
--
local path = "Interface\\AddOns\\BigWigs_Voice_DE\\Sounds\\%s.ogg"
local pathYou = "Interface\\AddOns\\BigWigs_Voice_DE\\Sounds\\%sy.ogg"
local function handler(event, module, key, sound, isOnMe)
local success = PlaySoundFile(format(isOnMe and pathYou or path, tostring(key)), "Master")
if not success then
addon:SendMessage("BigWigs_Sound", module, key, sound)
end
end
BigWigsLoader.RegisterMessage(addon, "BigWigs_Voice", handler)
BigWigsAPI.RegisterVoicePack("temp")