From 9ca79859fe6a13f90906c215769891244abd8580 Mon Sep 17 00:00:00 2001 From: Pinya <800pin.ru@gmail.com> Date: Sun, 22 Jul 2018 16:48:47 +0300 Subject: [PATCH] proper overwrite of CooldownFrame_SetTimer function in E:RegisterCooldown --- ElvUI/Core/Cooldowns.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ElvUI/Core/Cooldowns.lua b/ElvUI/Core/Cooldowns.lua index 4acbb92..4bd3493 100644 --- a/ElvUI/Core/Cooldowns.lua +++ b/ElvUI/Core/Cooldowns.lua @@ -115,16 +115,17 @@ function E:OnSetCooldown(start, duration, enable) end end +local cooldownHooked local oldCooldownFrame_SetTimer = CooldownFrame_SetTimer function E:RegisterCooldown(cooldown) - if not E.private.cooldown.enable or cooldown.isHooked then return end + if not E.private.cooldown.enable or cooldownHooked then return end function CooldownFrame_SetTimer(this, start, duration, enable) oldCooldownFrame_SetTimer(this, start, duration, enable) E.OnSetCooldown(this, start, duration, enable) end - cooldown.isHooked = true + cooldownHooked = true end function E:UpdateCooldownSettings()