Tighten up pfUI HookScript compat

Defer CreateFrame hook application until the updatenotify module loads, rather than applying it globally so it only affects the actionar module
This commit is contained in:
Brues
2026-07-11 16:21:43 -05:00
parent 88d76c04ad
commit d747c699f5
+4 -2
View File
@@ -22,7 +22,7 @@ if C_AddOns.DoesAddOnExist('pfUI') then
local website = GetAddOnMetadata("pfUI", "X-Website")
if not website or not string.find(GetAddOnMetadata("pfUI", "X-Website") or '', 'brues') then
local _createFrame = CreateFrame
CreateFrame = function(frameType, name, parent, template)
local HookedCreateFrame = function(frameType, name, parent, template)
if frameType == "Button" and string.find(name or "", "pfActionBar") then
local frame = _createFrame(frameType, name, parent, template)
frame.HookScript = false
@@ -31,7 +31,9 @@ if C_AddOns.DoesAddOnExist('pfUI') then
return _createFrame(frameType, name, parent, template)
end
hooksecurefunc(pfUI, 'LoadModule', function(frame, moduleName)
if moduleName == "actionbar" then
if moduleName == "updatenotify" then
CreateFrame = HookedCreateFrame
elseif moduleName == "actionbar" then
CreateFrame = _createFrame
end
end)