[M20-P1] 实装 BNCS + MCP 登录、选角与建房/进房协议链,接线 bnet.html #509
Labels
No Label
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: troytt/diablo2-web#509
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景与目标
实现 Battle.net 经典登录协议(BNCS,TCP 6112)与 Realm 角色/房间管理协议(MCP,TCP 6113),将
bnet.html(src/frontend/flow-state.ts)的bnet_connecting、bnet_login、char_create、char_select、bnet_lobby五个前置阶段从本地 mock 切换到真实 PvPGN 服务端。核心内容与 1.13c Ground Truth 对标
bnetd, TCP 6112):[0xFF, packetId, uint16LE length]分帧与编解码。SID_AUTH_INFO (0x50)、SID_PING (0x25)、SID_AUTH_CHECK (0x51)(1.13c CheckRevision 与 D2 Classic + LoD 双 CD-Key 哈希)、SID_LOGONRESPONSE2 (0x3A)/ 账号注册、SID_QUERYREALMS2 (0x40)、SID_LOGONREALMEX (0x3E)(获取 MCP Cookie、IP、端口与 UniqueName)。d2cs, TCP 6113):[uint16LE length, packetId]分帧与编解码。MCP_STARTUP (0x01)、MCP_CHARLIST2 (0x19)(解析角色列表与 statstring)、MCP_CHARCREATE (0x02)、MCP_CHARLOGON (0x07)、MCP_CREATEGAME (0x03)、MCP_JOINGAME (0x04)(获取 D2GS IP、GameHash 与 GameToken)、MCP_GAMELIST (0x05)。bnet.html前置 UI 与角色外观接线:flow-state.ts各阶段状态转换绑定到真实 BNCS/MCP 请求与错误码提示。MCP_CHARLIST2返回的 1.13c 角色 statstring(职业、等级、资料片/专家级标志、16 部位装备外观字节),驱动 8 槽选角界面渲染真实角色外观。验收标准
bnet.html走通:登录账号 → 创建/选择角色 → 创建游戏 → 拿到MCP_JOINGAME返回的 D2GS 连接凭据(GameHash / GameToken)。Game.exe中创建并穿戴装备的角色,在bnet.html选角界面的等级、职业与外观显示一致。