From 5a8505577ed3a108633da6f469ecac8da3305f20 Mon Sep 17 00:00:00 2001 From: Tercioo Date: Sat, 10 Aug 2019 10:58:26 -0300 Subject: [PATCH] Classic fixes --- core/plugins_statusbar.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index 1902ccbfa..b09c2b258 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -1117,13 +1117,18 @@ do local instance = child.instance if (child.enabled and instance:IsEnabled()) then -- atualiza a threat - local isTanking, status, threatpct, rawthreatpct, threatvalue = _UnitDetailedThreatSituation ("player", "target") - if (threatpct) then - child.text:SetText (_math_floor (threatpct).."%") - if (Threat.isTank) then - child.text:SetTextColor (_math_abs (threatpct-100)*0.01, threatpct*0.01, 0, 1) + if (not DetailsFramework.IsClassicWow()) then + local isTanking, status, threatpct, rawthreatpct, threatvalue = _UnitDetailedThreatSituation ("player", "target") + if (threatpct) then + child.text:SetText (_math_floor (threatpct).."%") + if (Threat.isTank) then + child.text:SetTextColor (_math_abs (threatpct-100)*0.01, threatpct*0.01, 0, 1) + else + child.text:SetTextColor (threatpct*0.01, _math_abs (threatpct-100)*0.01, 0, 1) + end else - child.text:SetTextColor (threatpct*0.01, _math_abs (threatpct-100)*0.01, 0, 1) + child.text:SetText ("0%") + child.text:SetTextColor (1, 1, 1, 1) end else child.text:SetText ("0%")