Trying to fix an old addon to make it display the name of the spell that gets grounded after dropping the totem. This is what I have so far, but it doesn't seem to work. It worked in mop so I don't know what changed since then.
Code:
if (event=="SPELL_MISSED") then
if (bit.band(destFlags, COMBATLOG_OBJECT_AFFILIATION_MINE) > 0) then
local spellName,_,missType = select(13,...)
if (missType=="REFLECT") then
SpellNotifications_Print("Reflected "..spellName..".","white","small")
SendChatMessage("Reflected "..spellName..".", "SAY");
elseif (destName=="Grounding Totem") and (bit.band(destFlags, COMBATLOG_OBJECT_AFFILIATION_MINE) > 0) then
SpellNotifications_Print("Grounded "..spellName..".","white","small")
end
end
end
if (event=="SPELL_DAMAGE") then
if bit.band(destFlags, COMBATLOG_OBJECT_AFFILIATION_MINE) > 0 then
local spellName = select(13,...)
if (destName=="Grounding Totem") then
SpellNotifications_Print("Grounded "..spellName..".","white","small")
end
end
end
What do?