Make it work
This commit is contained in:
parent
f94dd862c1
commit
e78e0c0799
1 changed files with 15 additions and 9 deletions
24
MyAddon.lua
24
MyAddon.lua
|
@ -16,7 +16,7 @@ MyAddon.taunts = {
|
||||||
[185245] = true, -- Torment
|
[185245] = true, -- Torment
|
||||||
[6795] = true, -- Growl
|
[6795] = true, -- Growl
|
||||||
[115546] = true, -- Provke
|
[115546] = true, -- Provke
|
||||||
[612124] = true, -- Hand of Reckoning
|
[62124] = true, -- Hand of Reckoning
|
||||||
[355] = true, -- Taunt
|
[355] = true, -- Taunt
|
||||||
|
|
||||||
[1161] = true, -- Challenging Shout
|
[1161] = true, -- Challenging Shout
|
||||||
|
@ -40,7 +40,7 @@ function events:CHAT_MSG_PARTY(message, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
function events:COMBAT_LOG_EVENT_UNFILTERED(...)
|
function events:COMBAT_LOG_EVENT_UNFILTERED(...)
|
||||||
MyAddon.announceTaunts(...)
|
MyAddon.announceTaunts(CombatLogGetCurrentEventInfo())
|
||||||
end
|
end
|
||||||
|
|
||||||
function events:MERCHANT_SHOW(...)
|
function events:MERCHANT_SHOW(...)
|
||||||
|
@ -82,18 +82,24 @@ function MyAddon.announceKey()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function MyAddon.announceTaunts(_, _, event, _, _, srcName, _, _, _, dstName, _, _, spellId, spellName, ...)
|
function MyAddon.announceTaunts(...)
|
||||||
if event ~= 'SPELL_CAST_SUCESS' or MyAddon.taunts[spellId] ~= true then
|
event = select(2, ...)
|
||||||
|
spellId = select(12, ...)
|
||||||
|
|
||||||
|
if event ~= 'SPELL_CAST_SUCCESS' or MyAddon.taunts[spellId] ~= true then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("LOOKING")
|
|
||||||
|
|
||||||
message = format("TAUNT: %s used %s", srcName, spellName)
|
srcName = select(5, ...)
|
||||||
if dstName ~= nil then
|
destName = select(9, ...)
|
||||||
message = format("%s on %s", message, dstName)
|
spellName = select(13, ...)
|
||||||
|
|
||||||
|
message = format("|cffFF0000TAUNT:|r %s used %s", srcName, spellName)
|
||||||
|
if destName ~= nil then
|
||||||
|
message = format("%s on %s", message, destName)
|
||||||
end
|
end
|
||||||
|
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(message)
|
print(message)
|
||||||
end
|
end
|
||||||
|
|
||||||
function MyAddon.needsRepair()
|
function MyAddon.needsRepair()
|
||||||
|
|
Loading…
Reference in a new issue