mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-15 22:30:13 -05:00
Fixed "Show during cast" for classes with < 1.5s GCD
Ticket #200 - thanks nandchan!
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
local L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
||||
local GlobalCoolDown = IceCore_CreateClass(IceBarElement)
|
||||
|
||||
local maxSpellCastSkipTimeMs = 1500
|
||||
|
||||
-- Constructor --
|
||||
function GlobalCoolDown.prototype:init()
|
||||
GlobalCoolDown.super.prototype.init(self, "GlobalCoolDown")
|
||||
@ -177,16 +175,16 @@ function GlobalCoolDown.prototype:CooldownStateChanged(event, unit, spell, _, _,
|
||||
self.CurrSpellId = spellId
|
||||
end
|
||||
|
||||
local start, dur = GetSpellCooldown(self.CDSpellId)
|
||||
|
||||
if not self.moduleSettings.showDuringCast then
|
||||
local castTime = self:GetSpellCastTime(spellId)
|
||||
local channeledSpellName = UnitChannelInfo(unit)
|
||||
if (castTime and castTime > maxSpellCastSkipTimeMs) or channeledSpellName then
|
||||
if (castTime and castTime >= dur*1000) or channeledSpellName then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local start, dur = GetSpellCooldown(self.CDSpellId)
|
||||
|
||||
if start and dur ~= nil and dur > 0 and dur <= 1.5 then
|
||||
local bRestart = not self.startTime or start > self.startTime + 0.5
|
||||
if bRestart then
|
||||
|
Reference in New Issue
Block a user