mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Fixed a problem with cast bar disappearing when seals activate during cast
This commit is contained in:
@ -10,6 +10,7 @@ IceCastBar.prototype.actionStartTime = nil
|
||||
IceCastBar.prototype.actionDuration = nil
|
||||
IceCastBar.prototype.actionMessage = nil
|
||||
IceCastBar.prototype.unit = nil
|
||||
IceCastBar.prototype.current = nil
|
||||
|
||||
|
||||
-- Constructor --
|
||||
@ -207,22 +208,30 @@ function IceCastBar.prototype:SpellCastSent(unit, spell, rank, target)
|
||||
end
|
||||
|
||||
|
||||
function IceCastBar.prototype:SpellCastStart(unit)
|
||||
function IceCastBar.prototype:SpellCastStart(unit, spell, rank)
|
||||
if (unit ~= self.unit) then return end
|
||||
--IceHUD:Debug("SpellCastStart", unit, UnitCastingInfo(unit))
|
||||
IceHUD:Debug("SpellCastStart", unit, spell, rank)
|
||||
--UnitCastingInfo(unit)
|
||||
|
||||
self:StartBar(IceCastBar.Actions.Cast)
|
||||
self.current = spell
|
||||
end
|
||||
|
||||
function IceCastBar.prototype:SpellCastStop(unit)
|
||||
function IceCastBar.prototype:SpellCastStop(unit, spell, rank)
|
||||
if (unit ~= self.unit) then return end
|
||||
--IceHUD:Debug("SpellCastStop", unit)
|
||||
--IceHUD:Debug("SpellCastStop", unit, spell, self.current)
|
||||
|
||||
-- ignore if not coming from current spell
|
||||
if (self.current and self.current ~= spell) then
|
||||
return
|
||||
end
|
||||
|
||||
if (self.action ~= IceCastBar.Actions.Success and
|
||||
self.action ~= IceCastBar.Actions.Failure and
|
||||
self.action ~= IceCastBar.Actions.Channel)
|
||||
then
|
||||
self:StopBar()
|
||||
self.current = nil
|
||||
end
|
||||
end
|
||||
|
||||
@ -231,6 +240,8 @@ function IceCastBar.prototype:SpellCastFailed(unit)
|
||||
if (unit ~= self.unit) then return end
|
||||
--IceHUD:Debug("SpellCastFailed", unit)
|
||||
|
||||
self.current = nil
|
||||
|
||||
-- determine if we want to show failed casts
|
||||
if (self.moduleSettings.flashFailures == "Never") then
|
||||
return
|
||||
@ -247,6 +258,8 @@ function IceCastBar.prototype:SpellCastInterrupted(unit)
|
||||
if (unit ~= self.unit) then return end
|
||||
--IceHUD:Debug("SpellCastInterrupted", unit)
|
||||
|
||||
self.current = nil
|
||||
|
||||
self:StartBar(IceCastBar.Actions.Failure, "Interrupted")
|
||||
end
|
||||
|
||||
@ -272,6 +285,11 @@ function IceCastBar.prototype:SpellCastSucceeded(unit, spell, rank)
|
||||
if (self.action == IceCastBar.Actions.Channel) then
|
||||
return
|
||||
end
|
||||
|
||||
-- ignore if not coming from current spell
|
||||
if (self.current and self.current ~= spell) then
|
||||
return
|
||||
end
|
||||
|
||||
-- show after normal successfull cast
|
||||
if (self.action == IceCastBar.Actions.Cast) then
|
||||
|
@ -172,8 +172,8 @@ end
|
||||
|
||||
|
||||
-- OVERRIDE
|
||||
function CastBar.prototype:SpellCastStart(unit)
|
||||
CastBar.super.prototype.SpellCastStart(self, unit)
|
||||
function CastBar.prototype:SpellCastStart(unit, spell, rank)
|
||||
CastBar.super.prototype.SpellCastStart(self, unit, spell, rank)
|
||||
if (unit ~= self.unit) then return end
|
||||
|
||||
local lag = GetTime() - self.spellCastSent
|
||||
|
Reference in New Issue
Block a user