WoW:API UnitPower: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Changed page to reference the new powerType page.)
No edit summary
Line 1: Line 1:
{{wowapi}}
{{wowapi}}
Returns the power level of the specified unit.
Returns the power level of the specified unit.
  power = UnitPower("unit" [, powerType]);
  power = UnitPower("unit" , powerType);


==Arguments==
==Arguments==

Revision as of 12:21, 20 January 2013

WoW API < UnitPower

Returns the power level of the specified unit.

power = UnitPower("unit" , powerType);

Arguments

UnitId
String - The UnitID of the unit whose power should be returned
powerType
Number (optional) - The power type of the unit whose power should be returned

Returns

power
Number - the unit's current power level.

Type

If Type is omitted or nil, UnitPower returns the current primary type, e.g., energy for a druid in cat form. You can determine the current power type via UnitPowerType. Values for all power types are available in any form.

Also See