Fixes GCD sometimes not triggering

I'm not having any problems triggering the GCD with items or spells, but a ticket reports that this is an issue and this is the way to fix it. (ticket #198 - thanks nandchan!)
This commit is contained in:
Parnic
2015-12-20 15:15:51 -06:00
parent b6fe6b215d
commit fa64f46bc1

View File

@ -110,13 +110,13 @@ function GlobalCoolDown.prototype:GetSpellCastTime(spell)
end end
end end
function GlobalCoolDown.prototype:CooldownStateChanged(event, unit, spell) function GlobalCoolDown.prototype:CooldownStateChanged(event, unit, spell, _, _, spellId)
if unit ~= "player" or not spell then if unit ~= "player" or not spellId then
return return
end end
if not self.moduleSettings.showDuringCast then if not self.moduleSettings.showDuringCast then
local castTime = self:GetSpellCastTime(spell) local castTime = self:GetSpellCastTime(spellId)
if castTime and castTime > maxSpellCastSkipTimeMs then if castTime and castTime > maxSpellCastSkipTimeMs then
return return
end end