fix(protocol): 修正反查漏掉 \$ 前缀类名的错位,回放错误 12→6

This commit is contained in:
TermiNexus committed 2026-10-21 01:53:51 +08:00
1 parent 5721158e6c
commit 3b58a43063
10 files changed
+3911 -56

No files matched your search

File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -1 +1 @@
{"at":"2026-10-20T17:33:31.576Z","href":"http://127.0.0.1:8080/","count":363,"entries":[{"modelId":"821863604528384663","ctor":"lt","ctorSrc":"function lt() {\n at();\n }","keys":[],"protoKeys":[],"u7h":"function (t) {\n this.b1x2_1 = t.r7g(new E(m(w), !1));\n }","t7h":"function (t) {\n var n = ct(this).t7h(t),\n i = n instanceof w ? n : p();\n if (d(i, new w(0, 0))) return I(T(ct(this).t7h(t)), i);\n var r = at().a1x2().o7o(i),\n e = T(r.t7h(t));\n return I(e, i);\n }","s7h":"function (t, n) {}"},{"modelId":"3152693668290247629","ctor":"qu","ctorSrc":"function qu() {}","keys":["qdy_1"],"protoKeys":[],"u7h":"function (t) {\n this.qdy_1 = t.r7g(new Ei(new ki(bi(up), !1), !1));\n }","t7h":"function (t) {\n var n = sp(),\n i = n,\n r = bu(this).t7h(t);\n return ((i.rdy_1 = null != r && Ii(r, Ti) ? r : wi()), n);\n }","s7h":"function (t, n) {\n if (null == n) throw vi(\"Object is null. Use @ProtocolOptional annotation.\");\n var i = n instanceof op ? n : wi();\n bu(this).s7h(t, i.sdy());\n }"},{"modelId":"2547093126916834195","ctor":"Pt","ctorSrc":"function Pt() {}","keys":["daw_1","eaw_1","faw_1","gaw_1","haw_1","iaw_1"],"protoKeys":[],"u7h":"function (t) {\n ((this.daw_1 = t.r7g(new $(P().sb(), !0))),\n (this.eaw_1 = t.r7g(new $(P().sb(), !0))),\n (this.faw_1 = t.r7g(new $(P().sb(), !0))),\n (this.gaw_1 = t.r7g(new $(P().sb(), !0))),\n (this.haw_1 = t.r7g(new $(P().sb(), !0))),\n (this.iaw_1 = t.r7g(new $(P().sb(), !0))));\n }","t7h":"function (t) {\n var n = Ri(),\n i = n,\n r = Ct(this).t7h(t);\n i.jaw_1 = null == r || \"number\" == typeof r ? r : S();\n var e = n,\n u = Et(this).t7h(t);\n e.kaw_1 = null == u || \"number\" == typeof u ? u : S();\n var s = n,\n o = Tt(this).t7h(t);\n s.law_1 = null == o || \"number\" == typeof o ? o : S();\n var _ = n,\n h = It(this).t7h(t);\n _.maw_1 = null == h || \"number\" == typeof h ? h : S();\n var a = n,\n c = At(this).t7h(t);\n a.naw_1 = null == c || \"number\" == typeof c ? c : S();\n var l = n,\n f = Rt(this).t7h(t);\n return ((l.oaw_1 = null == f || \"number\" == typeof f ? f : S()), n);\n }","s7h":"function (t, n) {\n if (null == n) throw I(\"Object is null. Use @ProtocolOptional annotation.\");\n var i = n instanceof Pi ? n : S();\n (Ct(this).s7h(t, i.jaw_1),\n Et(this).s7h(t, i.kaw_1),\n Tt(this).s7h(t, i.law_1),\n It(this).s7h(t, i.maw_1),\n At(this).s7h(t, i.naw_1),\n Rt(this).s7h(t, i.oaw_1));\n }"},{"modelId":"1164458258646872337","ctor":"A_","ctorSrc":"function A_() {}","keys":["lcm_1"],"protoKeys":[],"u7h":"function (t) {\n this.lcm_1 = t.r7g(new Ue(new je(Re(Ve), !1), !1));\n }","t7h":"function (t) {\n var n = wd(),\n i = n,\n r = I_(this).t7h(t);\n return ((i.mcm_1 = null != r && Ge(r, Fe) ? r : Ce()), n);\n }","s7h":"function (t, n) {\n if (null == n) throw Te(\"Object is null. Use @ProtocolOptional annotation.\");\n var i = n instanceof dd ? n : Ce();\n I_(this).s7h(t, i.icm());\n }"},{"modelId":"8618289906968528240","ctor":"Rt","ctorSrc":"function Rt() {}","keys":["lhk_1","mhk_1","nhk_1","ohk_1","phk_1"],"protoKeys":[],"u7h":"function (t) {\n ((this.lhk_1 = t.r7g(new v(f().pb(), !1))),\n (this.mhk_1 = t.r7g(new q(new v(w(C), !1), !1))),\n (this.nhk_1 = t.r7g(new q(new v(w(x), !1), !1))),\n (this.ohk_1 = t.r7g(new v(w(T), !1))),\n (this.phk_1 = t.r7g(new v(w(T), !1))));\n }","t7h":"function (t) {\n var n = ki(),\n i = n,\n r = Ct(this).t7h(t);\n i.qhk_1 = null != r && \"boolean\" == typeof r ? r : m();\n var e = n,\n u = Et(this).t7h(t);\n e.rhk_1 = null != u && $(u, y) ? u : m();\n var s = n,\n o = Tt(this).t7h(t);\n s.shk_1 = null != o && $(o, y) ? o : m();\n var _ = n,\n h = It(this).t7h(t);\n _.thk_1 = h instanceof T ? h : m();\n var a = n,\n c = At(this).t7h(t);\n return (\n (a.uhk_1 = c instanceof T ? c : m()),\n (n.vhk_1 = t.e7h_1.r2u()),\n (n.whk_1 = t.e7h_1.r2u()),\n n\n );\n }","s7h":"function (t, n) {\n if (null == n) throw z(\"Object is null. Use @ProtocolOptional annotation.\");\n var i = n instanceof zi ? n : m();\n (Ct(this).s7h(t, i.qhk_1),\n Et(this).s7h(t, i.xhk()),\n Tt(this).s7h(t, i.yhk()),\n It(this).s7h(t, i.zhk()),\n At(this).s7h(t, i.ahl()),\n t.e7h_1.m2u(i.vhk_1),\n t.e7h_1.m2u(i.whk_1));\n }"},{"modelId":"7588919819099098108","ctor":"Yr"Line truncated
{"at":"2026-10-20T17:43:16.698Z","href":"http://127.0.0.1:8080/","count":363,"entries":[{"modelId":"821863604528384663","ctor":"lt","ctorSrc":"function lt() {\n at();\n }","keys":[],"protoKeys":[],"u7h":"function (t) {\n this.b1x2_1 = t.r7g(new E(m(w), !1));\n }","t7h":"function (t) {\n var n = ct(this).t7h(t),\n i = n instanceof w ? n : p();\n if (d(i, new w(0, 0))) return I(T(ct(this).t7h(t)), i);\n var r = at().a1x2().o7o(i),\n e = T(r.t7h(t));\n return I(e, i);\n }","s7h":"function (t, n) {}"},{"modelId":"3152693668290247629","ctor":"qu","ctorSrc":"function qu() {}","keys":["qdy_1"],"protoKeys":[],"u7h":"function (t) {\n this.qdy_1 = t.r7g(new Ei(new ki(bi(up), !1), !1));\n }","t7h":"function (t) {\n var n = sp(),\n i = n,\n r = bu(this).t7h(t);\n return ((i.rdy_1 = null != r && Ii(r, Ti) ? r : wi()), n);\n }","s7h":"function (t, n) {\n if (null == n) throw vi(\"Object is null. Use @ProtocolOptional annotation.\");\n var i = n instanceof op ? n : wi();\n bu(this).s7h(t, i.sdy());\n }"},{"modelId":"2547093126916834195","ctor":"Pt","ctorSrc":"function Pt() {}","keys":["daw_1","eaw_1","faw_1","gaw_1","haw_1","iaw_1"],"protoKeys":[],"u7h":"function (t) {\n ((this.daw_1 = t.r7g(new $(P().sb(), !0))),\n (this.eaw_1 = t.r7g(new $(P().sb(), !0))),\n (this.faw_1 = t.r7g(new $(P().sb(), !0))),\n (this.gaw_1 = t.r7g(new $(P().sb(), !0))),\n (this.haw_1 = t.r7g(new $(P().sb(), !0))),\n (this.iaw_1 = t.r7g(new $(P().sb(), !0))));\n }","t7h":"function (t) {\n var n = Ri(),\n i = n,\n r = Ct(this).t7h(t);\n i.jaw_1 = null == r || \"number\" == typeof r ? r : S();\n var e = n,\n u = Et(this).t7h(t);\n e.kaw_1 = null == u || \"number\" == typeof u ? u : S();\n var s = n,\n o = Tt(this).t7h(t);\n s.law_1 = null == o || \"number\" == typeof o ? o : S();\n var _ = n,\n h = It(this).t7h(t);\n _.maw_1 = null == h || \"number\" == typeof h ? h : S();\n var a = n,\n c = At(this).t7h(t);\n a.naw_1 = null == c || \"number\" == typeof c ? c : S();\n var l = n,\n f = Rt(this).t7h(t);\n return ((l.oaw_1 = null == f || \"number\" == typeof f ? f : S()), n);\n }","s7h":"function (t, n) {\n if (null == n) throw I(\"Object is null. Use @ProtocolOptional annotation.\");\n var i = n instanceof Pi ? n : S();\n (Ct(this).s7h(t, i.jaw_1),\n Et(this).s7h(t, i.kaw_1),\n Tt(this).s7h(t, i.law_1),\n It(this).s7h(t, i.maw_1),\n At(this).s7h(t, i.naw_1),\n Rt(this).s7h(t, i.oaw_1));\n }"},{"modelId":"1164458258646872337","ctor":"A_","ctorSrc":"function A_() {}","keys":["lcm_1"],"protoKeys":[],"u7h":"function (t) {\n this.lcm_1 = t.r7g(new Ue(new je(Re(Ve), !1), !1));\n }","t7h":"function (t) {\n var n = wd(),\n i = n,\n r = I_(this).t7h(t);\n return ((i.mcm_1 = null != r && Ge(r, Fe) ? r : Ce()), n);\n }","s7h":"function (t, n) {\n if (null == n) throw Te(\"Object is null. Use @ProtocolOptional annotation.\");\n var i = n instanceof dd ? n : Ce();\n I_(this).s7h(t, i.icm());\n }"},{"modelId":"8618289906968528240","ctor":"Rt","ctorSrc":"function Rt() {}","keys":["lhk_1","mhk_1","nhk_1","ohk_1","phk_1"],"protoKeys":[],"u7h":"function (t) {\n ((this.lhk_1 = t.r7g(new v(f().pb(), !1))),\n (this.mhk_1 = t.r7g(new q(new v(w(C), !1), !1))),\n (this.nhk_1 = t.r7g(new q(new v(w(x), !1), !1))),\n (this.ohk_1 = t.r7g(new v(w(T), !1))),\n (this.phk_1 = t.r7g(new v(w(T), !1))));\n }","t7h":"function (t) {\n var n = ki(),\n i = n,\n r = Ct(this).t7h(t);\n i.qhk_1 = null != r && \"boolean\" == typeof r ? r : m();\n var e = n,\n u = Et(this).t7h(t);\n e.rhk_1 = null != u && $(u, y) ? u : m();\n var s = n,\n o = Tt(this).t7h(t);\n s.shk_1 = null != o && $(o, y) ? o : m();\n var _ = n,\n h = It(this).t7h(t);\n _.thk_1 = h instanceof T ? h : m();\n var a = n,\n c = At(this).t7h(t);\n return (\n (a.uhk_1 = c instanceof T ? c : m()),\n (n.vhk_1 = t.e7h_1.r2u()),\n (n.whk_1 = t.e7h_1.r2u()),\n n\n );\n }","s7h":"function (t, n) {\n if (null == n) throw z(\"Object is null. Use @ProtocolOptional annotation.\");\n var i = n instanceof zi ? n : m();\n (Ct(this).s7h(t, i.qhk_1),\n Et(this).s7h(t, i.xhk()),\n Tt(this).s7h(t, i.yhk()),\n It(this).s7h(t, i.zhk()),\n At(this).s7h(t, i.ahl()),\n t.e7h_1.m2u(i.vhk_1),\n t.e7h_1.m2u(i.whk_1));\n }"},{"modelId":"7588919819099098108","ctor":"Yr"Line truncated
+23 -8
View File
@@ -42,7 +42,9 @@ DumpPath = os.path.join(NamesDir, 'regdump_model.json')
OutPath = os.path.join(NamesDir, 'model_binding.json')
# u7h/t7h 的赋值点:Se(ds).u7h = function (...) / x(lt).t7h = function (...)
AssignRe = re.compile(r'\((\w+)\)\.(u7h|t7h)\s*=\s*function')
# 注意类名里允许 `$`:Kotlin/JS 的局部类常被命名为 `$s`、`j_` 这类;
# 写成 \w+ 会漏掉 `$s`,从而把「最近的前一个 u7h」误当成本类(曾把 $s 误判成 bs)。
AssignRe = re.compile(r'\(([\w$]+)\)\.(u7h|t7h)\s*=\s*function')
ModuleRe = re.compile(r'module_(\d+)\.js$')
@@ -135,12 +137,20 @@ def Main():
if Hit:
Module, Codec = Hit
Key = Module + '::' + Codec
# 自洽性校验:运行期 codec 实例的槽位名(keys)应与 codec_fields 里该 codec 的 Slots 一致。
# 不一致说明「源码反查落到了同名的另一个类」或字段表抽错,必须显式标出来,不能静默使用。
Slots = [S.get('Slot') for S in ((Codecs.get(Key) or {}).get('Slots') or [])]
RuntimeKeys = [str(K) for K in (E.get('keys') or [])]
SlotsOk = sorted(Slots) == sorted(RuntimeKeys)
Resolved.append({
'ModelId': ModelId,
'Module': Module,
'Codec': Codec,
'Key': Key,
'InCodecFields': Key in Codecs,
'SlotsOk': SlotsOk,
'Slots': Slots,
'RuntimeKeys': RuntimeKeys,
'Ctor': E.get('ctor'),
'Keys': E.get('keys'),
})
@@ -148,29 +158,34 @@ def Main():
Unresolved.append({'ModelId': ModelId, 'Ctor': E.get('ctor'), 'Keys': E.get('keys')})
MissingCodec = [R for R in Resolved if not R['InCodecFields']]
SlotMismatch = [R for R in Resolved if not R['SlotsOk']]
Out = {
'Note': '运行时 modelId → codec 的权威绑定:u7h/t7h 源码文本反查模块 + 类名;'
'InCodecFields=false 表示绑定已确定但 codec_fields 还没抽出该 codec 的字段表。',
'InCodecFields=false 表示绑定已确定但 codec_fields 还没抽出该 codec 的字段表;'
'SlotsOk=false 表示反查到的类与运行期 codec 槽位不一致(疑似落在同名类上)。',
'Source': 'names/regdump_model.json(镜像站 module_61860.n7o 采集)',
'Count': len(Entries),
'Resolved': len(Resolved),
'MissingCodec': len(MissingCodec),
'SlotMismatch': len(SlotMismatch),
'AmbiguousCount': len(Ambiguous),
'UnresolvedCount': len(Unresolved),
'Entries': Resolved,
'MissingCodecList': MissingCodec,
'SlotMismatchList': SlotMismatch,
'Ambiguous': Ambiguous,
'Unresolved': Unresolved,
}
with open(OutPath, 'w', encoding='utf-8') as F:
json.dump(Out, F, ensure_ascii=False, indent=1)
print('已写入 ' + OutPath)
print(' 反查成功 %d / %d;其中字段表缺失 %d;多解 %d;未解 %d' %
(len(Resolved), len(Entries), len(MissingCodec), len(Ambiguous), len(Unresolved)))
if MissingCodec:
print(' 字段表缺失的 codec(前 15):')
for R in MissingCodec[:15]:
print(' %s %s ctor=%s' % (R['ModelId'], R['Key'], R['Ctor']))
print(' 反查成功 %d / %d;其中字段表缺失 %d;槽位不一致 %d;多解 %d;未解 %d' %
(len(Resolved), len(Entries), len(MissingCodec), len(SlotMismatch), len(Ambiguous), len(Unresolved)))
if SlotMismatch:
print(' 槽位不一致(前 15):')
for R in SlotMismatch[:15]:
print(' %s %s 运行期=%s 字段表=%s' %
(R['ModelId'], R['Key'], R['RuntimeKeys'], R['Slots']))
if Ambiguous:
print(' 多解(前 5):')
for A in Ambiguous[:5]:
@@ -732,19 +732,19 @@ object Down47243Fl1793Codec : ModelCodec<Down47243Fl1793> {
}
// 下行 8895568346538829654|module_47243
data class IconsProviderCC9654(
data class KeysInfoCC9654(
val KeyType: Int,
val Field2: Int,
)
object IconsProviderCC9654Codec : ModelCodec<IconsProviderCC9654> {
override fun Decode(R: ByteReader, N: NullmapCursor): IconsProviderCC9654 {
object KeysInfoCC9654Codec : ModelCodec<KeysInfoCC9654> {
override fun Decode(R: ByteReader, N: NullmapCursor): KeysInfoCC9654 {
val KeyType = R.ReadInt()
val Field2 = R.ReadInt()
return IconsProviderCC9654(KeyType, Field2)
return KeysInfoCC9654(KeyType, Field2)
}
override fun Encode(W: ByteWriter, N: NullmapWriter, V: IconsProviderCC9654) {
override fun Encode(W: ByteWriter, N: NullmapWriter, V: KeysInfoCC9654) {
W.WriteInt(V.KeyType)
W.WriteInt(V.Field2)
}
@@ -1081,7 +1081,7 @@ object Down85183Yy6316Codec : ModelCodec<Down85183Yy6316> {
}
// 下行 7050167951547569950|module_85183
data class StreamWeaponCC9950(
data class TerminatorCC9950(
val Shooter: Long,
val StaticHitPoint: Vector3?,
val Targets: List<Long>?,
@@ -1089,17 +1089,17 @@ data class StreamWeaponCC9950(
val Field5: Int,
)
object StreamWeaponCC9950Codec : ModelCodec<StreamWeaponCC9950> {
override fun Decode(R: ByteReader, N: NullmapCursor): StreamWeaponCC9950 {
object TerminatorCC9950Codec : ModelCodec<TerminatorCC9950> {
override fun Decode(R: ByteReader, N: NullmapCursor): TerminatorCC9950 {
val Shooter = R.ReadLong()
val StaticHitPoint = Wire.ReadOpt(R, N) { R.ReadVector3() }
val Targets = Wire.ReadOpt(R, N) { Wire.ReadList(R) { R.ReadLong() } }
val TargetHitPoints = Wire.ReadOpt(R, N) { Wire.ReadList(R) { R.ReadVector3() } }
val Field5 = R.ReadInt()
return StreamWeaponCC9950(Shooter, StaticHitPoint, Targets, TargetHitPoints, Field5)
return TerminatorCC9950(Shooter, StaticHitPoint, Targets, TargetHitPoints, Field5)
}
override fun Encode(W: ByteWriter, N: NullmapWriter, V: StreamWeaponCC9950) {
override fun Encode(W: ByteWriter, N: NullmapWriter, V: TerminatorCC9950) {
W.WriteLong(V.Shooter)
Wire.WriteOpt(N, V.StaticHitPoint) { W.WriteVector3(it) }
Wire.WriteOpt(N, V.Targets) { Wire.WriteList(W, it) { W.WriteLong(it) } }
@@ -36,17 +36,17 @@ object Down85196Ch1818Codec : ModelCodec<Down85196Ch1818> {
}
// 下行 8836555743203700004|module_85196
data class UpgradeGarageItemCC0004(
data class GaragePreviewModelCC0004(
val Properties: List<Int>,
)
object UpgradeGarageItemCC0004Codec : ModelCodec<UpgradeGarageItemCC0004> {
override fun Decode(R: ByteReader, N: NullmapCursor): UpgradeGarageItemCC0004 {
object GaragePreviewModelCC0004Codec : ModelCodec<GaragePreviewModelCC0004> {
override fun Decode(R: ByteReader, N: NullmapCursor): GaragePreviewModelCC0004 {
val Properties = Wire.ReadList(R) { R.ReadInt() }
return UpgradeGarageItemCC0004(Properties)
return GaragePreviewModelCC0004(Properties)
}
override fun Encode(W: ByteWriter, N: NullmapWriter, V: UpgradeGarageItemCC0004) {
override fun Encode(W: ByteWriter, N: NullmapWriter, V: GaragePreviewModelCC0004) {
Wire.WriteList(W, V.Properties) { W.WriteInt(it) }
}
}
@@ -124,7 +124,7 @@ object ProtocolMetadata {
6743639250009365289L to ProtocolCommandMeta(6743639250009365289L, "StatisticsModelCC5289", "module_31908", listOf(ProtocolFieldMeta(1, "showResultTable", "bool"), ProtocolFieldMeta(2, "reward", "list<#UserReward>"), ProtocolFieldMeta(3, "", "i32"))),
6792909073115695089L to ProtocolCommandMeta(6792909073115695089L, "StatisticsTeamCC5089", "module_31908", listOf(ProtocolFieldMeta(1, "userStat", "list<#UserStat>"), ProtocolFieldMeta(2, "team", "enum<#Ar>"))),
6829237315734456316L to ProtocolCommandMeta(6829237315734456316L, "Down85183Yy6316", "module_85183", listOf(ProtocolFieldMeta(1, "size", "vector3"), ProtocolFieldMeta(2, "", "i32"), ProtocolFieldMeta(3, "position", "vector3"), ProtocolFieldMeta(4, "eulerAngles", "vector3"), ProtocolFieldMeta(5, "", "i32"))),
7050167951547569950L to ProtocolCommandMeta(7050167951547569950L, "StreamWeaponCC9950", "module_85183", listOf(ProtocolFieldMeta(1, "shooter", "i64"), ProtocolFieldMeta(2, "staticHitPoint", "opt<vector3>"), ProtocolFieldMeta(3, "targets", "opt<list<i64>>"), ProtocolFieldMeta(4, "targetHitPoints", "opt<list<vector3>>"), ProtocolFieldMeta(5, "", "i32"))),
7050167951547569950L to ProtocolCommandMeta(7050167951547569950L, "TerminatorCC9950", "module_85183", listOf(ProtocolFieldMeta(1, "shooter", "i64"), ProtocolFieldMeta(2, "staticHitPoint", "opt<vector3>"), ProtocolFieldMeta(3, "targets", "opt<list<i64>>"), ProtocolFieldMeta(4, "targetHitPoints", "opt<list<vector3>>"), ProtocolFieldMeta(5, "", "i32"))),
7158157536363117957L to ProtocolCommandMeta(7158157536363117957L, "Down85183HB7957", "module_85183", listOf(ProtocolFieldMeta(1, "shooter", "i64"), ProtocolFieldMeta(2, "direction", "vector3"), ProtocolFieldMeta(3, "targets", "list<#TargetHit>"))),
7206180669797280304L to ProtocolCommandMeta(7206180669797280304L, "Down47243Wf0304", "module_47243", listOf(ProtocolFieldMeta(1, "rewards", "list<#ContainerGivenItem>"))),
7216898623560510530L to ProtocolCommandMeta(7216898623560510530L, "CrisisEffectCC0530", "module_85183", listOf(ProtocolFieldMeta(1, "crisisModeType", "enum<#XC>"))),
@@ -154,9 +154,9 @@ object ProtocolMetadata {
8633711911613390575L to ProtocolCommandMeta(8633711911613390575L, "StatisticsDMCC0575", "module_31908", listOf(ProtocolFieldMeta(1, "usersStat", "list<#UserStat>"))),
8773959930134829056L to ProtocolCommandMeta(8773959930134829056L, "BonkWeaponCC9056", "module_85183", listOf(ProtocolFieldMeta(1, "target", "i64"), ProtocolFieldMeta(2, "hitPointLocal", "vector3"), ProtocolFieldMeta(3, "directionWorld", "vector3"))),
8814983091022938481L to ProtocolCommandMeta(8814983091022938481L, "ClanNotifierData8481", "module_37504", listOf(ProtocolFieldMeta(1, "userData", "list<#ClanNotifierData>"))),
8836555743203700004L to ProtocolCommandMeta(8836555743203700004L, "UpgradeGarageItemCC0004", "module_85196", listOf(ProtocolFieldMeta(1, "properties", "list<enum<#Xh>>"))),
8836555743203700004L to ProtocolCommandMeta(8836555743203700004L, "GaragePreviewModelCC0004", "module_85196", listOf(ProtocolFieldMeta(1, "properties", "list<enum<#Xh>>"))),
8874740556506734737L to ProtocolCommandMeta(8874740556506734737L, "GaussCC4737", "module_85183", listOf(ProtocolFieldMeta(1, "target", "i64"), ProtocolFieldMeta(2, "relativeHitPoint", "vector3"))),
8895568346538829654L to ProtocolCommandMeta(8895568346538829654L, "IconsProviderCC9654", "module_47243", listOf(ProtocolFieldMeta(1, "keyType", "enum<#Kt>"), ProtocolFieldMeta(2, "", "i32"))),
8895568346538829654L to ProtocolCommandMeta(8895568346538829654L, "KeysInfoCC9654", "module_47243", listOf(ProtocolFieldMeta(1, "keyType", "enum<#Kt>"), ProtocolFieldMeta(2, "", "i32"))),
8981442771483046461L to ProtocolCommandMeta(8981442771483046461L, "DominationCC6461", "module_85183", listOf(ProtocolFieldMeta(1, "team", "enum<#Ar>"))),
8992960192854306015L to ProtocolCommandMeta(8992960192854306015L, "Down47243Iv6015", "module_47243", listOf(ProtocolFieldMeta(1, "categories", "list<enum<#Sh>>"))),
9047763868814832699L to ProtocolCommandMeta(9047763868814832699L, "DemomanSfxCC2699", "module_85183", listOf(ProtocolFieldMeta(1, "position", "vector3"), ProtocolFieldMeta(2, "", "f32"))),
@@ -520,7 +520,7 @@ object DownlinkRegistry {
6947798386892132355L to F24635WtCodec,
7008460570137472565L to F24635WtCodec,
7036579732984679577L to UserNotifierCCCodec,
7050167951547569950L to StreamWeaponCC9950Codec,
7050167951547569950L to TerminatorCC9950Codec,
7051126889005555427L to PaymentRequestVariableCodec,
7051228255598370612L to TCodec,
7068923702545456415L to F24635WtCodec,
@@ -658,14 +658,14 @@ object DownlinkRegistry {
8779532205378268430L to TeamJuggernautCC9153Codec,
8813105874551881850L to UserNotifierCCCodec,
8814983091022938481L to ClanNotifierData8481Codec,
8836555743203700004L to UpgradeGarageItemCC0004Codec,
8836555743203700004L to GaragePreviewModelCC0004Codec,
8859088031384930809L to F24635WtCodec,
8872197650929809377L to F24635WtCodec,
8873090493582101677L to F24635WtCodec,
8874740556506734737L to GaussCC4737Codec,
8876484926014055516L to TCodec,
8891234703158239948L to F24635WtCodec,
8895568346538829654L to IconsProviderCC9654Codec,
8895568346538829654L to KeysInfoCC9654Codec,
8901564444462545914L to FacebookPaymentCCCodec,
8914117039835924034L to F24635WtCodec,
8920209472087903453L to FlameThrowerCCCodec,
@@ -1128,7 +1128,7 @@ object ModelRegistry {
5801057999588514016L to ResistancesCCCodec,
7822174537018024954L to GSWarningInfoModelCCCodec,
3152693668290247629L to IconsProviderCCCodec,
6726403008449784914L to IconsProviderCCCodec,
6726403008449784914L to KeysInfoCCCodec,
1417398836682569292L to PaymentCCCodec,
1009501302658881534L to PaymentLoaderCCCodec,
4748522118519647527L to PayModeCCCodec,
@@ -1292,14 +1292,14 @@ object ModelRegistry {
2172139419072369403L to SmokyCCCodec,
2235965200289058033L to SplashCCCodec,
2057487026153364495L to StreamWeaponCCCodec,
6855550629220038001L to StreamWeaponCCCodec,
6855550629220038001L to TerminatorCCCodec,
6210980129845088505L to TerminatorSFXCCCodec,
573691036321759779L to TeslaCCCodec,
5194655544597440038L to GlobeLightningCCCodec,
1092307613749405757L to ThunderCCCodec,
1130027771466355435L to CassetteShootingCCCodec,
8212033390179430143L to TsunamiCCCodec,
5604117679922858821L to TsunamiCCCodec,
5604117679922858821L to TsunamiShootSFXCCCodec,
2803166101624878775L to RotatingTurretCCCodec,
8384919755051909877L to TwinsCCCodec,
6384655869260380731L to WeaponWeakeningCCCodec,
@@ -1317,7 +1317,7 @@ object ModelRegistry {
6455142242556985012L to UltimateCCCodec,
2660691061343351669L to DeferredOverdriveCCCodec,
1500120709087433677L to AresUltimateCCCodec,
7899544742191273818L to AresUltimateCCCodec,
7899544742191273818L to AresUltimateProjectileCCCodec,
6210079079280471693L to CrusaderEffectCCCodec,
3907559303616283277L to CrusaderUltimateCCCodec,
6590506277285284269L to DictatorUltimateCCCodec,
@@ -1332,7 +1332,7 @@ object ModelRegistry {
973781565169577734L to TankSuperchargeCCCodec,
8738779591519195597L to TitanUltimateGeneratorCCCodec,
7551602984488625261L to VikingUltimateCCCodec,
3137250957878113145L to VikingUltimateCCCodec,
3137250957878113145L to WaspUltimateBombCCCodec,
4388979890807820236L to NuclearRechargeCCCodec,
5055746953759097716L to BossStateCCCodec,
3317051239895575278L to TankConfigurationCCCodec,
@@ -1351,6 +1351,7 @@ object ModelRegistry {
6589716392600418185L to AvailableForAllCCCodec,
9168562037264832365L to PassToShopCCCodec,
3122964582367261689L to TemperatureCCCodec,
3730185794267514852L to GaragePreviewModelCCCodec,
2769268442698022653L to BuyableCCCodec,
2114179554921095892L to ItemCategoryCCCodec,
120961863156462946L to CountableItemCCCodec,
@@ -1363,8 +1364,8 @@ object ModelRegistry {
6111098822553419499L to BazookaSupplyCCCodec,
1865478986390468300L to GroupedCCCodec,
3438505192580052999L to ItemModelCCCodec,
213661725715747381L to Item3DCCCodec,
7472019549033825785L to Item3DCCCodec,
213661725715747381L to ItemEnabledForPartnerCCCodec,
5219530271535770658L to GarageKitCCCodec,
4309274349580876968L to ItemSaleByKitCCCodec,
2494628067134376039L to ModificationCCCodec,
@@ -1414,6 +1415,7 @@ object ModelRegistry {
7185560430911351668L to FormatBattleOptionsCCCodec,
5412538083071671358L to MapInfoCCCodec,
104562115846147942L to MatchmakingGroupCCCodec,
5932347630672640435L to MatchmakingLayoutCCCodec,
3935107155251354407L to DescriptionModelCCCodec,
1472449384337994019L to DescriptionModelCCCodec,
8032192927455575509L to TimePeriodModelCCCodec,
@@ -1429,9 +1431,7 @@ object ModelRegistry {
8345039896357067195L to ScorpioCCCodec,
6528115483341986769L to ShotGunAimingCCCodec,
1259328549938381181L to UpgradeGarageItemCCCodec,
3730185794267514852L to UpgradeGarageItemCCCodec,
2951667042968033849L to DiscountCCCodec,
5413550891500581680L to ClassicBattleSelectModelCCCodec,
5932347630672640435L to WrCodec,
)
}
@@ -4,7 +4,9 @@
// · 必填字段:直接读写
// · opt<T> :先从 nullmap 取 1 位(1=null,0=有值),有值才读写 T
// · list<T>/map<K,V>:varint 个数 + 逐项
// · enum<T>:固定 i32
// · enum<T>:按 i32 处理。真正的 EnumCodecInfo(module_24635 的 vn → Kt)读 0 字节,
// 但字段表里的 enum<...> 是提取器从 Wt(...) 工厂抽出来的(Wt 为「varint 计数 + 元素」的数组型 codec),
// 回放实测按 i32 与原始字节吻合,改成 0 会让记录回编码变短
// · string/bytes:varint 长度 + 原始字节
// · Vector3:3 × f32
package Net.Wire
+4
View File
@@ -162,6 +162,10 @@ def DecodeExpr(Node) -> str:
if Kind == "map":
return "Wire.ReadMap(R, { " + DecodeExpr(Node[1]) + " }, { " + DecodeExpr(Node[2]) + " })"
if Kind == "enum":
# 实测口径:这里按 i32 读。注意真正的 EnumCodecInfo(module_24635 的 vn → Kt)是 0 字节,
# 但字段表里的 enum<...> 是提取器从 Wt(...) 工厂抽出来的(Wt 是「varint 计数 + 元素」的数组型
# codec,与 ListCodecInfo 同形),语义还没定死;回放证明按 i32 与原始字节吻合,
# 改成 0 字节会立刻造成记录回编码变短(railgun-battle/s2c_0541)。
return "R.ReadInt()"
if Kind == "model":
return Node[1] + "Codec.Decode(R, N)"