tooltip: remove caption on invalid health values

This commit is contained in:
shagu
2020-06-24 13:07:04 +02:00
parent 3845e974e4
commit 97763d8db4
+4 -2
View File
@@ -155,10 +155,12 @@ pfUI:RegisterModule("tooltip", "vanilla:tbc", function ()
end
end
if C.tooltip.alwaysperc == "0" and ( estimated or hpmax > 100 or (round(hpmax/100*hp) ~= hp) ) then
if C.tooltip.alwaysperc == "0" and ( estimated or hpmax > 100 or round(hpmax/100*hp) ~= hp ) then
pfUI.tooltipStatusBar.HP:SetText(string.format("%s / %s", Abbreviate(rhp), Abbreviate(rhpmax)))
else
elseif hpmax > 0 then
pfUI.tooltipStatusBar.HP:SetText(string.format("%s%%", ceil(hp/hpmax*100)))
else
pfUI.tooltipStatusBar.HP:SetText("")
end
end)