mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
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:
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user