Okay I am working on a bit more of a modular buff tracker and all but having a problem where the window doesn't hide, any ideas what I am doing wrong?
Code:
{ name = "PriestWatchBuff",
-- "PRIEST BUFF TO WATCH"
anchor_to = "CENTER", anchor_from = "CENTER", y_off = -190,
bg_color = "0 0 0", border = "SOLID", border_color = "CLASS", border_alpha = 1,
height = 30, width = 300,
text = { size = 13, color = "CLASS", outline = 1 },
OnUpdate = function(self, u)
self.elapsed = self.elapsed + u
local class = UnitClass("player");
local Fortitude = UnitAura("player", "Power Word: Fortitude") or UnitAura("player", "Prayer of Fortitude")
local Spirit = UnitAura("player", "Divine Spirit") or UnitAura("player", "Prayer of Spirit")
local InnerFire = UnitAura("player", "Inner Fire")
if ( class == "PRIEST" ) and Fortitude and Spirit and InnerFire then
self:Hide()
self:SetAlpha(0)
self.bg:SetAlpha(0)
else
self:Show()
self:SetAlpha(1)
self.bg:SetAlpha(0.8)
local missing, active = "|cffffffff", "|cff000000"
self.text:SetFormattedText("%sFortitude %sSpirit %sInner Fire", Fortitude and active or missing, Spirit and active or missing, InnerFire and active or missing)
update = 1
end
end,
},