mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-09 23:20:00 +00:00
Route hooksecurefunc callers through pfUI.hooksecurefunc; global belongs to ClassicAPI
pfUI's Lua hooksecurefunc lived in pfUI.env and shadowed ClassicAPI's C global for all pfUI code. Replace it with a thin pfUI.hooksecurefunc shim that keeps the missing-target no-op our call sites rely on (ClassicAPI errors on a nil target) and delegates the actual hook to _G.hooksecurefunc. Migrated all 70 internal call sites (modules/libs/skins) to pfUI.hooksecurefunc; bare hooksecurefunc now resolves to ClassicAPI's C version everywhere. Dropped the unused prepend path and the orphaned pfUI.hooks table.
This commit is contained in:
@@ -65,14 +65,14 @@ pfUI:RegisterModule("turtle-wow", function ()
|
||||
|
||||
HookAddonOrVariable("GroupFrame", function()
|
||||
-- After Turtle's own init, hide frames if pfUI handles them
|
||||
hooksecurefunc("GroupFrame_Toggle", function()
|
||||
pfUI.hooksecurefunc("GroupFrame_Toggle", function()
|
||||
if pfUIHandlesGroupOrRaid() then
|
||||
DisableTurtleGroupFrames()
|
||||
end
|
||||
end)
|
||||
|
||||
-- After every group/raid update, re-hide if pfUI handles them
|
||||
hooksecurefunc("GroupFrame_Update", function()
|
||||
pfUI.hooksecurefunc("GroupFrame_Update", function()
|
||||
if pfUIHandlesGroupOrRaid() then
|
||||
DisableTurtleGroupFrames()
|
||||
end
|
||||
@@ -353,7 +353,7 @@ pfUI:RegisterModule("turtle-wow", function ()
|
||||
local initialized = false
|
||||
|
||||
HookAddonOrVariable("Blizzard_InspectUI", function()
|
||||
hooksecurefunc("InspectFrame_Show", function()
|
||||
pfUI.hooksecurefunc("InspectFrame_Show", function()
|
||||
-- break if theres nothing left to do
|
||||
if initialized then return end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user