local _G = _G
BUFFS_PER_ROW = 16
local function buffstyle()
for i = 1, BUFF_ACTUAL_DISPLAY do
_G["BuffButton"..i]:SetHeight(sbuffs.btsize)
_G["BuffButton"..i]:SetWidth(sbuffs.btsize)
CreateBorder(_G["BuffButton"..i], 12, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1)
_G["BuffButton"..i.."Count"]:SetFont(sbuffs.font, sbuffs.fsize, sbuffs.ftags)
_G["BuffButton"..i.."Count"]:ClearAllPoints()
_G["BuffButton"..i.."Count"]:SetPoint(sbuffs.countpoint[1], _G["BuffButton"..i], sbuffs.countpoint[2], sbuffs.countpoint[3])
_G["BuffButton"..i.."Count"]:SetDrawLayer("OVERLAY")
_G["BuffButton"..i.."Duration"]:SetFont(sbuffs.font, sbuffs.fsize, sbuffs.ftags)
_G["BuffButton"..i.."Duration"]:ClearAllPoints()
_G["BuffButton"..i.."Duration"]:SetPoint(sbuffs.durpoint[1], _G["BuffButton"..i], sbuffs.durpoint[2], sbuffs.durpoint[3])
_G["BuffButton"..i.."Duration"]:SetDrawLayer("OVERLAY")
if _G["BuffButton"..i.."Border"] then _G["BuffButton"..i.."Border"]:Hide() end
_G["BuffButton1"]:ClearAllPoints()
_G["BuffButton1"]:SetPoint(sbuffs.buffspoint[1], sbuffs.buffspoint[2], sbuffs.buffspoint[3], sbuffs.buffspoint[4])
if i ~= 1 then
_G["BuffButton"..i]:ClearAllPoints()
_G["BuffButton"..i]:SetPoint("LEFT", _G["BuffButton"..i-1], (sbuffs.space-sbuffs.btsize), 0)
end
end
for a = 1, 3 do
_G["TempEnchant"..a]:SetWidth(sbuffs.Wbtsize)
_G["TempEnchant"..a]:SetHeight(sbuffs.Wbtsize)
_G["TempEnchant"..a.."Duration"]:SetFont(sbuffs.font, sbuffs.fsize, sbuffs.ftags)
_G["TempEnchant"..a.."Duration"]:ClearAllPoints()
_G["TempEnchant"..a.."Duration"]:SetPoint(sbuffs.Wdurpoint[1], _G["TempEnchant"..a], sbuffs.Wdurpoint[2], sbuffs.Wdurpoint[3])
_G["TempEnchant"..a.."Duration"]:SetDrawLayer("OVERLAY")
CreateBlankBorder(_G["TempEnchant"..a], 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
ColorBorder(_G["TempEnchant"..a], 153/255, 50/255, 204/255)
if _G["TempEnchant"..a.."Border"] then _G["TempEnchant"..a.."Border"]:Hide() end
_G["TempEnchant1"]:ClearAllPoints()
_G["TempEnchant1"]:SetPoint(sbuffs.Wbuffspoint[1], sbuffs.Wbuffspoint[2], sbuffs.Wbuffspoint[3], sbuffs.Wbuffspoint[4])
if a ~= 1 then
_G["TempEnchant"..a]:ClearAllPoints()
_G["TempEnchant"..a]:SetPoint("LEFT", _G["TempEnchant"..a-1], (sbuffs.space-sbuffs.Wbtsize), 0)
end
end
for k = 1, DEBUFF_ACTUAL_DISPLAY do
_G["DebuffButton"..k]:SetWidth(sbuffs.Dbtsize)
_G["DebuffButton"..k]:SetHeight(sbuffs.Dbtsize)
CreateBlankBorder(_G["DebuffButton"..k], 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
local _, _, _, _, type = UnitAura("player", index)
local color = DebuffTypeColor[type] or DebuffTypeColor.none
ColorBorder(_G["DebuffButton"..k], color.r * 0.6, color.g * 0.6, color.b * 0.6)
_G["DebuffButton"..k.."Count"]:SetFont(sbuffs.font, sbuffs.fsize, sbuffs.ftags)
_G["DebuffButton"..k.."Count"]:ClearAllPoints()
_G["DebuffButton"..k.."Count"]:SetPoint(sbuffs.Dcountpoint[1], _G["DebuffButton"..k], sbuffs.Dcountpoint[2], sbuffs.Dcountpoint[3])
_G["DebuffButton"..k.."Count"]:SetDrawLayer("OVERLAY")
_G["DebuffButton"..k.."Duration"]:SetFont(sbuffs.font, sbuffs.fsize, sbuffs.ftags)
_G["DebuffButton"..k.."Duration"]:ClearAllPoints()
_G["DebuffButton"..k.."Duration"]:SetPoint(sbuffs.Ddurpoint[1], _G["DebuffButton"..k], sbuffs.Ddurpoint[2], sbuffs.Ddurpoint[3])
_G["DebuffButton"..k.."Duration"]:SetDrawLayer("OVERLAY")
if _G["DebuffButton"..k.."Border"] then _G["DebuffButton"..k.."Border"]:Hide() end
_G["DebuffButton1"]:ClearAllPoints()
_G["DebuffButton1"]:SetPoint(sbuffs.Dbuffspoint[1], sbuffs.Dbuffspoint[2], sbuffs.Dbuffspoint[3], sbuffs.Dbuffspoint[4])
if k ~= 1 then
_G["DebuffButton"..k]:ClearAllPoints()
_G["DebuffButton"..k]:SetPoint("LEFT", _G["DebuffButton"..k-1], (sbuffs.space-sbuffs.Dbtsize), 0)
end
end
end
hooksecurefunc("AuraButton_Update", buffstyle)
SetCVar("consolidateBuffs", 0)
InterfaceOptionsBuffsPanelConsolidateBuffs:Hide()