44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
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)[] Downstream20260915 =
|
|
[
|
|
(338,"DOWN_PingRsp"),
|
|
(671,"DOWN_UpdateHate"),
|
|
(558,"DOWN_UpdateHater"),
|
|
(697,"DOWN_EffectResultBasic"),
|
|
// ActorGauge already exists at a different explicit slot in the cache; use an evidence label.
|
|
(614,"DOWN_JobGauge"),
|
|
(788,"DOWN_UpdateClassInfo"),
|
|
(214,"DOWN_FirstAttack")
|
|
];
|
|
|
|
private static readonly (int Opcode,string Name)[] Downstream20261006 =
|
|
[
|
|
(581,"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)
|
|
{
|
|
var evidence = version switch
|
|
{
|
|
PacketParser.AuditedClientVersion => Downstream20261006,
|
|
PacketParser.BaselineClientVersion => Downstream20260915,
|
|
_ => null
|
|
};
|
|
if(evidence == null) return 0;
|
|
var added=0;
|
|
foreach(var (opcode,name) in evidence)
|
|
if(!down.ContainsKey(opcode) && !down.ContainsValue(name)) { down[opcode]=name; added++; }
|
|
return added;
|
|
}
|
|
}
|