mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 03:06:01 +00:00
performance update
This commit is contained in:
+4
-11
@@ -1,4 +1,4 @@
|
||||
pfUI:RegisterModule("cooldown", "vanilla:tbc", function ()
|
||||
pfUI:RegisterModule("cooldown", "vanilla", function ()
|
||||
-- cache values
|
||||
local lowcolor = {strsplit(",", C.appearance.cd.lowcolor)}
|
||||
local normalcolor = {strsplit(",", C.appearance.cd.normalcolor)}
|
||||
@@ -134,14 +134,7 @@ pfUI:RegisterModule("cooldown", "vanilla:tbc", function ()
|
||||
end
|
||||
end
|
||||
|
||||
if pfUI.expansion == "vanilla" then
|
||||
-- vanilla does not have a cooldown frame type, so we hook the
|
||||
-- regular SetTimer function that each one is calling.
|
||||
hooksecurefunc("CooldownFrame_SetTimer", SetCooldown)
|
||||
else
|
||||
-- tbc and later expansion have a cooldown frametype, so we can
|
||||
-- hook directly into the frame creation and add our function there.
|
||||
local methods = getmetatable(CreateFrame('Cooldown', nil, nil, 'CooldownFrameTemplate')).__index
|
||||
hooksecurefunc(methods, 'SetCooldown', SetCooldown)
|
||||
end
|
||||
-- vanilla does not have a cooldown frame type, so we hook the
|
||||
-- regular SetTimer function that each one is calling.
|
||||
hooksecurefunc("CooldownFrame_SetTimer", SetCooldown)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user