/trunk
-- [86678] = 7, -- Light of the Ancient Kings |
[114039] = 6, -- Hand of Purity |
[105809] = 18, -- Holy Avenger |
[114250] = 15, -- Selfless Healer |
} |
-- defaults |
-- [86678] = true, -- Light of the Ancient Kings |
[114039] = true, -- Hand of Purity |
[105809] = true, -- Holy Avenger |
[114250] = true, -- Selfless Healer |
}, |
} |
end |
local INQUISITION = GetSpellInfo(84963) |
local SELFLESSHEALER = GetSpellInfo(114250) |
local colors = setmetatable({ |
DEATHKNIGHT = "c41e3a", |
DRUID = "ff7c0a", |
-- If new spells have been added, add them to our savedvars |
for k,v in pairs(defaults.spells) do |
if not db.spells[k] then |
if db.spells[k] == nil then |
db.spells[k] = v |
end |
end |
function Blessed:COMBAT_LOG_EVENT_UNFILTERED(timestamp, combatEvent, hideCaster, sourceGUID, sourceName, sourceFlags, sourceFlagsTwo, destGUID, destName, destFlags, destFlagsTwo, spellID, ...) |
if sourceGUID ~= pguid or not db.spells[spellID] then return end |
if (combatEvent == "SPELL_AURA_REMOVED") then |
-- Selfless healer |
if (combatEvent == "SPELL_AURA_APPLIED_DOSE") then |
self:RemoveFrame(spellID, true) |
self:SetupIcon(spellID, destName, destGUID) |
elseif (combatEvent == "SPELL_AURA_REMOVED") then |
self:RemoveFrame(spellID, false) |
elseif (combatEvent == "SPELL_AURA_APPLIED") then |
-- Only track Devotion Aura on player |
if spellID == 31821 and destGUID ~= pguid then return end |
-- Get rid of Beacon, to avoid duplicates due to being in different realms |
if spellID == 53563 then |
self:RemoveFrame(spellID) |
local class = select(2, GetPlayerInfoByGUID(targetGUID)) |
frame.icon:SetTexture(icon) |
frame.target:SetFormattedText("|cff%s%s|r", colors[class], targetGUID ~= pguid and string.sub(targetName, 0, 3) or "You!") |
if spellID == 114250 then |
local stacks = select(4, UnitAura("player", SELFLESSHEALER)) |
frame.target:SetFormattedText("|cff%s%s|r (%d)", colors[class], targetGUID ~= pguid and string.sub(targetName, 0, 3) or "You!", stacks or 0) |
else |
frame.target:SetFormattedText("|cff%s%s|r", colors[class], targetGUID ~= pguid and string.sub(targetName, 0, 3) or "You!") |
end |
if spellID ~= 53563 then |
frame.timer:SetFormattedText("%.0f", floor(duration)) |