# Method Unit:GetPower [-] [+]

Returns the Unit's power amount for given power type.

    enum Powers
    {
        POWER_MANA        = 0,
        POWER_RAGE        = 1,
        POWER_FOCUS       = 2,
        POWER_ENERGY      = 3,
        POWER_HAPPINESS   = 4,
        POWER_RUNE        = 5,
        POWER_RUNIC_POWER = 6,
        MAX_POWERS        = 7,
        POWER_ALL         = 127,         // default for class?
        POWER_HEALTH      = 0xFFFFFFFE   // (-2 as signed value)
    };

## Synopsis

`powerAmount = Unit:GetPower( type )`

## Arguments

`number type`

  Valid numbers: integers from -2,147,483,647 to 2,147,483,647.

## Returns

`number powerAmount`

  Valid numbers: integers from 0 to 4,294,967,295.

# Keyboard shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

# Search tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct` (or `str`), `enum`, `trait`, `typedef` (or `tdef`).

Generated on
© 2010 - 2024 Eluna Lua Engine