mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user