Classic fixes

This commit is contained in:
Tercioo
2019-08-10 10:58:26 -03:00
parent a1b7153bfc
commit 5a8505577e
+11 -6
View File
@@ -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%")