Lua GetPowerType

From ArcEmu-Wiki
Jump to: navigation, search

Description

Returns a numerical value to indicate the type of power.

Power Types

POWER_TYPE_MANA			= 0
POWER_TYPE_RAGE			= 1
POWER_TYPE_FOCUS		= 2
POWER_TYPE_ENERGY		= 3
POWER_TYPE_HAPPINESS		= 4
POWER_TYPE_RUNES		= 5
POWER_TYPE_RUNIC_POWER		= 6

Usage/Examples

PowerTypes = {
[0] = "Mana", 
[1] = "Rage",
[2] = "Focus", 
[3] = "Energy", 
[4] = "Happiness",
[5] = "Runes",
[6] = "Runic Power"
}
 
function ReturnPowerType(pUnit)
print(PowerTypes[pUnit:GetPowerType()])
end

This will print the name of the power type in the console. For example: if the power type is 3 then the console will show Energy.

Personal tools