Commit 5e199e85 authored by Darth Predator's avatar Darth Predator

Fixed coloring if color by type is enabled

parent e2d96c0c
......@@ -79,6 +79,14 @@ function UF:Update_PlayerFrame(frame, db)
local buffColor = UF.db.colors.auraBarBuff
local debuffColor = UF.db.colors.auraBarDebuff
if(E:CheckClassColor(buffColor.r, buffColor.g, buffColor.b)) then
buffColor = E.myclass == 'PRIEST' and E.PriestColors or RAID_CLASS_COLORS[E.myclass]
end
if(E:CheckClassColor(debuffColor.r, debuffColor.g, debuffColor.b)) then
debuffColor = E.myclass == 'PRIEST' and E.PriestColors or RAID_CLASS_COLORS[E.myclass]
end
local anchorPoint, anchorTo = 'BOTTOM', 'TOP'
if db.aurabar.anchorPoint == 'BELOW' then
anchorPoint, anchorTo = 'TOP', 'BOTTOM'
......@@ -89,7 +97,13 @@ function UF:Update_PlayerFrame(frame, db)
auraBars:SetPoint(anchorPoint..'RIGHT', auraBars.Holder, anchorTo..'RIGHT', -POWERBAR_OFFSET, 0)
auraBars.buffColor = {buffColor.r, buffColor.g, buffColor.b}
auraBars.debuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
if UF.db.colors.auraBarByType then
auraBars.debuffColor = nil;
auraBars.defaultDebuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
else
auraBars.debuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
auraBars.defaultDebuffColor = nil;
end
auraBars.down = db.aurabar.anchorPoint == 'BELOW'
auraBars:SetAnchors()
else
......@@ -131,6 +145,14 @@ function UF:Update_TargetFrame(frame, db)
local buffColor = UF.db.colors.auraBarBuff
local debuffColor = UF.db.colors.auraBarDebuff
if(E:CheckClassColor(buffColor.r, buffColor.g, buffColor.b)) then
buffColor = E.myclass == 'PRIEST' and E.PriestColors or RAID_CLASS_COLORS[E.myclass]
end
if(E:CheckClassColor(debuffColor.r, debuffColor.g, debuffColor.b)) then
debuffColor = E.myclass == 'PRIEST' and E.PriestColors or RAID_CLASS_COLORS[E.myclass]
end
local anchorPoint, anchorTo = 'BOTTOM', 'TOP'
if db.aurabar.anchorPoint == 'BELOW' then
anchorPoint, anchorTo = 'TOP', 'BOTTOM'
......@@ -141,7 +163,13 @@ function UF:Update_TargetFrame(frame, db)
auraBars:SetPoint(anchorPoint..'RIGHT', auraBars.Holder, anchorTo..'RIGHT')
auraBars.buffColor = {buffColor.r, buffColor.g, buffColor.b}
auraBars.debuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
if UF.db.colors.auraBarByType then
auraBars.debuffColor = nil;
auraBars.defaultDebuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
else
auraBars.debuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
auraBars.defaultDebuffColor = nil;
end
auraBars.down = db.aurabar.anchorPoint == 'BELOW'
auraBars:SetAnchors()
else
......@@ -183,6 +211,14 @@ function UF:Update_FocusFrame(frame, db)
local buffColor = UF.db.colors.auraBarBuff
local debuffColor = UF.db.colors.auraBarDebuff
if(E:CheckClassColor(buffColor.r, buffColor.g, buffColor.b)) then
buffColor = E.myclass == 'PRIEST' and E.PriestColors or RAID_CLASS_COLORS[E.myclass]
end
if(E:CheckClassColor(debuffColor.r, debuffColor.g, debuffColor.b)) then
debuffColor = E.myclass == 'PRIEST' and E.PriestColors or RAID_CLASS_COLORS[E.myclass]
end
local anchorPoint, anchorTo = 'BOTTOM', 'TOP'
if db.aurabar.anchorPoint == 'BELOW' then
anchorPoint, anchorTo = 'TOP', 'BOTTOM'
......@@ -193,7 +229,13 @@ function UF:Update_FocusFrame(frame, db)
auraBars:SetPoint(anchorPoint..'RIGHT', auraBars.Holder, anchorTo..'RIGHT', -POWERBAR_OFFSET, 0)
auraBars.buffColor = {buffColor.r, buffColor.g, buffColor.b}
auraBars.debuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
if UF.db.colors.auraBarByType then
auraBars.debuffColor = nil;
auraBars.defaultDebuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
else
auraBars.debuffColor = {debuffColor.r, debuffColor.g, debuffColor.b}
auraBars.defaultDebuffColor = nil;
end
auraBars.down = db.aurabar.anchorPoint == 'BELOW'
auraBars:SetAnchors()
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment