Fixed issues with Rage and RunicPower classes
p3lim-52096 [02-10-09 - 16:02]
Fixed issues with Rage and RunicPower classes
git-svn-id: svn://svn.wowinterface.com/oUF_BarFader-229/trunk@18 cbe42a47-3b53-4817-a5a9-47e79666164c
diff --git a/oUF_BarFader/oUF_BarFader.lua b/oUF_BarFader/oUF_BarFader.lua
index fab267d..d37625b 100644
--- a/oUF_BarFader/oUF_BarFader.lua
+++ b/oUF_BarFader/oUF_BarFader.lua
@@ -8,6 +8,7 @@
--]]
local function Validation(self, unit)
+ local num, str = UnitPowerType(unit)
if(self.Castbar and (self.Castbar.casting or self.Castbar.channeling)) then
return false
elseif(UnitAffectingCombat(unit)) then
@@ -18,9 +19,9 @@ local function Validation(self, unit)
return false
elseif(UnitHealth(unit) < UnitHealthMax(unit)) then
return false
- elseif((UnitPowerType(unit) == 6 or UnitPowerType(unit) == 1) and UnitMana(unit) > 0) then
+ elseif((str == 'RAGE' or str == 'RUNIC_POWER') and UnitPower(unit) > 0) then
return false
- elseif(UnitMana(unit) < UnitManaMax(unit)) then
+ elseif((str ~= 'RAGE' and str ~= 'RUNIC_POWER') and UnitMana(unit) < UnitManaMax(unit)) then
return false
end