diff --git a/RocketLeagueReplayParser/NetworkStream/UniqueId.cs b/RocketLeagueReplayParser/NetworkStream/UniqueId.cs index bfdd766..05fc5e2 100644 --- a/RocketLeagueReplayParser/NetworkStream/UniqueId.cs +++ b/RocketLeagueReplayParser/NetworkStream/UniqueId.cs @@ -9,7 +9,7 @@ namespace RocketLeagueReplayParser.NetworkStream { public class UniqueId { - public enum UniqueIdType { Unknown = 0, Steam = 1, PS4 = 2, PS3 = 3, Xbox = 4, Switch = 6, Psynet = 7 } + public enum UniqueIdType { Unknown = 0, Steam = 1, PS4 = 2, PS3 = 3, Xbox = 4, Switch = 6, Psynet = 7, Unknown2 = 11 } public UniqueIdType Type { get; protected set; } public byte[] Id { get; private set; } @@ -86,6 +86,17 @@ protected static void DeserializeId(BitReader br, UniqueId uid, UInt32 licenseeV uid.Id = br.ReadBytes(32); } } + else if (uid.Type == UniqueIdType.Unknown2) + { + // This is really a "GetString", but keeping everything as bytes. + var id = br.ReadBytes(4); + var len = (id[3] << 24) + (id[2] << 16) + (id[1] << 8) + id[0]; +#if DEBUG + // Not yet sure if this is always true + if (len != 33) { throw new Exception("Unknown2 ID length != 33"); } +#endif + uid.Id = id.Concat(br.ReadBytes(len)).ToArray(); + } else { throw new ArgumentException(string.Format("Invalid type: {0}. Next bits are {1}", ((int)uid.Type).ToString(), br.GetBits(br.Position, Math.Min(4096, br.Length - br.Position)).ToBinaryString())); diff --git a/RocketLeagueReplayParser/RocketLeagueReplayParser.csproj b/RocketLeagueReplayParser/RocketLeagueReplayParser.csproj index 348f3e2..b7e5fa5 100644 --- a/RocketLeagueReplayParser/RocketLeagueReplayParser.csproj +++ b/RocketLeagueReplayParser/RocketLeagueReplayParser.csproj @@ -7,10 +7,10 @@ Copyright © 2015-2020 - 2.7.1 - 2.7.1 - 2.7.1 - 2.7.1.0 + 2.7.2 + 2.7.2 + 2.7.2 + 2.7.2.0