Init
This commit is contained in:
35
Modules/Announcements/Interrupts.lua
Normal file
35
Modules/Announcements/Interrupts.lua
Normal file
@ -0,0 +1,35 @@
|
||||
local addon, ns = ...
|
||||
local T = ns.T
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- # MODULES > ANNOUNCEMENTS > INTERRUPTS
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local announceSelf = true
|
||||
local announceParty = false
|
||||
local announceRaid = false
|
||||
|
||||
local f = CreateFrame('Frame')
|
||||
f:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED')
|
||||
f:SetScript('OnEvent', function()
|
||||
local _, event, _, sourceGUID, _, _, _, _, destName, _, _, _, _, _, spellID = CombatLogGetCurrentEventInfo()
|
||||
if not (event == 'SPELL_INTERRUPT' and sourceGUID == UnitGUID('player')) then return end
|
||||
|
||||
-- check instant difficulty
|
||||
local _, _, difficultyID = GetInstanceInfo()
|
||||
-- do not announce interrupts in open world content
|
||||
if difficultyID == 0 then return end
|
||||
|
||||
-- check instance type
|
||||
local _, instanceType = IsInInstance()
|
||||
-- do not announce interrupts in pvp content
|
||||
if instanceType == 'pvp' or instanceType == 'arena' then return end
|
||||
|
||||
if instanceType == 'raid' and announceRaid == true then
|
||||
SendChatMessage(INTERRUPTED..' '..destName..': '..GetSpellLink(spellID), T.ChatChannel())
|
||||
elseif (instanceType == 'party' or 'scenario') and announceParty == true then
|
||||
SendChatMessage(INTERRUPTED..' '..destName..': '..GetSpellLink(spellID), T.ChatChannel())
|
||||
elseif announceSelf == true then
|
||||
print('|cff1994ff'..INTERRUPTED..' '..destName..':|r '..GetSpellLink(spellID))
|
||||
end
|
||||
end)
|
58
Modules/Announcements/Sound.lua
Normal file
58
Modules/Announcements/Sound.lua
Normal file
@ -0,0 +1,58 @@
|
||||
--------------------------------------------------------------------------------
|
||||
-- # MODULES > ANNOUNCEMENTS > SOUND
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
-- push ready check sound through to master channel
|
||||
hooksecurefunc('ShowReadyCheck', function(self, initiator)
|
||||
if initiator ~= 'player' then
|
||||
PlaySound(SOUNDKIT.READY_CHECK, 'Master')
|
||||
end
|
||||
end)
|
||||
|
||||
-- push other warning sounds through to master channel
|
||||
local warn = CreateFrame('Frame')
|
||||
warn:RegisterEvent('UPDATE_BATTLEFIELD_STATUS')
|
||||
warn:RegisterEvent('PET_BATTLE_QUEUE_PROPOSE_MATCH')
|
||||
warn:RegisterEvent('LFG_PROPOSAL_SHOW')
|
||||
warn:RegisterEvent('RESURRECT_REQUEST')
|
||||
warn:SetScript('OnEvent', function(self, event)
|
||||
if event == 'UPDATE_BATTLEFIELD_STATUS' then
|
||||
for i = 1, GetMaxBattlefieldID() do
|
||||
local status = GetBattlefieldStatus(i)
|
||||
if status == 'confirm' then
|
||||
PlaySound(SOUNDKIT.PVP_THROUGH_QUEUE, 'Master')
|
||||
break
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
elseif event == 'PET_BATTLE_QUEUE_PROPOSE_MATCH' then
|
||||
PlaySound(SOUNDKIT.PVP_THROUGH_QUEUE, 'Master')
|
||||
elseif event == 'LFG_PROPOSAL_SHOW' then
|
||||
PlaySound(SOUNDKIT.READY_CHECK, 'Master')
|
||||
elseif event == 'RESURRECT_REQUEST' then
|
||||
PlaySound(37, 'Master')
|
||||
end
|
||||
end)
|
||||
|
||||
-- mute crying emote sound
|
||||
-- why did blizzard curse us with this trinket - Elegy of the Eternals (Shadowlands)
|
||||
MuteSoundFile(540533) -- female human
|
||||
MuteSoundFile(539792) -- female dwarf
|
||||
MuteSoundFile(540273) -- female gnome
|
||||
MuteSoundFile(540873) -- female night elf
|
||||
MuteSoundFile(539674) -- female draenei
|
||||
MuteSoundFile(540736) -- male human
|
||||
MuteSoundFile(539875) -- male dwarf
|
||||
MuteSoundFile(540264) -- male gnome
|
||||
MuteSoundFile(540957) -- male night elf
|
||||
MuteSoundFile(539609) -- male draenei
|
||||
MuteSoundFile(541149) -- female orc
|
||||
MuteSoundFile(542815) -- female tauren
|
||||
MuteSoundFile(543084) -- female troll
|
||||
MuteSoundFile(542519) -- female undead
|
||||
MuteSoundFile(539295) -- female blood elf
|
||||
MuteSoundFile(541240) -- male orc
|
||||
MuteSoundFile(542887) -- male tauren
|
||||
MuteSoundFile(543090) -- male troll
|
||||
MuteSoundFile(542601) -- male undead
|
||||
MuteSoundFile(539355) -- male blood elf
|
Reference in New Issue
Block a user