[Parity][inv-skills][S2][H] 纸娃娃槽位和背包格坐标写死,且与 inventory.txt 不一致;inventory.txt 从未加载 #682

Closed
opened 2026-10-02 11:42:54 +00:00 by troytt · 0 comments
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 公认行为。

来源审计项:inv-skills#4 — [S2][H] 纸娃娃槽位和背包格坐标写死,且与 inventory.txt 不一致;inventory.txt 从未加载

  • 位置:

    • src/client/ui/inventory.ts:88-104(INV_PANEL_ORIGIN、INV_GRID_ORIGIN、EQUIP_SLOTS_LAYOUT)。
    • 联机命中测试也用这些常量:src/client/ui/hud-manager.ts:1830-1983。
  • 代码:helm: { x: 400 + 132, y: 60 + 4, w: 58, h: 58, ... }、INV_GRID_ORIGIN = { x: 400 + 18, y: 60 + 256, cols: 10, rows: 4, cellPx: 29 }

  • 原版:inventory.txt 的 Amazon2…Assassin2 行(#17–21、#31、#32),7 行数值完全相同(V-data)。下表左列为代码的 x,y,w,h,右列为表中的 Left/Right/Top/Bottom:

    槽位 代码矩形 x,y,w,h inventory.txt L/R/T/B
    helm / head 532,64,58,58 535/589/68/119
    amulet / neck 604,93,29,29 609/632/95/119
    weapon1 / rArm 418,107,58,116 420/475/107/219
    armor / torso 532,136,58,87 533/589/137/219
    weapon2 / lArm 648,107,58,116 651/706/107/219
    gloves 418,239,58,58 421/475/241/294
    ring1 / rHand 492,239,29,29 495/518/240/264
    belt 532,239,58,29 536/588/239/264
    ring2 / lHand 604,239,29,29 609/632/240/264
    boots / feet 648,239,58,58 652/706/242/294
    背包格原点 418,316 gridLeft 419 / gridTop 315(10×4、29 px 与表一致)
    面板 400,60,320×432 invLeft/Right/Top/Bottom 400/720/60/501
  • 影响:

    • 装备图标在槽内的居中位置偏 2–5 px。
    • 命中区域比原版大,把槽框外的边也算进去了。
    • 背包格整体偏 1 px。
    • 切换分辨率档(640×480 用 Amazon… 等不带 2 的行)时无法跟随数据。
  • 建议:加载 inventory.txt,按职业行取各槽的 Left/Right/Top/Bottom 和 grid 参数(800×600 用 *2 行)。

  • 已有 issue:—(#542 是大视口下的栏位偏移,与本条不同)

> **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 公认行为。 ### 来源审计项:`inv-skills#4` — [S2][H] 纸娃娃槽位和背包格坐标写死,且与 inventory.txt 不一致;inventory.txt 从未加载 - 位置: - `src/client/ui/inventory.ts:88-104`(`INV_PANEL_ORIGIN`、`INV_GRID_ORIGIN`、`EQUIP_SLOTS_LAYOUT`)。 - 联机命中测试也用这些常量:`src/client/ui/hud-manager.ts:1830-1983`。 - 代码:`helm: { x: 400 + 132, y: 60 + 4, w: 58, h: 58, ... }`、`INV_GRID_ORIGIN = { x: 400 + 18, y: 60 + 256, cols: 10, rows: 4, cellPx: 29 }` - 原版:inventory.txt 的 Amazon2…Assassin2 行(#17–21、#31、#32),7 行数值完全相同(V-data)。下表左列为代码的 x,y,w,h,右列为表中的 Left/Right/Top/Bottom: | 槽位 | 代码矩形 x,y,w,h | inventory.txt L/R/T/B | |---|---|---| | helm / head | 532,64,58,58 | 535/589/68/119 | | amulet / neck | 604,93,29,29 | 609/632/95/119 | | weapon1 / rArm | 418,107,58,116 | 420/475/107/219 | | armor / torso | 532,136,58,87 | 533/589/137/219 | | weapon2 / lArm | 648,107,58,116 | 651/706/107/219 | | gloves | 418,239,58,58 | 421/475/241/294 | | ring1 / rHand | 492,239,29,29 | 495/518/240/264 | | belt | 532,239,58,29 | 536/588/239/264 | | ring2 / lHand | 604,239,29,29 | 609/632/240/264 | | boots / feet | 648,239,58,58 | 652/706/242/294 | | 背包格原点 | 418,316 | gridLeft 419 / gridTop 315(10×4、29 px 与表一致) | | 面板 | 400,60,320×432 | invLeft/Right/Top/Bottom 400/720/60/501 | - 影响: - 装备图标在槽内的居中位置偏 2–5 px。 - 命中区域比原版大,把槽框外的边也算进去了。 - 背包格整体偏 1 px。 - 切换分辨率档(640×480 用 Amazon… 等不带 2 的行)时无法跟随数据。 - 建议:加载 inventory.txt,按职业行取各槽的 Left/Right/Top/Bottom 和 grid 参数(800×600 用 `*2` 行)。 - 已有 issue:—(#542 是大视口下的栏位偏移,与本条不同)
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#682
No description provided.