mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-11 16:10:01 +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:
@@ -10,7 +10,7 @@ pfUI:RegisterModule("socialmod", function ()
|
||||
end
|
||||
end)
|
||||
do -- add colors to guild list
|
||||
hooksecurefunc("GuildStatus_Update", function()
|
||||
pfUI.hooksecurefunc("GuildStatus_Update", function()
|
||||
local playerzone = GetRealZoneText()
|
||||
local off = FauxScrollFrame_GetOffset(GuildListScrollFrame)
|
||||
for i=1, GUILDMEMBERS_TO_DISPLAY, 1 do
|
||||
@@ -70,7 +70,7 @@ pfUI:RegisterModule("socialmod", function ()
|
||||
end
|
||||
|
||||
do -- add colors to friend list
|
||||
hooksecurefunc("FriendsList_Update", function()
|
||||
pfUI.hooksecurefunc("FriendsList_Update", function()
|
||||
if GetNumFriends() == 0 then return end
|
||||
|
||||
local playerzone = GetRealZoneText()
|
||||
@@ -123,7 +123,7 @@ pfUI:RegisterModule("socialmod", function ()
|
||||
end
|
||||
|
||||
do -- add colors to who list
|
||||
hooksecurefunc("WhoList_Update", function()
|
||||
pfUI.hooksecurefunc("WhoList_Update", function()
|
||||
local num, max = GetNumWhoResults()
|
||||
local off = FauxScrollFrame_GetOffset(WhoListScrollFrame)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user