mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
Backport the 8.0.1 PEW payload onto vanilla's arg-less PLAYER_ENTERING_WORLD. PEW is a no-arg event, so it broadcasts through FUN_FIRE_EVENT_NO_ARGS (__fastcall(int), the no-arg dispatcher) — NOT the variadic FUN_FIRE_EVENT. So we intercept that dispatcher and, for the PEW event id, suppress the no-arg fire and re-broadcast through the variadic dispatcher with the two booleans (true->1 / false->nil, the %d/%s+nullptr trick). Both fire paths walk the same frame chain, so PEW-registered frames get the args once. Flags need no PEW-specific engine hook — they fall out of signals we already produce: GlueModuleAutoRegister (glue-screen boot) latches "next enter-world is a fresh login"; ModuleAutoRegister (in-game Lua re-init) marks login-or-reload; a zone/instance transition rebuilds neither, so both false. New shared Event::SignalHook: FUN_FIRE_EVENT_NO_ARGS was already hooked by loot/Scan (silent-scan suppression), and MinHook allows one hook per target, so — like Tick::WorldTick for the per-frame tick — this module now owns the single hook and fans out to interceptors. loot/Scan refactored from owning the hook to being a subscriber (behavior identical). Event::EnteringWorld is a second subscriber. Verified in-game: fresh login, /reload, and instance transition each report the correct (isInitialLogin, isReloadingUi).