diff options
| author | David Skoland <davidskoland@gmail.com> | 2026-02-10 23:38:17 +0100 |
|---|---|---|
| committer | David Skoland <davidskoland@gmail.com> | 2026-02-10 23:38:17 +0100 |
| commit | 020dfcda00ca06b9a06e7076eaf8a0164ae1327e (patch) | |
| tree | 9fe2a8d9fdf81823e48d9a3795e47d0c59964f69 /webAO/dom/areaClick.ts | |
| parent | 9c68a1afcf178a86063f094b96471fa73531bd9a (diff) | |
Refactor playerlist to state-driven rendering with renderPlayerList
handlePR and handlePU now only update client.playerlist state,
and renderPlayerList handles all DOM rendering from that state.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'webAO/dom/areaClick.ts')
| -rw-r--r-- | webAO/dom/areaClick.ts | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/webAO/dom/areaClick.ts b/webAO/dom/areaClick.ts index 19953a5..f7b177e 100644 --- a/webAO/dom/areaClick.ts +++ b/webAO/dom/areaClick.ts @@ -1,6 +1,4 @@ import { client } from "../client"; -import { updatePlayerAreas } from "./updatePlayerAreas"; -import { ensureCharIni } from "../client/handleCharacterInfo"; /** * Triggered when an item on the area list is clicked. * @param {HTMLElement} el @@ -14,13 +12,5 @@ export function area_click(el: HTMLElement) { areaHr.textContent = `switched to ${el.textContent}`; document.getElementById("client_log")!.appendChild(areaHr); client.area = Number(el.id.substring(4)); - updatePlayerAreas(client.area); - - // Prefetch char.ini for all characters present in the new area - for (const player of client.players.values()) { - if (player.area === client.area && player.charId >= 0) { - ensureCharIni(player.charId); - } - } } window.area_click = area_click; |
