mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
proper overwrite of CooldownFrame_SetTimer function in E:RegisterCooldown
This commit is contained in:
@@ -115,16 +115,17 @@ function E:OnSetCooldown(start, duration, enable)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local cooldownHooked
|
||||||
local oldCooldownFrame_SetTimer = CooldownFrame_SetTimer
|
local oldCooldownFrame_SetTimer = CooldownFrame_SetTimer
|
||||||
function E:RegisterCooldown(cooldown)
|
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)
|
function CooldownFrame_SetTimer(this, start, duration, enable)
|
||||||
oldCooldownFrame_SetTimer(this, start, duration, enable)
|
oldCooldownFrame_SetTimer(this, start, duration, enable)
|
||||||
E.OnSetCooldown(this, start, duration, enable)
|
E.OnSetCooldown(this, start, duration, enable)
|
||||||
end
|
end
|
||||||
|
|
||||||
cooldown.isHooked = true
|
cooldownHooked = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function E:UpdateCooldownSettings()
|
function E:UpdateCooldownSettings()
|
||||||
|
|||||||
Reference in New Issue
Block a user