From 3ff448dcd2ef18866d3fe00411c28aa2dccc7717 Mon Sep 17 00:00:00 2001 From: p3lim-52096 Date: Tue, 10 Feb 2009 16:02:10 +0000 Subject: [PATCH] Fixed issues with Rage and RunicPower classes git-svn-id: svn://svn.wowinterface.com/oUF_BarFader-229/trunk@18 cbe42a47-3b53-4817-a5a9-47e79666164c --- oUF_BarFader/oUF_BarFader.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 1.7.9.5