WoWInterface SVN Blessed

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 23 to Rev 24
    Reverse comparison

Rev 23 → Rev 24

trunk/Blessed/Options.lua
20,7 → 20,7
local function onEnter(self, ...)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT", self:GetWidth()/-4, 5)
GameTooltip:SetSpellByID(self.spellId)
GameTooltip:AddLine(self.spellId)
-- GameTooltip:AddLine(self.spellId)
GameTooltip:Show()
end
 
trunk/Blessed/Blessed.lua
29,6 → 29,7
[105809] = 18, -- Holy Avenger
[114250] = 15, -- Selfless Healer
[114163] = 30, -- Eternal Flame (yes, haste affects it...)
[90174] = 8, -- Divine Purpose
}
 
-- defaults
59,6 → 60,7
[105809] = true, -- Holy Avenger
[114250] = true, -- Selfless Healer
[114163] = true, -- Eternal Flame
[90174] = true, -- Divine Purpose
},
}
 
75,19 → 77,12
local INQUISITION = GetSpellInfo(84963)
local SELFLESSHEALER = GetSpellInfo(114250)
 
-- Look up class colors once, and then cache
local colors = setmetatable({
DEATHKNIGHT = "c41e3a",
DRUID = "ff7c0a",
HUNTER = "aad372",
MAGE = "68ccef",
PALADIN = "f48cba",
PRIEST = "ffffff",
ROGUE = "fff468",
SHAMAN = "0070dd",
WARLOCK = "9382c9",
WARRIOR = "c69b6d",
}, { __index = function()
return "ffffff"
}, { __index = function(tbl, index)
local classColor = string.sub(RAID_CLASS_COLORS[index].colorStr, 3, 8)
tbl[index] = classColor
return classColor or "ffffff"
end
})
 
246,21 → 241,21
 
-- Selfless healer
if (combatEvent == "SPELL_AURA_APPLIED_DOSE") then
self:RemoveFrame(spellID, true)
self:RemoveFrame(spellID, destGUID)
self:SetupIcon(spellID, destName, destGUID)
elseif (combatEvent == "SPELL_AURA_REMOVED") then
self:RemoveFrame(spellID, false)
self:RemoveFrame(spellID, destGUID)
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)
self:RemoveFrame(spellID, destGUID)
end
self:SetupIcon(spellID, destName, destGUID)
elseif (combatEvent == "SPELL_AURA_REFRESH") then
self:RemoveFrame(spellID, true)
self:RemoveFrame(spellID, destGUID)
self:SetupIcon(spellID, destName, destGUID)
end
end
280,11 → 275,11
end
 
-- Remove bar
function Blessed:RemoveFrame(spellID)
function Blessed:RemoveFrame(spellID, destGUID)
if #frames == 0 then return end
 
for i, frame in pairs(frames) do
if frame.id == spellID then
if frame.id == spellID and frame.guid == destGUID then
frame:Hide()
table.remove(frames, i)
table.insert(framePool, frame)
304,7 → 299,7
self.timer:SetFormattedText("%.0f", floor(self.duration))
 
if self.duration <= 0 then
Blessed:RemoveFrame(self.id)
Blessed:RemoveFrame(self.id, self.guid)
elseif self.duration <= 5 then
self.timer:SetTextColor(1, 0, 0)
end
350,16 → 345,16
-- Border
frame.border = frame:CreateTexture(nil, "OVERLAY")
frame.border:SetParent(frame)
frame.border:SetTexture('Interface\\AddOns\\Blessed\\simplesquare_roth')
frame.border:SetPoint('TOPRIGHT', frame, 2, 2)
frame.border:SetPoint('BOTTOMLEFT', frame, -2, -2)
frame.border:SetTexture("Interface\\AddOns\\Blessed\\simplesquare_roth")
frame.border:SetPoint("TOPRIGHT", frame, 2, 2)
frame.border:SetPoint("BOTTOMLEFT", frame, -2, -2)
frame.border:SetVertexColor(0.3, 0.3, 0.3)
 
return frame
end
 
-- Setup a timer
function Blessed:SetupIcon(spellID, targetName, targetGUID)
function Blessed:SetupIcon(spellID, destName, destGUID)
local frame = self:GetFrame()
local duration = durations[spellID]
 
368,20 → 363,19
end
 
local icon = select(3, GetSpellInfo(spellID))
local class = select(2, GetPlayerInfoByGUID(targetGUID))
local class = select(2, GetPlayerInfoByGUID(destGUID))
 
frame.icon:SetTexture(icon)
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)
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], targetGUID ~= pguid and string.sub(targetName, 0, 3) or "You!")
frame.target:SetFormattedText("|cff%s%s|r", colors[class], destGUID ~= pguid and string.sub(destName, 0, 3) or "You!")
end
 
if spellID ~= 53563 then
frame.timer:SetFormattedText("%.0f", floor(duration))
frame.timer:SetTextColor(1, 1, 1)
 
frame.duration = duration
frame.cd:SetCooldown(GetTime(), duration)
else
392,6 → 386,8
end
 
frame.id = spellID
frame.guid = destGUID
 
frame.update = 1
table.insert(frames, frame)