10-08-11, 04:01 PM
|
#3
|
A Fallenroot Satyr
Join Date: Aug 2009
Posts: 29
|
Originally Posted by ALZA
Code:
function(unit, unitOwner)
local maxHealth = UnitHealthMax(unit)
if( maxHealth <= 0 ) then
return "0.0%"
end
local healthPerc = UnitHealth(unit) / maxHealth * 100
if( healthPerc > 50) then
return format("%.0f%%", healthPerc)
else
return format("%.1f%%", healthPerc)
end
end
|
thanks alot
__________________
|
|
|