From 7421f916ad9a3253055e28e32b0bdc5ddbddc8ea Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 22 Dec 2015 01:01:20 -0600 Subject: [PATCH] Fixed "Show during cast" for classes with < 1.5s GCD Ticket #200 - thanks nandchan! --- modules/GlobalCoolDown.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/GlobalCoolDown.lua b/modules/GlobalCoolDown.lua index 2668cc7..7d9b85b 100644 --- a/modules/GlobalCoolDown.lua +++ b/modules/GlobalCoolDown.lua @@ -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