WoW:PowerType: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page, some information may need to be updated later (such as holy power ranges))
 
Line 20: Line 20:
== Others ==
== Others ==
There are two other types, AMMOSLOT and FUEL, as returned by {api UnitPowerType|UnitPowerType}.  These are used by vehicles, but do not appear to have a constant associated with them.
There are two other types, AMMOSLOT and FUEL, as returned by {api UnitPowerType|UnitPowerType}.  These are used by vehicles, but do not appear to have a constant associated with them.
Some raid bosses have a special "encounter meter" which is sometime based on a powertype (ex. Atramedes, powertype=10 rises during the fight)


== Notes ==
== Notes ==
* The differentiation between these power types in the API was added in patch 4.0
* The differentiation between these power types in the API was added in patch 4.0

Revision as of 08:26, 3 January 2011

API types

Many of the API functions which are used to gather information about a unit in the game world (Players, NPC's, Monsters, etc) will return information about types of powers that various units use as a basis for using abilities.

Constants

These are found in FrameXML\Constants.lua.

SPELL_POWER_MANA = 0
Mana will range from 0 to the maximum mana a unit has. Player mana pools are calculated based on a base mana pool plus a certain amount given by the Intellect stat. This is the default power type for most non-player units, although there are exceptions.
SPELL_POWER_RAGE = 1
Rage is used by Warriors and Druids in bear form. Rage goes from 0 to 100, but may be increased via player talents. Rage degenerates back to 0 out of combat.
SPELL_POWER_FOCUS = 2
Focus is used by Hunters and hunter pets. Focus goes from 0 to 100, and has a slow regeneration rate, but certain abilities will generate focus.
SPELL_POWER_ENERGY = 3
Energy is used by Rogues and Druids in cat form. Energy goes from 0 to 100, but may be increased via player talents.
SPELL_POWER_HAPPINESS = 4
Happiness goes from 0 to 100, is used by hunter pets, and affects their damage output. Happiness can be increased by the spells Mend Pet or Feed Pet via a minor glyph.
SPELL_POWER_RUNES = 5
Runes are used as a power type for Death Knights. By default, they have 6 runes (1 & 2 are blood, 3 & 4 are frost, 5 & 6 are unholy), but certain talents and abilities may change the type of a rune. Runes can be converted into a Death Rune, which can be used as any other type of rune.
SPELL_POWER_RUNIC_POWER = 6
Runic power is used by Death Knights. It is gained via certain abilities, and does not degenerate out of combat.
SPELL_POWER_SOUL_SHARDS = 7
Soul Shards are collected by Warlocks, and range from 0 to 3 indicating how many are available. Soul Shards do not degenerate out of combat.
SPELL_POWER_ECLIPSE = 8
Eclipse is used by Druids in moonkin form. Eclipse power goes from 0 to 100, and its use as solar or lunar power is determined by what buff is active on the player.
SPELL_POWER_HOLY_POWER = 9
Holy power is used by Paladins.

Others

There are two other types, AMMOSLOT and FUEL, as returned by {api UnitPowerType|UnitPowerType}. These are used by vehicles, but do not appear to have a constant associated with them. Some raid bosses have a special "encounter meter" which is sometime based on a powertype (ex. Atramedes, powertype=10 rises during the fight)

Notes

  • The differentiation between these power types in the API was added in patch 4.0