View Single Post
08-03-12, 07:14 AM   #6
Farmbuyer
A Cyclonian
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 43
Originally Posted by Phanx View Post
(4) Less an efficiency issue and more a logic issue, but there are many power types other than the 0 for mana, 3 for energy, 1 for rage, 5 for runes, and 6 for runic power that you check for.
Also, they have useful names:
Code:
% grep SPELL_POWER FrameXML/Constants.lua
SPELL_POWER_MANA = 0;
SPELL_POWER_RAGE = 1;
SPELL_POWER_FOCUS = 2;
SPELL_POWER_ENERGY = 3;
SPELL_POWER_UNUSED = 4;
SPELL_POWER_RUNES = 5;
SPELL_POWER_RUNIC_POWER = 6;
SPELL_POWER_SOUL_SHARDS = 7;
SPELL_POWER_ECLIPSE = 8;
SPELL_POWER_HOLY_POWER = 9;
SPELL_POWER_ALTERNATE_POWER = 10;
%