Skip to content

Commit 998deea

Browse files
committed
Fix pfUI HookScript compatibility shim
Tightens the pfUI compatibility shim in AddOnCompat.lua. The temporary CreateFrame wrapper now leaves the maintained brues pfUI fork alone when either its X-Website tag or the pfUI.handlesHookScript capability flag is present, and only applies the HookScript workaround when neither signal exists.
1 parent af02dda commit 998deea

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

AddOns/!!!ClassicAPI/Util/AddOnCompat.lua

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ if C_AddOns.DoesAddOnExist('pfUI') then
1515
-- written for on their pfActionBar buttons, which breaks them. While
1616
-- the actionbar module builds those buttons, temporarily wrap
1717
-- CreateFrame to shadow HookScript with a falsy field so those forks
18-
-- fall back to their vanilla SetScript path. The maintained "brues"
19-
-- fork handles HookScript itself, so it's detected via the TOC
20-
-- X-Website tag and left alone. The wrapper is removed as soon as the
21-
-- actionbar module finishes loading so it affects nothing else.
18+
-- fall back to their vanilla SetScript path. The wrapper is removed as
19+
-- soon as the actionbar module finishes loading so it affects nothing
20+
-- else. A pfUI is trusted to handle HookScript itself if EITHER signal
21+
-- is present: the maintained "brues" X-Website tag OR the
22+
-- `pfUI.handlesHookScript` capability flag. Without the website the
23+
-- flag is required; if neither is present we apply the shim.
2224
local website = GetAddOnMetadata("pfUI", "X-Website")
23-
if not website or not strfind(website, 'brues') then
25+
local hasBruesWebsite = website and strfind(website, 'brues')
26+
if not hasBruesWebsite and not pfUI.handlesHookScript then
2427
local _createFrame = CreateFrame
2528
local HookedCreateFrame = function(frameType, name, parent, template)
2629
local frame = _createFrame(frameType, name, parent, template)

0 commit comments

Comments
 (0)