Code:
local spells = {
[871]=true,
}
local has_unfound = true
local default_color = {r=1,g=0.82,b=0}
local a = CreateFrame("Frame")
a:SetScript("OnEvent", function(self, event, ...)
local arg = {...}
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
if (arg[2] == "SPELL_CAST_SUCCESS" or arg[2] == "SPELL_CAST_START") and type(spells[arg[9]]) == "boolean" then
local c = (select(2,UnitClass(arg[4])))
RaidNotice_AddMessage(RaidWarningFrame, "|T"..spells[arg[9]].i..":20|t "..arg[4]..": |cffffd200"..arg[10].."|r", c and RAID_CLASS_COLORS[c] or default_color)
end
elseif has_unfound then
has_unfound = false
for id, data in pairs(spells) do
if type(data) == "boolean" then
local name, _, icon = GetSpellInfo(id)
if name then
spells[id] = {n=name, i=icon}
else
has_unfound = true
end
end
end
end
end)
a:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
a:RegisterEvent("SPELLS_CHANGED")
a:RegisterEvent("PLAYER_ENTERING_WORLD")
Untested. How to use. Report back with issues. (Make sure you have LUA errors turned on if you do).