mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
Vanilla has RegisterEvent / UnregisterEvent as frame methods but not the query IsEventRegistered (added in a later expansion). There's no engine Script_* to delegate to, so we replicate the membership check already embedded in Frame::RegisterEvent (FUN_00702140): find the event by name in the live event table (SStrCmpI), then walk that entry's subscriber chain (head@+0xC, next@+4, frame@+8, low-bit/null sentinel) for this frame. self is resolved via Game::Lua::ResolveObject, yielding the same CFrameScriptObject* the chain stores. Registered on the Frame method registry (VAR_FRAME_METHOD_REGISTRY, alongside RegisterEvent) so it resolves on any frame. Pure read, no new hooks. Returns a boolean, matching the 3.3.5-era contract; verified in-game (true for a registered event, false otherwise). Documented in docs/API.md and README.md.