mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-23 12:30:50 +00:00
cooldown: use generic hook mechanism
This commit is contained in:
@@ -55,8 +55,7 @@ pfUI:RegisterModule("cooldown", function ()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- hook
|
-- hook
|
||||||
if not pfCooldownFrame_SetTimer then pfCooldownFrame_SetTimer = CooldownFrame_SetTimer end
|
pfUI.api.Hook("CooldownFrame_SetTimer", function(this, start, duration, enable)
|
||||||
function CooldownFrame_SetTimer(this, start, duration, enable)
|
|
||||||
-- break here if no this-reference is set
|
-- break here if no this-reference is set
|
||||||
if not this then return end
|
if not this then return end
|
||||||
|
|
||||||
@@ -78,7 +77,5 @@ pfUI:RegisterModule("cooldown", function ()
|
|||||||
elseif(this.cd) then
|
elseif(this.cd) then
|
||||||
this.cd:Hide();
|
this.cd:Hide();
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
pfCooldownFrame_SetTimer(this, start, duration, enable)
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user