- fixed the target cast bar to not freeze up and reset itself whenever a UNIT_SPELLCAST_INTERRUPTIBLE / UNIT_SPELLCAST_NOT_INTERRUPTIBLE event fires

This commit is contained in:
Parnic
2010-10-28 00:32:34 +00:00
parent 02a552b9ab
commit c3474db1fa

View File

@ -20,21 +20,36 @@ function TargetCast.prototype:Enable(core)
end
function TargetCast.prototype:SpellCastInterruptible()
function TargetCast.prototype:SpellCastInterruptible(event, unit)
if unit and unit ~= self.unit then
return
end
self.notInterruptible = false
self:Redraw()
self:UpdateInterruptibleColor()
end
function TargetCast.prototype:SpellCastNotInterruptible()
function TargetCast.prototype:SpellCastNotInterruptible(event, unit)
if unit and unit ~= self.unit then
return
end
self.notInterruptible = true
self:Redraw()
self:UpdateInterruptibleColor()
end
function TargetCast.prototype:UpdateBar(scale, color, alpha)
TargetCast.super.prototype.UpdateBar(self, scale, color, alpha)
self:UpdateInterruptibleColor()
end
if self.moduleSettings.displayNonInterruptible and self.notInterruptible then
function TargetCast.prototype:UpdateInterruptibleColor()
if self.moduleSettings.displayNonInterruptible then
if self.notInterruptible then
self.barFrame.bar:SetVertexColor(self:GetColor("CastNotInterruptible"))
else
self.barFrame.bar:SetVertexColor(self:GetColor(self:GetCurrentCastingColor()))
end
end
end