unitframes: only show percentage for mana type

This commit is contained in:
bidaumm
2020-08-18 07:04:35 -07:00
committed by shagu
parent d91224a73b
commit 79b30bd329
+2 -1
View File
@@ -2179,7 +2179,8 @@ function pfUI.uf:GetStatusValue(unit, pos)
return unit:GetColor("power") .. pfUI.api.Abbreviate(power)
end
elseif config == "powerdyn" then
if mp ~= mpmax then
-- show percentage when only mana is less than 100%
if mp ~= mpmax and UnitPowerType(unitstr) == 0 then
return unit:GetColor("power") .. pfUI.api.Abbreviate(mp) .. " - " .. ceil(mp / mpmax * 100) .. "%"
else
return unit:GetColor("power") .. pfUI.api.Abbreviate(mp)