Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function(unit)
- if UnitHealth(unit) >= 1e6 then
- return ("%.1fm"):format(UnitHealth(unit) / 1e6):gsub("%.?0+([km])$", "%1")
- elseif UnitHealth(unit) >= 1e3 or value <= -1e3 then
- return ("%.1fk"):format(UnitHealth(unit) / 1e3):gsub("%.?0+([km])$", "%1")
- else
- return UnitHealth(unit)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement