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:
Brues
2026-07-05 14:58:26 -05:00
parent 9706a74d16
commit 3fe072c594
39 changed files with 81 additions and 98 deletions
+4 -4
View File
@@ -125,13 +125,13 @@ pfUI:RegisterModule("mapcolors", function ()
-- WorldMap
Initialize('WorldMap')
hooksecurefunc('WorldMapButton_OnUpdate', function()
pfUI.hooksecurefunc('WorldMapButton_OnUpdate', function()
if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end
UpdateUnitFrames('WorldMap')
end)
if C.appearance.worldmap.colornames == "1" then
hooksecurefunc('WorldMapUnit_OnEnter', function()
pfUI.hooksecurefunc('WorldMapUnit_OnEnter', function()
if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end
UpdateUnitColors('WorldMap', WorldMapTooltip)
end)
@@ -141,13 +141,13 @@ pfUI:RegisterModule("mapcolors", function ()
HookAddonOrVariable("Blizzard_BattlefieldMinimap", function()
Initialize('BattlefieldMinimap')
hooksecurefunc('BattlefieldMinimap_OnUpdate', function()
pfUI.hooksecurefunc('BattlefieldMinimap_OnUpdate', function()
if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end
UpdateUnitFrames('BattlefieldMinimap')
end)
if C.appearance.worldmap.colornames == "1" then
hooksecurefunc('BattlefieldMinimapUnit_OnEnter', function()
pfUI.hooksecurefunc('BattlefieldMinimapUnit_OnEnter', function()
if ( this.tick or .5) > GetTime() then return else this.tick = GetTime() + .5 end
UpdateUnitColors('BattlefieldMinimap', GameTooltip)
end)