- updated all UnitPower* code to use the SPELL_POWER_* constants instead of hardcoding numbers...mostly just a readability change

This commit is contained in:
Parnic
2010-09-10 01:50:43 +00:00
parent 22fd66d756
commit 8d4686f10c
7 changed files with 27 additions and 55 deletions

View File

@ -68,19 +68,19 @@ function FocusMana.prototype:Update(unit)
else
self:Show(true)
end
local manaType = UnitPowerType(self.unit)
local color = "FocusMana"
if (self.moduleSettings.scaleManaColor) then
color = "ScaledManaColor"
end
if (manaType == 1) then
if (manaType == SPELL_POWER_RAGE) then
color = "FocusRage"
elseif (manaType == 2) then
elseif (manaType == SPELL_POWER_FOCUS) then
color = "FocusFocus"
elseif (manaType == 3) then
elseif (manaType == SPELL_POWER_ENERGY) then
color = "FocusEnergy"
end