Replace saved-handler wrappers with HookScript; use intrinsic pre/postcall bindings for barbershop and SetHighlight

This commit is contained in:
Brues
2026-10-31 19:47:41 -05:00
parent b2e89b461c
commit 14a26b8301
7 changed files with 14 additions and 47 deletions
+2 -14
View File
@@ -257,20 +257,8 @@ function pfUI.api.SetHighlight(frame, cr, cg, cb)
frame.rr, frame.rg, frame.rb, frame.ra = GetStringColor(pfUI_config.appearance.border.color)
if not frame.pfEnterLeave then
local enter, leave = frame:GetScript("OnEnter"), frame:GetScript("OnLeave")
if enter then
frame:HookScript("OnEnter", SetHighlightEnter)
else
frame:SetScript("OnEnter", SetHighlightEnter)
end
if leave then
frame:HookScript("OnLeave", SetHighlightLeave)
else
frame:SetScript("OnLeave", SetHighlightLeave)
end
frame:HookScript("OnEnter", SetHighlightEnter, LE_SCRIPT_BINDING_TYPE_INTRINSIC_POSTCALL)
frame:HookScript("OnLeave", SetHighlightLeave, LE_SCRIPT_BINDING_TYPE_INTRINSIC_POSTCALL)
frame.pfEnterLeave = true
end
end