This used to work fine, now it won't. What's changed?
Code:
local lfdrole = CreateFrame("StatusBar", nil, self)
lfdrole:SetStatusBarTexture(sett1ngs.texture)
lfdrole:SetFrameStrata("MEDIUM")
lfdrole:SetFrameLevel(4)
lfdrole:SetHeight(sett1ngs.cicon)
lfdrole:SetWidth(sett1ngs.cicon)
lfdrole:SetPoint("BOTTOMLEFT", -1, -4)
lfdrole:SetStatusBarColor(1, 1, 1)
lfdrole.bd = SetBD(lfdrole, backdrop, {0,0,0,1}, "MEDIUM")
lfdrole.Update = function(self, event)
local role = self.LFDRole
local isTank, isHealer, isDamage = UnitGroupRolesAssigned(self.unit)
if isTank then
role:SetStatusBarColor(0, .7, 1)
role:Show()
elseif isHealer then
role:SetStatusBarColor(0, 1, 0)
role:Show()
elseif isDamage then
role:SetStatusBarColor(1, 0, 0)
role:Show()
else
role:Hide()
end
end
self.LFDRole = lfdrole