From 8689a1ec0672ba8e1c6bbcb06851899ae0382e87 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 17 Apr 2020 20:57:29 +0200 Subject: [PATCH] nameplates: only read level if it is shown --- modules/nameplates.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index f5f5e73d..02ed61a2 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -343,7 +343,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () local hp = plate.parent.healthbar:GetValue() local hpmin, hpmax = plate.parent.healthbar:GetMinMaxValues() local name = plate.parent.name:GetText() - local level = plate.parent.level:GetObjectType() == "FontString" and tonumber(plate.parent.level:GetText()) or "??" + local level = plate.parent.level:IsShown() and plate.parent.level:GetObjectType() == "FontString" and tonumber(plate.parent.level:GetText()) or "??" local class, _, elite, player = GetUnitData(name, true) local target = plate.cache.istarget local red, green, blue = plate.parent.healthbar:GetStatusBarColor()