This repository has been archived on 2026-10-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Ananta-ps/pkg/protocol/methods/police_arrest_methods4229938.go

45 lines
2.6 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package methods
//
// 逮捕链路里唯一需要解析请求体的 C2S:AskPoliceExamInteract(63233964)。
// ⛑⛑ 这个形状是猜的,不是取证来的。理由与风险都写在这里,别在别处重复踩:
// · 它在全部客户端 lua 里零引用(既没有 AskPoliceExamInteract_Serializer,
// 也没有任何业务调用点)⇒ 由 C# 侧 gPoliceJobManager.cs 发起,
// LuaGen/AutoGen 那份"契约真源"里查不到它。
// · RpcSurface.json 里也没有这一条(只有 AskGetArrestTimes / AskIsArrested /
// AskPoliceEffectiveExam 三条),所以连 C# 签名都拿不到。
// · 按同族命名推断它是「盘查面板里点了一个选项」:第一个字段是目标 pid(u64)、第二个是选项 id。
// 顶层按 Inline 处理(参考硬规则 136:首字段是 primitive 就没有 marker)。
// ⇒ 因此调用方必须用 TryGetArgs 而不是 GetArgs,解析失败就退化成
// 「只回执 + 打 hex」,绝不能让异常冒出去(这是 INVOKE,服务端抛异常 = 客户端 await 到超时)。
// 真正确认形状的办法是实机抓一条:日志里的 [POLICE-ARREST] exam-interact hex=...
// 就是为此留的取证口子。
//
//
// S2C SyncAgentPoliceExamData(68635920) —— 「这个 NPC 的案底」。
// 契约 100% 取自客户端 LuaGen/AutoGen/RPCDeserializeAuto.lua(不猜):
// <code>
// self.midToReader[68635920] = function (reader)
// local agentEntityId = reader.ReadUInt64(reader)
// local data = Base.ReadComplex(reader, Auto.Reader[508])
// end
// Auto.Reader[508] = function (reader, obj)
// obj.FineTimes = reader.ReadUInt32(reader)
// obj.Fines = Base.ReadDict7Bit(reader, ReadUInt32, ReadBoolean)
// end
// </code>
// 即线格式 [u64 agentEntityId][0xFF][u32 FineTimes][Dict7Bit&lt;u32,bool&gt; Fines]。
// ⛑ 顶层 Inline = true:首字段是 primitive ⇒ 帧首没有 marker(硬规则 136 同源判据)。
// ⛑ Complex 自带 0xFF:与 SyncSpiritPoliceJobInfo 同族,那份注释写明了
// "frame is [spiritId][0xFF][fields]"。
// ⛑ 极性是 LuaOnly(midToExportOption[68635920])⇒ **只有 lua 收得到、C# 不参与**。
// 这正是选它当「开盘查面板」触发信号的理由:客户端 lua
// PoliceJobManager.OnSyncAgentPoliceExamData 会收到,我们注入的代码就钩在那里。
//
// Auto.Reader[508] —— 案底正文。
//
// ⛑ 必须标 [UxContract](不给的话 UxSerializer 直接抛
// ... is not a UX contract —— 是 _ux_wire_check 抓出来的,别等实机)。
// ⛑ 不要加 Inline:它是 Complex,帧里自带 0xFF marker(硬规则 136 反例)。
//