51 lines
3.4 KiB
Go
51 lines
3.4 KiB
Go
package methods
|
||
|
||
//
|
||
// S2C 68396133 SyncDetachBattleUnit(ulong id) —— 死亡后卸载战斗模块(T1-17,donor_7k 独有那条)。
|
||
// 与 SyncLogicAgentLeave 同型:单 u64、CSharpOnly(`RPCDeserializeAuto.lua:815`
|
||
// 标 `CSharpOnly`,Lua 侧无 reader),客户端 `GameSceneToClientImpl` 有 public override 真实现
|
||
// (`dump.cs:170305` / 抽象声明 `:1731892`)⇒ 照同一套 Inline 裸标量写法即可。
|
||
//
|
||
//
|
||
// S2C 68838628 `SyncLogicAgentSyncData(in LogicAgentSyncData)` —— **服务端驱动**的 agent 位移包。
|
||
// ★★★ 这是"人出现但不走"的最终解(2026-09-20):
|
||
// 发了 `SyncManagedLogicAgent` 就等于告诉客户端"这个 agent 归服务端管",
|
||
// 客户端自己的 crowd/游荡 AI 随即停手、等服务端喂位置 —— 我们之前只建人、从不喂位置 ⇒ 全员定住。
|
||
// 字段顺序照 dump 的 `LogicAgentSyncData`(AgentId 0x0 / Position 0x8 / Rotation 0x14 / MoveId 0x20)。
|
||
// `MoveId` = `BattleMoveActionType`(0 Unknown / 1 Idle / **2 WalkFront** / 6 Run)。
|
||
// 与 C2S 版(`AskReportLogicAgentSyncData`,客户端上报自己算的位置)是同一个结构体,方向相反。
|
||
// ⛑️ 顶层用 Inline:客户端签名是 `in` struct,不写 0xFF 对象标记。
|
||
//
|
||
// 2026-10-03:切人演出的**收尾握手**两个包,主线从来没发过(methodId 常量表里有、DTO 没有)。
|
||
//
|
||
// 出处 = CBT2 官方测试服务端 `AnantaTestGameServer/.../ClientToGameserver.cs:3142-3160`
|
||
// `PerformSpiritSwitch` 的第 5 / 5b 步:
|
||
// SyncPlayerSwitchSpiritInSitu → SyncManagedSpirit + SyncManagedAgent
|
||
// 原注释:SyncManagedSpirit + SyncManagedAgent = "explicitly transfer control
|
||
// (**fix: frozen after switch**)"。
|
||
//
|
||
// ⛑⛑⛑ **契约以 4229938 为准,不能照抄 CBT2 的包体**:
|
||
// · `SyncPlayerSwitchSpiritInSitu` 在本版是 **2 字段** ——
|
||
// `GameSceneToClientImpl.cs:647 SyncPlayerSwitchSpiritInSitu(uint templateId, ulong spiritId)`;
|
||
// CBT2 服务端发的是 3 字段(pid / spiritId / newSpiritInstanceId)⇒ 照抄会字段错位。
|
||
// · `SyncPlayerCurrentSpirit` 两边连 methodId 都不同(CBT2 68314091 / 本版 68830687)。
|
||
// 三个包的 **methodId 两边完全一致**(68412586 / 68386314 / 68672133),所以能直接用。
|
||
//
|
||
// SyncManagedSpirit(ulong pid, ulong id, int moveId) 与
|
||
// SyncManagedAgent(ulong pid, ulong id, int moveId) 共用的包体
|
||
// (`GameSceneToClientImpl.cs:766 / :738`,签名逐字相同)。
|
||
//
|
||
// PreSwitchSpiritData is an inline struct: there is no leading complex marker.
|
||
// Client -> GameScene AskSwitchSpirit(uint spiritId).
|
||
// Client -> GameScene loading barrier messages.
|
||
// Client -> GameScene movement report: List7Bit<LogicAgentSyncData>.
|
||
// Client movement contracts from RPCSerializeAuto.lua (build 4229938).
|
||
// Full SyncUnitPositionAndFacing tuple. The last two complex values are always null on our path;
|
||
// keeping named null-only placeholders documents the 4229938 wire instead of writing marker bytes by hand.
|
||
//
|
||
// Client -> GameScene EnterRaid(uint raidId, bool immediate), mid 62899289 ——
|
||
// GM 传送面板用的原生副本/场景切换请求。
|
||
// 移植自捐赠端 DremkaPS(2026-09-24,其 Methods/GameScene/WorldMethods.cs)。
|
||
// 字段布局抄客户端自己的 writer,两个标量裸写进 body,没有 type mark —— 故 Inline。
|
||
//
|