Absolute health:
local s = Status(unit)
if s then
return " "
elseif HP(unit) == MaxHP(unit) then
return "%s", Short(MaxHP(unit), true)
else
return "%s / %s",Short(HP(unit),true),Short(MaxHP(unit),true)
end
Name:
local abbr = Name(unit)
if abbr:len() > 20 and abbr:find(" ") then
abbr = abbr:gsub("([^ ]+) +",
function(text)
return text:sub(1,1) .. ". "
end)
end
return "%s", abbr;
Health (Percentage):
local s = Status(unit)
if s then
return s
elseif HP(unit) == MaxHP(unit) then
return " "
else
return "%s%%",Percent(HP(unit),MaxHP(unit))
end
Power:
local max = MaxPower(unit)
if max > 0 then
if Power(unit) == max then
return "%s", Short(Power(unit),true)
else
return "%s / %s",Short(Power(unit),true),Short(max,true)
end
end