mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Fixed castbar interruption on 7.0 clients
Looks like some things changed in spellcast events on 7.0 which necessitate using the spellcast GUID to identify when a specific cast starts or stops. Now we use those GUIDs which restores the castbar to its appropriate behavior. (ticket #215)
This commit is contained in:
@ -413,30 +413,30 @@ end
|
|||||||
-- NORMAL SPELLS --
|
-- NORMAL SPELLS --
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastSent(event, unit, spell, rank, target)
|
function IceCastBar.prototype:SpellCastSent(event, unit, spell, rank, target, lineId)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
IceHUD:Debug("SpellCastSent", unit, spell, rank, target)
|
IceHUD:Debug("SpellCastSent", unit, spell, rank, target, lineId)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastChanged(event, arg1)
|
function IceCastBar.prototype:SpellCastChanged(event, arg1)
|
||||||
IceHUD:Debug("SpellCastChanged", arg1)
|
IceHUD:Debug("SpellCastChanged", arg1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastStart(event, unit, spell, rank)
|
function IceCastBar.prototype:SpellCastStart(event, unit, spell, rank, lineId, spellId)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
IceHUD:Debug("SpellCastStart", unit, spell, rank)
|
IceHUD:Debug("SpellCastStart", unit, spell, rank, lineId, spellId)
|
||||||
--UnitCastingInfo(unit)
|
--UnitCastingInfo(unit)
|
||||||
|
|
||||||
self:StartBar(IceCastBar.Actions.Cast)
|
self:StartBar(IceCastBar.Actions.Cast)
|
||||||
self.current = spell
|
self.current = lineId
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastStop(event, unit, spell, rank)
|
function IceCastBar.prototype:SpellCastStop(event, unit, spell, rank, lineId, spellId)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
IceHUD:Debug("SpellCastStop", unit, spell, self.current)
|
IceHUD:Debug("SpellCastStop", unit, spell, self.current, rank, lineId, spellId)
|
||||||
|
|
||||||
-- ignore if not coming from current spell
|
-- ignore if not coming from current spell
|
||||||
if (self.current and spell and self.current ~= spell) then
|
if (self.current and lineId and self.current ~= lineId) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -450,12 +450,12 @@ function IceCastBar.prototype:SpellCastStop(event, unit, spell, rank)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastFailed(event, unit, spell, rank)
|
function IceCastBar.prototype:SpellCastFailed(event, unit, spell, rank, lineId, spellId)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
IceHUD:Debug("SpellCastFailed", unit, self.current)
|
IceHUD:Debug("SpellCastFailed", unit, self.current, lineId, spellId)
|
||||||
|
|
||||||
-- ignore if not coming from current spell
|
-- ignore if not coming from current spell
|
||||||
if (self.current and spell and self.current ~= spell) then
|
if (self.current and lineId and self.current ~= lineId) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -478,12 +478,12 @@ function IceCastBar.prototype:SpellCastFailed(event, unit, spell, rank)
|
|||||||
self:StartBar(IceCastBar.Actions.Failure, "Failed")
|
self:StartBar(IceCastBar.Actions.Failure, "Failed")
|
||||||
end
|
end
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastInterrupted(event, unit, spell, rank)
|
function IceCastBar.prototype:SpellCastInterrupted(event, unit, spell, rank, lineId, spellId)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
IceHUD:Debug("SpellCastInterrupted", unit, self.current)
|
IceHUD:Debug("SpellCastInterrupted", unit, self.current, lineId, spellId)
|
||||||
|
|
||||||
-- ignore if not coming from current spell
|
-- ignore if not coming from current spell
|
||||||
if (self.current and spell and self.current ~= spell) then
|
if (self.current and lineId and self.current ~= lineId) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ function IceCastBar.prototype:SpellCastDelayed(event, unit, delay)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function IceCastBar.prototype:SpellCastSucceeded(event, unit, spell, rank)
|
function IceCastBar.prototype:SpellCastSucceeded(event, unit, spell, rank, lineId, spellId)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
--IceHUD:Debug("SpellCastSucceeded", unit, spell, rank)
|
--IceHUD:Debug("SpellCastSucceeded", unit, spell, rank)
|
||||||
|
|
||||||
@ -515,7 +515,7 @@ function IceCastBar.prototype:SpellCastSucceeded(event, unit, spell, rank)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- ignore if not coming from current spell
|
-- ignore if not coming from current spell
|
||||||
if (self.current and self.current ~= spell) then
|
if (self.current and self.current ~= lineId) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -404,14 +404,14 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
function CastBar.prototype:SpellCastSent(event, unit, spell, rank, target)
|
function CastBar.prototype:SpellCastSent(event, unit, spell, rank, target, lineId)
|
||||||
CastBar.super.prototype.SpellCastSent(self, event, unit, spell, rank, target)
|
CastBar.super.prototype.SpellCastSent(self, event, unit, spell, rank, target, lineId)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
|
|
||||||
if IceHUD.WowVer < 70000 then
|
if IceHUD.WowVer < 70000 then
|
||||||
self.spellCastSent = GetTime()
|
self.spellCastSent = GetTime()
|
||||||
end
|
end
|
||||||
self.sentSpell = spell
|
self.sentSpell = lineId
|
||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
@ -423,15 +423,15 @@ function CastBar.prototype:SpellCastChanged(event, arg1)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- OVERRIDE
|
-- OVERRIDE
|
||||||
function CastBar.prototype:SpellCastStart(event, unit, spell, rank)
|
function CastBar.prototype:SpellCastStart(event, unit, spell, rank, lineId, spellId)
|
||||||
CastBar.super.prototype.SpellCastStart(self, event, unit, spell, rank)
|
CastBar.super.prototype.SpellCastStart(self, event, unit, spell, rank, lineId, spellId)
|
||||||
if (unit ~= self.unit) then return end
|
if (unit ~= self.unit) then return end
|
||||||
|
|
||||||
if not self:IsVisible() or not self.actionDuration then
|
if not self:IsVisible() or not self.actionDuration then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.sentSpell ~= spell then
|
if self.sentSpell ~= lineId then
|
||||||
self.spellCastSent = nil
|
self.spellCastSent = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user