WoW API: UnitPowerMax

From AddOn Studio
Revision as of 11:41, 15 February 2009 by WoWWiki>Driizt BB (New page: {{wowapi}} Returns the power level of the specified unit. As of 3.0, this function has replaced UnitManaMax as the preferred method of obtaining maximum unit power. ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < UnitPowerMax

Returns the maximum power level of the specified unit. As of 3.0, this function has replaced UnitManaMax as the preferred method of obtaining maximum unit power.


Usage
local maxpower = UnitPowerMax("unit" [, type]);

Arguments
unit
String - The UnitId of the unit whose maximum power should be returned
type
Number (optional) - The power type of the unit whose maximum power should be returned (see UnitPowerType for a list of valid types)

Returns
maxpower
Number - the unit's maximum power level

Details
If no type is specified, UnitPowerMax returns the current primary type, e.g., energy for a druid in cat form. You can determine the current power type via UnitPowerType. However, values for all power types are available in any form.