mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-15 22:30:13 -05:00
- 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:
@ -20,21 +20,36 @@ function TargetCast.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function TargetCast.prototype:SpellCastInterruptible()
|
function TargetCast.prototype:SpellCastInterruptible(event, unit)
|
||||||
|
if unit and unit ~= self.unit then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
self.notInterruptible = false
|
self.notInterruptible = false
|
||||||
self:Redraw()
|
self:UpdateInterruptibleColor()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetCast.prototype:SpellCastNotInterruptible()
|
function TargetCast.prototype:SpellCastNotInterruptible(event, unit)
|
||||||
|
if unit and unit ~= self.unit then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
self.notInterruptible = true
|
self.notInterruptible = true
|
||||||
self:Redraw()
|
self:UpdateInterruptibleColor()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TargetCast.prototype:UpdateBar(scale, color, alpha)
|
function TargetCast.prototype:UpdateBar(scale, color, alpha)
|
||||||
TargetCast.super.prototype.UpdateBar(self, 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()
|
||||||
self.barFrame.bar:SetVertexColor(self:GetColor("CastNotInterruptible"))
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user