From 7a5fa3fde7550b9cd963e32135b4b77406d8e52f Mon Sep 17 00:00:00 2001 From: Parnic Date: Fri, 15 Feb 2008 15:13:47 +0000 Subject: [PATCH] - fixed bar transparency when going in and out of combat...hooray OOP! --- modules/PlayerHealth.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/PlayerHealth.lua b/modules/PlayerHealth.lua index ceabe16..8bb9eb3 100644 --- a/modules/PlayerHealth.lua +++ b/modules/PlayerHealth.lua @@ -557,11 +557,11 @@ function PlayerHealth.prototype:Resting() self.frame.statusIcon = self:CreateTexCoord(self.frame.statusIcon, "Interface\\CharacterFrame\\UI-StateIcon", 20, 20, self.moduleSettings.statusIconScale, 0.0625, 0.4475, 0.0625, 0.4375) self:SetTexLoc(self.frame.statusIcon, self.moduleSettings.statusIconOffset['x'], self.moduleSettings.statusIconOffset['y']) - elseif not self.moduleSettings.showStatusIcon and self.frame.statusIcon and not UnitAffectingCombat(self.unit) then + elseif not self.moduleSettings.showStatusIcon and self.frame.statusIcon and not self.combat then self.frame.statusIcon = self:DestroyTexFrame(self.frame.statusIcon) end else - if not UnitAffectingCombat(self.unit) and self.frame.statusIcon then + if not self.combat and self.frame.statusIcon then self.frame.statusIcon = self:DestroyTexFrame(self.frame.statusIcon) end end @@ -571,7 +571,9 @@ end function PlayerHealth.prototype:CheckCombat() - if UnitAffectingCombat(self.unit) or configMode then + PlayerHealth.super.prototype.CheckCombat(self) + + if self.combat or configMode then if (configMode or self.moduleSettings.showStatusIcon) and not self.frame.statusIcon then self.frame.statusIcon = self:CreateTexCoord(self.frame.statusIcon, "Interface\\CharacterFrame\\UI-StateIcon", 20, 20, self.moduleSettings.statusIconScale, 0.5625, 0.9375, 0.0625, 0.4375)