ttHealth:SetFormattedText("%d / %d", hp, maxhp) |
elseif db.textformat == "100%" then |
per = (hp/maxhp) * 100 |
--if per >= 0 then --gives funny negative numbers when tooltip fades |
if per <= 100 then --gives maxhp of 1 sometimes when tooltip fades? |
ttHealth:SetFormattedText("%d%%", per) |
--end |
end |
elseif db.textformat == "100/100 (100%)" then |
per = (hp/maxhp) * 100 |
--if per >= 0 then |
if per <= 100 then |
ttHealth:SetFormattedText("%d / %d (%d%%)", hp, maxhp, per) |
--end |
end |
elseif db.textformat == "1.2k/1.2k" then |
hpformat, maxhpformat = "%.1f", "%.1f" |
if hp >= 1000000 then |