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

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