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_crimes_methods4229938.go

27 lines
1.7 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
//
// S2C SyncAgentCrimes(68251759) —— 「这个 NPC 身上有什么罪」。
// ⛑⛑ 这是里希盘查整条链路的开关,2026-09-25 才挖出来,之前一直没发,
// 所以盘查面板开得出来、但点任何选项都不生效(用户原话「点了全部没反应」)。
// 实证链条:
// · PoliceExamineManager.lua:1050
// local defaultCrimes = self.module.Crimes and self.module.Crimes:ToTable() or {}
// → TryAddFine(id, sync, defaultCrimes) → if table.contains(defaultCrimes, fineId)
// ⇒ Crimes 里没有的罪名,永远加不进去,开罚单 / 执法建议全是空的。
// · PoliceSearchPanelStore.lua:111-117 搜身 / 酒测的结果也是读
// module.Crimes(contains(Crimes, PoliceFineConfig.DeepDrunk))⇒ 同理恒空。
// · Crimes 装的是 PoliceFineConfig.Id(不是 crimeType —— crimeType→fineId
// 的映射在 GetFineByCrimeType 里单独做)。
// · PoliceExamineManager.lua:877/919(CheckHintOptions / CheckFines)也读它
// ⇒ 右上「执法建议」同样是空的。
// 契约来源:C# LX6.Service.GameSceneToClientImpl.SyncAgentCrimes(ulong id, List<uint> crimes)
// (dump.cs:171658 / 1731058,接口 id 见 MethodId.cs:3192)。
// ⛑ 极性 CSharpOnly(RPCDeserializeAuto.lua:794)⇒ lua 侧没有 reader,
// 只有 C# 收 —— 字节必须与 C# 反序列化器一致。
// ⛑ 列表线格式取自 RPCSerializeAuto.lua:4688(GmCreatePedData.Crimes 用的同一个 writer):
// Base.WriteList7Bit(..., writer.WriteUInt32, 0, "Crimes", true, 0, nil)
// ⇒ [0xFF 有值][Int7 count+1][u32 × count],与 RPCSerializeBase.lua:164 一致
// (非 nil 时恒写 0xFF,再写 7bit count)。
//