feat: 支持 2026.10.06 协议与强制注入脚本,移除 UI 中的 M0 诊断折叠卡片

This commit is contained in:
2026-10-14 00:11:41 +08:00
parent 16d61f7a5e
commit 8008519d8b
7 changed files with 141 additions and 41 deletions
+21 -3
View File
@@ -3,7 +3,7 @@ namespace ICRebuild.Core;
public static class CurrentProtocolEvidence
{
// Only fill missing names/slots; do not rewrite explicit mappings or the cache file.
private static readonly (int Opcode,string Name)[] Downstream =
private static readonly (int Opcode,string Name)[] Downstream20260915 =
[
(338,"DOWN_PingRsp"),
(671,"DOWN_UpdateHate"),
@@ -14,11 +14,29 @@ public static class CurrentProtocolEvidence
(788,"DOWN_UpdateClassInfo"),
(214,"DOWN_FirstAttack")
];
private static readonly (int Opcode,string Name)[] Downstream20261006 =
[
(338,"DOWN_PingRsp"),
(673,"DOWN_UpdateHate"),
(171,"DOWN_UpdateHater"),
(549,"DOWN_EffectResultBasic"),
(748,"DOWN_JobGauge"),
(592,"DOWN_UpdateClassInfo"),
(374,"DOWN_FirstAttack")
];
public static int AddMissing(string version,Dictionary<int,string> down)
{
if(version!=PacketParser.AuditedClientVersion) return 0;
var evidence = version switch
{
PacketParser.AuditedClientVersion => Downstream20261006,
PacketParser.BaselineClientVersion => Downstream20260915,
_ => null
};
if(evidence == null) return 0;
var added=0;
foreach(var (opcode,name) in Downstream)
foreach(var (opcode,name) in evidence)
if(!down.ContainsKey(opcode) && !down.ContainsValue(name)) { down[opcode]=name; added++; }
return added;
}