mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
59ce6d9e74
Every HookAddonOrVariable call created its own lurker frame with three event registrations. Share one frame across all hooks: they accumulate in a pending list the single OnEvent handler walks, firing and dropping each whose addon/variable is available, and unregistering events once the list empties. Behavior is preserved and slightly hardened: foundConfig now persists on the shared frame (set on VARIABLES_LOADED and PLAYER_ENTERING_WORLD, both of which imply config is ready), so a hook registered after config load fires immediately if its addon is already loaded rather than waiting for the next event.