port: ItemData, ItemManager, PythonNonPlayer + LoadLocaleData (batch 2 P3-a)
Verbatim 40250 GameLib ItemData/ItemManager and UserInterface PythonNonPlayer(+Module) replace their pending stand-ins and the nonplayer module stub. LoadLocaleData's body moves into the platform CPythonApplication stand-in, so the select phase loads item_proto and mob_proto; CPythonSkill is still pending, so it returns false after the tables load. login_flow checks item 19 (Sword+9) and mob 101 (Wild Dog), offline and live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ce9f96398e
commit
f0564a7f12
@@ -434,6 +434,8 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
||||
批次 2 P0 收尾(2026-09-24):`UserInterface/PythonCharacterManager.cpp`(54 函数)与 `InstanceBaseMovement.cpp`(32 函数)在 2V2-b 已原样拷入 `port/`,2V3 起即是运行路径(行走、点地移动、远程角色同步都经它们),本轮逐行比对 40250(仅 include 大小写、注释编码和两处 `// PORT:` 修正:`CreateInstance` 的 TraceError 传 `m_dwVID`,`NEW_SyncPixelPosition` 用 32 位 `LONG &`),确认 pending/platform 无重复定义后标 PORTED。P0 队列已清空;P1 飞行物(同日):`GameLib/FlyingData`、`FlyingInstance`、`FlyingObjectManager`、`FlyTrace` 与 Python 模块 `PythonEffectModule`(`effect`)、`PythonFlyModule`(`fly`)原样移植,删除 `pending/GameLib/FlyingObjectManager.cpp` 替身和两个模块的桩,`initeffect()`/`initfly()` 按 40250 顺序在 `initnet()` 后调用;`CFlyingManager::SetMapManagerPtr(&CPythonBackground)` 按 40250 构造函数接上;`FlyTrace.h` 加 `// PORT:` include 以过头文件门禁。`CMapManager::GetTerrainHeight`(飞行物落地判断用)在 pending 层按 native 地形高度实现,`GetHeight` 转发到它(地图物件高度待 `CMapOutdoor`)。`ActorInstanceData.cpp` 早已原样在 port/,一并标 PORTED。`port.login_flow` 断言 `playersettingmodule.py` 已经 `effect.RegisterIndexedFlyData` 注册并能解析 `.msf`。特效本体(`CEffectManager`)仍是平台桩,飞行物不可见;队列里 P0/P1 已清空,剩下 P2 网络单元(多数已在 2V1 原样拷入 port/,待逐个核对后标记)。同日核对:队列中 28 个早已拷入 port/ 的单元(网络流各阶段、`AccountConnector`、`NetStream`/`NetDevice`/`NetAddress`、`EterPack*`、`lzo`/`tea`/`cipher`/`Timer` 等,372 函数)用 `port_copy.py diff` 比对,23 个与机械拷贝完全一致,其余 5 个的手改全部带 `// PORT:`(CP949 转义、`e-` pp-number、32 位 `LONG`、包密钥外置、`lzo_uint` 宽度、`ActivateCipher` 解密同批已收密文),平台层无同名替身,标 PORTED;logic 层 54.8% → 67.9%。队列剩余 P2 仅 `ServerStateChecker`(`ServerStateChecker` 模块仍是桩),其后是 P3 物品/小地图/名牌。
|
||||
P2 收尾(2026-09-24):`ServerStateChecker.cpp` 与 `ServerStateCheckerModule.cpp` 原样移植,删除模块桩,实例按 `CPythonApplication::m_kServerStateChecker` 由 PythonBoot 持有,`initServerStateChecker()` 按 40250 顺序调用。`port.login_flow` 在选角后按 intrologin 的 `__RequestServerStateList` 调 `AddChannel`/`Request`/`Update`,假服新增状态端口按 `CInputHandshake`+`CInputDB::RespondChannelStatus` 应答(先握手字节,再 `210,n,TChannelStatus[n],1`);`TChannelStatus::nPort` 是 short,假服临时端口 >32767 对不上自身频道,离线以第二个频道 13002 为证。`port.login_live` 真服返回 {1: 1, 2: 1}。P2 队列清空,下一步 P3 物品链。
|
||||
|
||||
P3-a(2026-09-24):`GameLib/ItemData.cpp`、`GameLib/ItemManager.cpp`、`UserInterface/PythonNonPlayer.cpp` 与 `PythonNonPlayerModule.cpp` 原样移植,删除三个 pending 替身与 nonplayer 模块桩,`initNonPlayer()` 按 40250 顺序插在 `initPlayer()` 之后。`LoadLocaleData` 的函数体原样放进平台 `PythonApplication.cpp`(选角阶段 `localeInfo.LoadLocaleData()` 调它):读 item_list/item_proto/itemdesc 与 mob_proto;`CPythonSkill` 仍是替身,`RegisterSkillDesc` 失败后返回 false(脚本不看返回值),记 ADAPTED。`port.login_flow` 3c 步:物品 19 = Sword+9(武器、refine 9、模型可载),怪 101 = Wild Dog;真服同样通过。下一步 P3-b:`PythonItem` + `PythonItemModule`(地面物品、item 模块)。
|
||||
|
||||
每个切片都必须同时跑 legacy/port 双路回归;只有 2V3 稳定并把默认路由切到 `port` 后,才能删除总开关和剩余 legacy 宿主。
|
||||
|
||||
## 5. 数据源切换:m2dev assets → 40250
|
||||
|
||||
Reference in New Issue
Block a user