/
## Interface: 50300 |
## Interface: 50200 |
## Title: Blessed |
## Notes: Track Paladin stuff |
## Author: Ailae of Emeriss-EU |
## Version: 50300.1 |
## Version: 50200.1 |
## SavedVariables: BlessedDB |
Blessed.lua |
[54428] = 9, -- Divine Plea |
[31821] = 6, -- Devotion Aura |
[84963] = 10, -- Inquisition |
[88819] = 10, -- Daybreak |
[88819] = 6, -- Daybreak |
[94686] = 8, -- Supplication |
[54149] = 15, -- Infusion of Light |
[31884] = 20, -- Avenging Wrath |
local INQUISITION = GetSpellInfo(84963) |
local SELFLESSHEALER = GetSpellInfo(114250) |
local DAYBREAK = GetSpellInfo(88819) |
-- Return for anything unknown |
local colors = setmetatable({ |
-- Force lock on login |
if not db.locked then db.locked = true end |
local _, class = UnitClass("player") |
local class = select(2, UnitClass("player")) |
if class == "PALADIN" then -- only do stuff if player is a paladin |
self:RegisterEvent("PLAYER_ENTERING_WORLD") |
self:Init() |
-- Check talents for updates (Hand of Freedom) |
function Blessed:UpdateDurations() |
-- Sanctified Wrath increases duration of Avenging Wrath |
local _, _, _, _, wrath = GetTalentInfo(14) |
if wrath then durations[31884] = 30 end |
if select(5, GetTalentInfo(14)) then |
durations[31884] = 30 |
end |
-- Glyph of Inquisition |
for i=1, NUM_GLYPH_SLOTS do |
local _, _, _, glyph = GetGlyphSocketInfo(i) |
local glyph = select(4, GetGlyphSocketInfo(i)) |
if glyph == 63225 then |
durations[84963] = 20 |
end |
-- Always get rid of Beacon, to avoid duplicates due to being in different realms |
if spellID == 53563 then |
self:RemoveFrame(spellID, nil) |
self:RemoveFrame(spellID, destGUID) |
end |
self:SetupIcon(spellID, destName, destGUID) |
elseif (combatEvent == "SPELL_AURA_REFRESH") then |
for i, frame in pairs(frames) do |
frame:ClearAllPoints() |
if i > 1 then |
frame:SetPoint("LEFT", frames[i - 1], "RIGHT", iconSize/2, 0) |
frame:SetPoint("LEFT", frames[i - 1], "RIGHT", 15, 0) |
else |
frame:SetPoint("CENTER", self.frame, "CENTER") |
end |
if #frames == 0 then return end |
for i, frame in pairs(frames) do |
if frame.id == spellID and (frame.guid == destGUID or not destGUID) then |
if frame.id == spellID and frame.guid == destGUID then |
frame:Hide() |
table.remove(frames, i) |
table.insert(framePool, frame) |
local duration = durations[spellID] |
if spellID == 84963 then |
local _, _, _, _, _, d = UnitAura("player", INQUISITION) |
duration = d |
duration = select(6, UnitAura("player", INQUISITION)) |
end |
local _, _, icon = GetSpellInfo(spellID) |
local _, class = GetPlayerInfoByGUID(destGUID) |
local icon = select(3, GetSpellInfo(spellID)) |
local class = select(2, GetPlayerInfoByGUID(destGUID)) |
frame.icon:SetTexture(icon) |
if spellID == 114250 then |
local _, _, _, stacks = UnitAura("player", SELFLESSHEALER) |
local stacks = select(4, UnitAura("player", SELFLESSHEALER)) |
frame.target:SetFormattedText("|cff%s%s|r (%d)", colors[class], destGUID ~= pguid and string.sub(destName, 0, 3) or "You!", stacks or 0) |
elseif spellID == 88819 then |
local _, _, _, stacks = UnitAura("player", DAYBREAK) |
frame.target:SetFormattedText("|cff%s%s|r (%d)", colors[class], destGUID ~= pguid and string.sub(destName, 0, 3) or "You!", stacks or 0) |
else |
frame.target:SetFormattedText("|cff%s%s|r", colors[class], destGUID ~= pguid and string.sub(destName, 0, 3) or "You!") |
end |