[Parity][panels][S2][R] 每次 syncFromWorld 都重建 NPC 菜单,高亮选项被打回第 0 项 #665

Closed
opened 2026-10-02 11:42:53 +00:00 by troytt · 1 comment
Owner

1.13c 客户端保真度审计立项(基准快照:7bd1090 / main @ 77a20c7)

证据标记说明:V-data = 1.13c MPQ 数据表 (.txt / animdata.d2 / .tbl / pal.pl2);V-src = D2MOO 逆向源码;V-bin = 1.13c DLL 反汇编;K = 1.13c 公认行为。

来源审计项:panels#11 — [S2][R] 每次 syncFromWorld 都重建 NPC 菜单,高亮选项被打回第 0 项

  • 位置
    • src/client/ui-model/hud-model.ts:976-991:条件 (… || (wp.npcMenu.npcId === npc.npcId && !wp.npcMenu.talking)) 只要菜单开着且不在对话中就成立,于是每次都调 openNpcMenu
    • src/client/ui/world-panels.ts:1248-1259:每次新建对象,hoveredOptionIdx: 0
  • 原版:选中项只在鼠标命中选项行时更新,没命中就保持不变。代码自己在 2141-2142 的注释里也引用了这一点(0x6fb533c0 / 0x6fb533de,代码注释声称,未复核)。
  • 影响:鼠标停在"交易"上不动时,下一个封包一到,高亮就跳回第一项,直到鼠标再动。键盘选择也会被打断。
  • 建议:菜单已打开且 NPC 没变时只更新选项,不要重建对象,保留 hoveredOptionIdx。
  • 已有 issue:—
> **1.13c 客户端保真度审计立项**(基准快照:`7bd1090` / `main @ 77a20c7`) > 证据标记说明:`V-data` = 1.13c MPQ 数据表 (`.txt` / `animdata.d2` / `.tbl` / `pal.pl2`);`V-src` = D2MOO 逆向源码;`V-bin` = 1.13c DLL 反汇编;`K` = 1.13c 公认行为。 ### 来源审计项:`panels#11` — [S2][R] 每次 syncFromWorld 都重建 NPC 菜单,高亮选项被打回第 0 项 - **位置** - `src/client/ui-model/hud-model.ts:976-991`:条件 `(… || (wp.npcMenu.npcId === npc.npcId && !wp.npcMenu.talking))` 只要菜单开着且不在对话中就成立,于是每次都调 `openNpcMenu` - `src/client/ui/world-panels.ts:1248-1259`:每次新建对象,`hoveredOptionIdx: 0` - **原版**:选中项只在鼠标命中选项行时更新,没命中就保持不变。代码自己在 2141-2142 的注释里也引用了这一点(0x6fb533c0 / 0x6fb533de,代码注释声称,未复核)。 - **影响**:鼠标停在"交易"上不动时,下一个封包一到,高亮就跳回第一项,直到鼠标再动。键盘选择也会被打断。 - **建议**:菜单已打开且 NPC 没变时只更新选项,不要重建对象,保留 `hoveredOptionIdx`。 - **已有 issue**:—
Author
Owner

Resolved in commit 171f7c0 (Milestone M6 Phase 1: World Panels, NPC Menus, Waypoints, Tooltips & Fail-Fast parity). Verified with tests/client/world-panels-batch6.test.ts and npm run typecheck.

Resolved in commit 171f7c0 (Milestone M6 Phase 1: World Panels, NPC Menus, Waypoints, Tooltips & Fail-Fast parity). Verified with tests/client/world-panels-batch6.test.ts and npm run typecheck.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#665
No description provided.