Skip to content

Fix: restore client against EvilQuest's bundle update (window.gm removed)#27

Open
atapifire wants to merge 1 commit into
CamelC0re:devfrom
atapifire:fix/26-eq-bundle-compat
Open

Fix: restore client against EvilQuest's bundle update (window.gm removed)#27
atapifire wants to merge 1 commit into
CamelC0re:devfrom
atapifire:fix/26-eq-bundle-compat

Conversation

@atapifire

Copy link
Copy Markdown
Collaborator

Urgent compatibility fix. EvilQuest shipped a client bundle update that bricks the EvilLite client — after login there's no player position, no live NPCs, dead map follow/click-to-move, and Collection Log won't load.

Root cause

EQ stopped assigning window.gm (confirmed: window.gm = appears 0 times in the captured bundle). Our Reflector parse poller in client.ts was gated on window.gm existing, so it never parsed → zero hooks bound → plugins never started. GameManager's source still ships and its signature methods are intact — the gate just needed to stop depending on a global EQ removed.

Changes

  • client.ts — the parse poller now keys off "GameManager's source is present in the captured modules" (window.gm-independent) instead of window.gm. The Reflector then parses, binds GameManager + EntityManager, the HookManager captures the live instance, and the client's own login driver starts plugins. Verified live in-world: player position, follow, NPCs, click-to-move, terrain, and Collection Log all restored.
  • CollectionLogPlugin.ts — item icons fall back to EQ's server-rendered items/3d/<id>.png (EQ added this endpoint in the same update; the inventory renders model-only items from exactly this URL). Fixes missing icons for model-only items (Raw Chicken, Raw Rat Meat, Log, Coins) without relying on inventory harvesting.

Follow-up (core / Oni)

Of ~25 Reflector class signatures, only GameManager + EntityManager still match the new bundle; ~23 others + all enums are stale (e.g. SocketManager → gm.network ctor ft; context menus moved onto GameManager + a new class). Those need re-deriving in packages/core/src/reflector/signatures.ts, and the context-menu integration needs rewriting to EQ's new structure. Our plugins use only GameManager + EntityManager (+ DOM), so they work with this PR; core features need the signature refresh. Happy to hand over the full bundle-discovery mapping.

Closes #26

🤖 Generated with Claude Code

…ved)

EvilQuest shipped a client bundle update that bricked the EvilLite client:
no player position, no live NPCs, dead map follow/click-to-move, Collection Log
not loading — because nothing the Reflector provides was binding.

Root cause: EQ stopped assigning `window.gm` (the global game manager is gone —
`window.gm =` appears 0 times in the captured bundle). Our Reflector parse poller
was gated on `window.gm` existing, so it never parsed → zero hooks → plugins never
started. GameManager's source still ships (its signature methods are intact), so
the gate just needed to stop depending on a global EQ removed.

- client.ts: the parse poller now keys off "GameManager's source is present in the
  captured modules" (window.gm-independent) instead of `window.gm`. The Reflector
  then parses, binds GameManager + EntityManager, the HookManager captures the
  instance on first hooked call, and the client's own login driver starts plugins.
  Verified live in-world: player position, follow, NPCs, click-to-move, terrain,
  and Collection Log all restored.

- CollectionLogPlugin.ts: item icons now fall back to EQ's server-rendered
  `items/3d/<id>.png` (EQ added this endpoint in the same update — the inventory
  renders model-only items from exactly this URL), fixing missing icons for
  model-only items (Raw Chicken, Raw Rat Meat, Log, Coins) without depending on
  inventory harvesting.

Follow-up (core/Oni): ~23 other manager signatures + all enums in
reflector/signatures.ts are stale from EQ's refactor, and the context-menu
integration needs rewriting to the new structure. Our plugins use only
GameManager + EntityManager (+ DOM), so they work with this fix; core features
(context menus, etc.) need the signature refresh.

Closes CamelC0re#26

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant