performance update

This commit is contained in:
Meow
2026-01-03 12:33:07 +01:00
committed by GitHub
parent 6c86d83352
commit 96c005239d
60 changed files with 1485 additions and 258 deletions
+4 -11
View File
@@ -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)