mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40: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 L = LibStub("AceLocale-3.0"):GetLocale("IceHUD", false)
|
||||||
local GlobalCoolDown = IceCore_CreateClass(IceBarElement)
|
local GlobalCoolDown = IceCore_CreateClass(IceBarElement)
|
||||||
|
|
||||||
local maxSpellCastSkipTimeMs = 1500
|
|
||||||
|
|
||||||
-- Constructor --
|
-- Constructor --
|
||||||
function GlobalCoolDown.prototype:init()
|
function GlobalCoolDown.prototype:init()
|
||||||
GlobalCoolDown.super.prototype.init(self, "GlobalCoolDown")
|
GlobalCoolDown.super.prototype.init(self, "GlobalCoolDown")
|
||||||
@ -177,16 +175,16 @@ function GlobalCoolDown.prototype:CooldownStateChanged(event, unit, spell, _, _,
|
|||||||
self.CurrSpellId = spellId
|
self.CurrSpellId = spellId
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local start, dur = GetSpellCooldown(self.CDSpellId)
|
||||||
|
|
||||||
if not self.moduleSettings.showDuringCast then
|
if not self.moduleSettings.showDuringCast then
|
||||||
local castTime = self:GetSpellCastTime(spellId)
|
local castTime = self:GetSpellCastTime(spellId)
|
||||||
local channeledSpellName = UnitChannelInfo(unit)
|
local channeledSpellName = UnitChannelInfo(unit)
|
||||||
if (castTime and castTime > maxSpellCastSkipTimeMs) or channeledSpellName then
|
if (castTime and castTime >= dur*1000) or channeledSpellName then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local start, dur = GetSpellCooldown(self.CDSpellId)
|
|
||||||
|
|
||||||
if start and dur ~= nil and dur > 0 and dur <= 1.5 then
|
if start and dur ~= nil and dur > 0 and dur <= 1.5 then
|
||||||
local bRestart = not self.startTime or start > self.startTime + 0.5
|
local bRestart = not self.startTime or start > self.startTime + 0.5
|
||||||
if bRestart then
|
if bRestart then
|
||||||
|
Reference in New Issue
Block a user