From 28762f85ae393dc2b21d817ae00252709430fed0 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 24 Jul 2025 09:44:28 +0200 Subject: [PATCH] unitframes: move back to default mana text colors --- api/unitframes.lua | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 8f2d529d..2d30d609 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -2637,31 +2637,17 @@ function pfUI.uf.GetColor(self, preset) end elseif preset == "power" and config["powercolor"] == "1" then - local mana = config.defcolor == "0" and config.manacolor or C.unitframes.manacolor - local rage = config.defcolor == "0" and config.ragecolor or C.unitframes.ragecolor - local energy = config.defcolor == "0" and config.energycolor or C.unitframes.energycolor - local focus = config.defcolor == "0" and config.focuscolor or C.unitframes.focuscolor - - r, g, b = .5, .5, .5 - local utype = UnitPowerType(unitstr) - if utype == 0 then - r, g, b, a = GetStringColor(mana) - elseif utype == 1 then - r, g, b, a = GetStringColor(rage) - elseif utype == 2 then - r, g, b, a = GetStringColor(focus) - elseif utype == 3 then - r, g, b, a = GetStringColor(energy) - end + r = ManaBarColor[UnitPowerType(unitstr)].r + g = ManaBarColor[UnitPowerType(unitstr)].g + b = ManaBarColor[UnitPowerType(unitstr)].b elseif preset == "level" and config["levelcolor"] == "1" then r = GetDifficultyColor(UnitLevel(unitstr)).r g = GetDifficultyColor(UnitLevel(unitstr)).g b = GetDifficultyColor(UnitLevel(unitstr)).b end - -- pastel if C.unitframes.pastel == "1" then - r, g, b = (r + .5) * .5, (g + .5) * .5, (b + .5) * .5 + r, g, b = (r + .75) * .5, (g + .75) * .5, (b + .75) * .5 end return rgbhex(r,g,b)