diff --git a/IceCastBar.lua b/IceCastBar.lua index 84e997f..e210b2c 100644 --- a/IceCastBar.lua +++ b/IceCastBar.lua @@ -36,6 +36,7 @@ function IceCastBar.prototype:Enable(core) IceCastBar.super.prototype.Enable(self, core) self:RegisterEvent("UNIT_SPELLCAST_SENT", "SpellCastSent") -- "player", spell, rank, target + self:RegisterEvent("CURRENT_SPELL_CAST_CHANGED", "SpellCastChanged") self:RegisterEvent("UNIT_SPELLCAST_START", "SpellCastStart") -- unit, spell, rank self:RegisterEvent("UNIT_SPELLCAST_STOP", "SpellCastStop") -- unit, spell, rank @@ -417,6 +418,9 @@ function IceCastBar.prototype:SpellCastSent(event, unit, spell, rank, target) IceHUD:Debug("SpellCastSent", unit, spell, rank, target) end +function IceCastBar.prototype:SpellCastChanged(event, arg1) + IceHUD:Debug("SpellCastChanged", arg1) +end function IceCastBar.prototype:SpellCastStart(event, unit, spell, rank) if (unit ~= self.unit) then return end diff --git a/modules/CastBar.lua b/modules/CastBar.lua index b7f6399..3708cf0 100644 --- a/modules/CastBar.lua +++ b/modules/CastBar.lua @@ -408,10 +408,20 @@ function CastBar.prototype:SpellCastSent(event, unit, spell, rank, target) CastBar.super.prototype.SpellCastSent(self, event, unit, spell, rank, target) if (unit ~= self.unit) then return end - self.spellCastSent = GetTime() + if IceHUD.WowVer < 70000 then + self.spellCastSent = GetTime() + end self.sentSpell = spell end +-- OVERRIDE +function CastBar.prototype:SpellCastChanged(event, arg1) + CastBar.super.prototype.SpellCastChanged(self, event, arg1) + if IceHUD.WowVer >= 70000 then + self.spellCastSent = GetTime() + end +end + -- OVERRIDE function CastBar.prototype:SpellCastStart(event, unit, spell, rank) CastBar.super.prototype.SpellCastStart(self, event, unit, spell, rank)