From a81df71c63a3f12ef782f96a9ec842ffdd1612f9 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Thu, 15 May 2014 23:19:19 +0000 Subject: [PATCH] Update cooldown state on all spellcast events. Blizzard gives spells a "GCD" cooldown while they're being cast before the real cooldown kicks in afterwards. Update the cooldown state on all spellcast events to catch this "GCD" cooldown. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1455 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleCooldown.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OvaleCooldown.lua b/OvaleCooldown.lua index 6a98618..d41cbc1 100644 --- a/OvaleCooldown.lua +++ b/OvaleCooldown.lua @@ -45,6 +45,10 @@ end function OvaleCooldown:OnEnable() self:RegisterEvent("SPELL_UPDATE_CHARGES", "Update") self:RegisterEvent("SPELL_UPDATE_USABLE", "Update") + self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START", "Update") + self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", "Update") + self:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED", "Update") + self:RegisterEvent("UNIT_SPELLCAST_START", "Update") self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED", "Update") OvaleState:RegisterState(self, self.statePrototype) end @@ -53,6 +57,10 @@ function OvaleCooldown:OnDisable() OvaleState:UnregisterState(self) self:UnregisterEvent("SPELL_UPDATE_CHARGES") self:UnregisterEvent("SPELL_UPDATE_USABLE") + self:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_START") + self:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_STOP") + self:UnregisterEvent("UNIT_SPELLCAST_INTERRUPTED") + self:UnregisterEvent("UNIT_SPELLCAST_START") self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED") end -- 1.7.9.5