From d9571c66365d25b492c7a2bb7de94c717acba414 Mon Sep 17 00:00:00 2001 From: Parnic Date: Fri, 7 Nov 2014 00:41:26 -0600 Subject: [PATCH] Worked around a bug Blizzard created in 6.0 with cooldown wipes not updating alpha with their parent frame. See http://www.wowinterface.com/forums/showthread.php?t=49950 for discussion. --- modules/TargetInfo.lua | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/modules/TargetInfo.lua b/modules/TargetInfo.lua index 66f1dbe..b3ac3be 100644 --- a/modules/TargetInfo.lua +++ b/modules/TargetInfo.lua @@ -1669,6 +1669,19 @@ function IceTargetInfo.prototype:Update(unit) self:UpdateAlpha() end +function IceTargetInfo.prototype:UpdateAlpha() + IceTargetInfo.super.prototype.UpdateAlpha(self) + + -- Temp until Blizzard fixes their cooldown wipes. http://www.wowinterface.com/forums/showthread.php?t=49950 + for i = 1, #self.frame["buffFrame"].iconFrames do + self.frame["buffFrame"].iconFrames[i].cd:SetSwipeColor(0, 0, 0, self.alpha) + self.frame["buffFrame"].iconFrames[i].cd:SetDrawEdge(false) + end + for i = 1, #self.frame["debuffFrame"].iconFrames do + self.frame["debuffFrame"].iconFrames[i].cd:SetSwipeColor(0, 0, 0, self.alpha) + self.frame["debuffFrame"].iconFrames[i].cd:SetDrawEdge(false) + end +end function IceTargetInfo.prototype:OnEnter(frame) if self.moduleSettings.mouseTooltip then @@ -1685,13 +1698,24 @@ function IceTargetInfo.prototype:OnLeave(frame) self.frame.highLight:Hide() end - -function IceTargetInfo.prototype:BuffOnEnter(this) +function IceTargetInfo.prototype:AllowMouseBuffInteraction(id) if (not self:IsVisible()) then - return + return false end - if not self.unit or not this.id then + if not self.unit or not id then + return false + end + + if self.alpha == 0 then + return false + end + + return true +end + +function IceTargetInfo.prototype:BuffOnEnter(this) + if not self:AllowMouseBuffInteraction(this.id) then return end