Originally Posted by
Fr33z4
I am trying to track cc on my Healer, so I can easily dispel it with Blessing of Sanctuary.
Wouldn't this be easier done with WeakAuras or any of the arena addons?
Here is a proof-of-concept of your code but it's very barebones
Code:
local healer = "HealerNameGoesHere"
local t = {
[107570] = true, -- Storm Bolt
[46968] = true, -- Shockwave
[5246] = true, -- Intimidating Shout
-- Static Shock (?)
[19577] = true, -- Intimidation
[119381] = true, -- Leg Sweep
[1833] = true, -- Cheap Shot
[408] = true, -- Kidney Shot
[199804] = true, -- Between the Eyes
[93424] = true, -- Asphyxiate
[47476] = true, -- Strangulate
[853] = true, -- Hammer of Justice
-- Fist of Justice (?)
[205369] = true, -- Mind Bomb
[8122] = true, -- Psychic Scream
[5782] = true, -- Fear
}
local f = CreateFrame("Frame")
f:SetPoint("CENTER")
f:SetSize(48, 48)
local tex = f:CreateTexture()
tex:SetAllPoints(f)
local function OnEvent(self, event, ...)
local timestamp, subevent, _, sourceGUID, sourceName, _, _, destGUID, destName, _, _, spellID, spellName = ...
if subevent == "SPELL_AURA_APPLIED" then
if strfind(destName, healer) and t[spellID] then
local icon = select(3, GetSpellInfo(spellID))
tex:SetTexture(icon)
end
end
end
f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
f:SetScript("OnEvent", OnEvent)
You can get more help on WoWInterface if you post your full code there