WoW:API UnitHealthMax
Returns the maximal health of the specified unit, in percentage, for:
- target
- mouseover
Otherwise in points.
local max_health = UnitHealthMax(unit);
- Arguments
- (String unit)
- arg1
- the unit's max health to query
- Returns
- max_health
- max_health
- the maximum health of the specified unit
- Example
local max_health = UnitHealth("player");
local max_health2 = UnitHealth("target");
ChatFrame1:AddMessage('player max health: ' .. max_health);
ChatFrame1:AddMessage('target max health: ' .. max_health2 .. "%");
- Result
Prints the player's maximum health to the chat frame as 'player max health: 900' and 'taget max health: 100%'
- Description
- Returns the maximal health of the specified unit, in percentage, for:
- target
- mouseover
Otherwise in points.