Skip to content

Commit

Permalink
Classic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Aug 10, 2019
1 parent a1b7153 commit 5a85055
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions core/plugins_statusbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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%")
Expand Down

0 comments on commit 5a85055

Please sign in to comment.