View Single Post
01-30-09, 06:53 PM   #594
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
Originally Posted by Alkar View Post
ok soo been messin with custom tags for health and that sort of thing but i want my heath to be like


1000/1000 then i lose some health and it would read 900/1000
this is the tag i have for the absolute value

Code:
oUF.Tags["[health1000hp]"] = function(unit)
  local m, n = UnitHealthMax(unit), UnitHealth(unit)
  return m == 0 and 0 or n ~= m and string.format("-%s|r", (m - n)) or m == n and m
end
oUF.TagEvents["[health1000hp]"] = "UNIT_HEALTH UNIT_MAXHEALTH"


soo not to sure what i would have to change to make it 1000/1000



Code:
oUF.Tags["[health1000hp]"] = function(unit)
  local m, n = UnitHealthMax(unit), UnitHealth(unit)
 return m == 0 and 0 or n <= m and string.format("%s/%s", n,m)
end
oUF.TagEvents["[health1000hp]"] = "UNIT_HEALTH UNIT_MAXHEALTH"