Skip to content

QoL: rebuild the teleport tables if they came up empty at login - #2018

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/dungeon-teleports-broken
Sep 8, 2026
Merged

QoL: rebuild the teleport tables if they came up empty at login#2018
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/dungeon-teleports-broken

Conversation

@dfrisone

@dfrisone dfrisone commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fix from Svart. His GitHub account is currently suspended, so this is being submitted on his behalf.

What does this PR do?

Fixes dungeon teleport buttons in the /ekeys popup being unclickable/hidden.

MAP_TELEPORT_SPELLS and TELEPORT_BY_NAME were built exactly once at file load from C_ChallengeMode/GetLFGDungeonInfo data. If that data was not cached yet at that moment on login, both tables stayed permanently empty for the whole session, and every teleport button stayed hidden with no way to recover short of a reload.

The build is extracted into RebuildTeleportTables() and re-run from ShowKeystonePopup() whenever the tables are still empty, so a late-populated cache self-heals the next time /ekeys is opened.

How was it tested?

Author-tested by Svart; not independently retested in-game by me before opening this on his behalf.

Checklist

  • New settings default OFF (no behavior change without opt-in) -- N/A, no new settings
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built -- the self-heal check is two table reads inside a function that already runs when the popup opens; the rebuild itself only runs when the tables are genuinely empty
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) -- N/A, no new events
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames -- N/A, no frame code touched
  • Tested in-game on live; no version gates or pre-Midnight APIs added -- see note above

MAP_TELEPORT_SPELLS and TELEPORT_BY_NAME were built exactly once at file
load from C_ChallengeMode/GetLFGDungeonInfo data. If that data was not
cached yet at that moment on login, both tables stayed permanently empty
for the whole session, and every teleport button in the /ekeys popup
stayed hidden with no way to recover short of a reload.

The build now runs from RebuildTeleportTables() and re-runs from
ShowKeystonePopup() whenever the tables are still empty, so a
late-populated cache self-heals the next time /ekeys is opened.

Fix from Svart. His GitHub account is currently suspended, so this is
being submitted on his behalf.
@EllesmereGaming
EllesmereGaming merged commit 5028a50 into EllesmereGaming:main Sep 8, 2026
1 check passed
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.

2 participants