diff --git a/Core/CurrentProtocolEvidence.cs b/Core/CurrentProtocolEvidence.cs index 82d8dcb..838df4b 100644 --- a/Core/CurrentProtocolEvidence.cs +++ b/Core/CurrentProtocolEvidence.cs @@ -17,7 +17,7 @@ public static class CurrentProtocolEvidence private static readonly (int Opcode,string Name)[] Downstream20261006 = [ - (338,"DOWN_PingRsp"), + (581,"DOWN_PingRsp"), (673,"DOWN_UpdateHate"), (171,"DOWN_UpdateHater"), (549,"DOWN_EffectResultBasic"), diff --git a/Tests/Program.cs b/Tests/Program.cs index f9c072a..b7e4848 100644 --- a/Tests/Program.cs +++ b/Tests/Program.cs @@ -729,12 +729,12 @@ Test("verified PingRsp fills only missing mappings for the audited version",()=> const string v=PacketParser.AuditedClientVersion; var map=new OpcodeMap(); map.Load($$$"""{"{{{v}}}":{"UP_PingReq":[838]}}""",v,"test"); - Check(map.Resolve(v,PacketDirection.Down,338)=="DOWN_PingRsp"); Check(map.Snapshot.Source.Contains("本机核实")); - map.Load($$$"""{"{{{v}}}":{"DOWN_Explicit":[338]}}""",v,"test"); - Check(map.Resolve(v,PacketDirection.Down,338)=="DOWN_Explicit"); - map.Load($$$"""{"{{{v}}}":{"DOWN_PingRsp":[339]}}""",v,"test"); - Check(map.Resolve(v,PacketDirection.Down,338)==null); - map.Load("""{"other":{"UP_PingReq":[838]}}""","other","test"); Check(map.Resolve("other",PacketDirection.Down,338)==null); + Check(map.Resolve(v,PacketDirection.Down,581)=="DOWN_PingRsp"); Check(map.Snapshot.Source.Contains("本机核实")); + map.Load($$$"""{"{{{v}}}":{"DOWN_Explicit":[581]}}""",v,"test"); + Check(map.Resolve(v,PacketDirection.Down,581)=="DOWN_Explicit"); + map.Load($$$"""{"{{{v}}}":{"DOWN_PingRsp":[582]}}""",v,"test"); + Check(map.Resolve(v,PacketDirection.Down,581)==null); + map.Load("""{"other":{"UP_PingReq":[838]}}""","other","test"); Check(map.Resolve("other",PacketDirection.Down,581)==null); Throws(()=>map.Load($$$"""{"{{{v}}}":{}}""",v,"test")); }); Test("current Ping pairs require full exact-length payload and matching echo",()=> @@ -746,7 +746,7 @@ Test("current Ping pairs require full exact-length payload and matching echo",() BinaryPrimitives.WriteUInt32LittleEndian(response.AsSpan(4),333); // not RTT; do not use it as elapsed time var time=DateTimeOffset.UtcNow; var a=new PacketRecord(1,0,time,PacketDirection.Up,838,v,null,null,request); - var b=new PacketRecord(2,0,time.AddMilliseconds(83),PacketDirection.Down,338,v,null,null,response); + var b=new PacketRecord(2,0,time.AddMilliseconds(83),PacketDirection.Down,581,v,null,null,response); var pairs=PacketCorrelator.Ping([a,b],map); Check(pairs.Length==1 && pairs[0].Elapsed.TotalMilliseconds==83); Check(PacketCorrelator.Ping([a with {Payload=new byte[28]},b],map).Length==0); Check(PacketCorrelator.Ping([a,b with {PayloadComplete=false}],map).Length==0); @@ -764,7 +764,7 @@ Test("audited protocol additions preserve explicit opcode and name assignments", var downAudited=new Dictionary{{673,"DOWN_Explicit"},{100,"DOWN_UpdateHater"}}; Check(CurrentProtocolEvidence.AddMissing(PacketParser.AuditedClientVersion,downAudited)==5); Check(downAudited[673]=="DOWN_Explicit" && !downAudited.ContainsKey(171)); - Check(downAudited[549]=="DOWN_EffectResultBasic" && downAudited[338]=="DOWN_PingRsp"); + Check(downAudited[549]=="DOWN_EffectResultBasic" && downAudited[581]=="DOWN_PingRsp"); Check(CurrentProtocolEvidence.AddMissing(PacketParser.AuditedClientVersion,downAudited)==0); }); Test("enmity parsers respect capacities and native byte value stride",()=> @@ -1101,8 +1101,9 @@ Test("opcodes.json loads cleanly without conflicts and resolves dual-version aud Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_StatusEffectList")==718); Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_EffectResult")==242); Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_InventoryTransaction")==136); - Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_InventoryTransactionFinish")==813); - Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_ActionSend")==872); + Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_ActionSend")==176); + Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_ClientTrigger")==872); + Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Down,"DOWN_PingRsp")==581); Check(mapAudited.ResolveOpcode(PacketParser.AuditedClientVersion,PacketDirection.Up,"UP_PingReq")==137); // 2026.09.15.0000.0000 baseline verification diff --git a/opcodes.json b/opcodes.json index 50c43e4..fd57465 100644 --- a/opcodes.json +++ b/opcodes.json @@ -4661,7 +4661,7 @@ 362 ], "DOWN_PingRsp": [ - 338 + 581 ], "DOWN_PlaceFieldMarker": [ 641 @@ -4741,7 +4741,7 @@ 339 ], "UP_ActionSend": [ - 872 + 176 ], "UP_ActionSendPos": [ 891 @@ -4750,7 +4750,7 @@ 560 ], "UP_ClientTrigger": [ - 391 + 872 ], "UP_EventAction": [ 140