From 48f1ccfe9594cefcd2d4cc2c0ec3c3a2bf8c12d6 Mon Sep 17 00:00:00 2001 From: Parnic Date: Thu, 1 Apr 2010 16:04:45 +0000 Subject: [PATCH] - fixed the non-interruptible check to work for the target cast bar's TargetChanged event - fixed :Redraw from causing a cast bar to draw gray and stop updating (could happen if spell interruptibility changed mid-cast) --- IceCastBar.lua | 8 ++++++++ modules/TargetCast.lua | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/IceCastBar.lua b/IceCastBar.lua index 4cede91..46f2bb5 100644 --- a/IceCastBar.lua +++ b/IceCastBar.lua @@ -247,6 +247,14 @@ function IceCastBar.prototype:StopBar() self.frame:SetScript("OnUpdate", nil) end +-- make sure that our custom OnUpdate is restored whenever a Redraw happens +function IceCastBar.prototype:Redraw() + IceCastBar.super.prototype.Redraw(self) + + if self.action ~= IceCastBar.Actions.None then + self.frame:SetScript("OnUpdate", function() self:OnUpdate() end) + end +end function IceCastBar.prototype:GetShortRank(rank) if (rank) then diff --git a/modules/TargetCast.lua b/modules/TargetCast.lua index 1f6619b..2ed9330 100644 --- a/modules/TargetCast.lua +++ b/modules/TargetCast.lua @@ -67,7 +67,7 @@ function TargetCast.prototype:TargetChanged(unit) return end - local spell, _, _, _, _, _, _, notInterruptibleCast = UnitCastingInfo(self.unit) + local spell, _, _, _, _, _, _, _, notInterruptibleCast = UnitCastingInfo(self.unit) if (spell) then self.notInterruptible = notInterruptibleCast self:StartBar(IceCastBar.Actions.Cast)