From 6042e721c799320ba6416f666bd34cec08ec1c98 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 3 May 2020 14:08:56 +0200 Subject: [PATCH] nameplates: detect server sent values below 100 --- modules/nameplates.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index f42e2087..1efb5046 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -395,13 +395,13 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () if C.nameplates.showhp == "1" then local rhp, rhpmax, estimated - if hpmax > 100 then + if hpmax > 100 or (round(hpmax/100*hp) ~= hp) then rhp, rhpmax = hp, hpmax elseif pfUI.libhealth and pfUI.libhealth.enabled then rhp, rhpmax, estimated = pfUI.libhealth:GetUnitHealthByName(name,level,tonumber(hp),tonumber(hpmax)) end - if C.nameplates.alwaysperc == "0" and ( estimated or hpmax > 100 ) then + if C.nameplates.alwaysperc == "0" and ( estimated or hpmax > 100 or (round(hpmax/100*hp) ~= hp) ) then plate.health.text:SetText(string.format("%s / %s", Abbreviate(rhp), Abbreviate(rhpmax))) else plate.health.text:SetText(string.format("%s%%", hp))