UnitPowerType
functionimplementedavailable in: camelot
Returns a number corresponding to the power type (e.g., mana, rage or energy) of the specified unit.
function UnitPowerType( unit: string, index: number): (PowerType?, string?, number?, number?, number?)Parameters
| name | type | description |
|---|---|---|
unit | string | The unit whose power type to query. |
index | number | Optional value for classes with multiple powerTypes. *Indexing is 0-based.* If not specified, information about the first (currently active) power type will be returned. Default: 0. |
Returns
| # | name | type | description |
|---|---|---|---|
| 1 | powerType | PowerType? | the ID corresponding the the unit's queried power type. |
| 2 | powerTypeToken | string? | also the power type: |
| 3 | rgbX | number? | Alternative red component for this power type, see details. Nil for most of the standard power types. |
| 4 | rgbY | number? | Alternative green component for this power type, see details. Nil for most of the standard power types. |
| 5 | rgbZ | number? | Alternative blue component for this power type, see details. Nil for most of the standard power types. |
Blizzard's documentation says it may return nothing.
In wowlua's emulated client
implementedwowlua models the system behind it. what the statuses mean
Restrictions
sources
Signature and flags: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (Unit system, camelot 1.60.1). Description: warcraft.wiki.gg's API pages ↗, by its contributors, CC BY-SA 4.0 ↗.