Quantcast

Added frequentUpdates to health|power

p3lim-52096 [10-17-08 - 13:28]
Added frequentUpdates to health|power
Fixed pet power color

git-svn-id: svn://svn.wowinterface.com/oUF_P3lim-52/trunk@37 8c7459ed-49dc-4bc8-85d7-b6381a8f5413
Filename
oUF_P3lim/oUF_P3lim.lua
diff --git a/oUF_P3lim/oUF_P3lim.lua b/oUF_P3lim/oUF_P3lim.lua
index 131b7bf..6902a06 100644
--- a/oUF_P3lim/oUF_P3lim.lua
+++ b/oUF_P3lim/oUF_P3lim.lua
@@ -82,8 +82,8 @@ local function PostUpdatePower(self, event, unit, bar, min, max)
 		end

 		local _, ptype = UnitPowerType(unit)
-		local color = self.colors.power[ptype]
-		bar.Text:SetTextColor(color[1], color[2], color[3])
+		local color = self.colors.power[ptype] or self.colors.health
+		if(color) then bar.Text:SetTextColor(color[1], color[2], color[3]) end
 	end

 	UpdateInfoColor(self, unit)
@@ -131,7 +131,7 @@ local function CreateStyle(self, unit)
 	self.Health:SetPoint('TOPLEFT', self)
 	self.Health:SetStatusBarTexture(texture)
 	self.Health:SetHeight(22)
---	self.Health.frequentUpdates = true
+	self.Health.frequentUpdates = true

 	self.Health.Text = self.Health:CreateFontString(nil, 'OVERLAY', 'GameFontHighlightSmall')
 	self.Health.Text:SetPoint('RIGHT', self.Health, -2, -1)
@@ -146,7 +146,7 @@ local function CreateStyle(self, unit)
 	self.Power:SetPoint('TOPLEFT', self.Health, 'BOTTOMLEFT', 0, -1)
 	self.Power:SetStatusBarTexture(texture)
 	self.Power:SetHeight(4)
---	self.Power.frequentUpdates = true
+	self.Power.frequentUpdates = true

 	self.Power.colorTapping = true
 	self.Power.colorDisconnected = true