fix: 修正 2026.10.06 的 UP_ActionSend (176)、UP_ClientTrigger (872) 与 DOWN_PingRsp (581)
This commit is contained in:
+11
-10
@@ -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<InvalidDataException>(()=>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<int,string>{{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
|
||||
|
||||
Reference in New Issue
Block a user