Hacked cast lag back in for 7.0 beta

UNIT_SPELLCAST_SENT is now firing at the same time as UNIT_SPELLCAST_START which is when the client receives confirmation that a spell s/he wanted to cast has begun casting (as opposed to pre-7.0 when _SENT would fire when the client pressed the button before receiving confirmation). As per http://www.wowinterface.com/forums/showpost.php?p=314818&postcount=31, I'm now hooking CURRENT_SPELL_CAST_CHANGED to give us a slight chance of acquiring lag info. Unfortunately that event fires for just about every casting-related thing that happens (with no context/useful args at all), so we get a proper lag indicator for the initial cast, but nothing once we start chaining casts together. I guess this is something to keep an eye on as 7.0 nears release.
This commit is contained in:
Parnic
2016-05-29 00:45:01 -05:00
parent 8fef3a2b8c
commit aec7852011
2 changed files with 15 additions and 1 deletions

View File

@ -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