Skip to content

Commit

Permalink
Merge pull request #105 from koliva8245/battlelobby
Browse files Browse the repository at this point in the history
Updated to handle internal id better (T: and TOON)
  • Loading branch information
barrett777 authored Feb 4, 2020
2 parents 72a91cd + 6002aec commit 3b157d8
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Heroes.ReplayParser/MPQFiles/ReplayServerBattlelobby.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,8 @@ private static void DetailedParse(BitReader bitReader, Replay replay, uint s2maC
throw new DetailedParsedException("Not Hero");
bitReader.Read(32); // m_realm

int idLength = (int)bitReader.Read(7);

int idLength = (int)bitReader.Read(7) + 2;
bitReader.AlignToByte();
if (bitReader.ReadString(2) != "T:")
throw new DetailedParsedException("Not T:");

replay.ClientListByUserID[i].BattleNetTId = bitReader.ReadString(idLength);

bitReader.Read(6);
Expand All @@ -175,13 +171,10 @@ private static void DetailedParse(BitReader bitReader, Replay replay, uint s2maC
throw new DetailedParsedException("Not Hero");
bitReader.Read(32); // m_realm

idLength = (int)bitReader.Read(7);
idLength = (int)bitReader.Read(7) + 2;
bitReader.AlignToByte();
if (bitReader.ReadString(2) != "T:")
throw new DetailedParsedException("Not T: (duplicate)");

if (replay.ClientListByUserID[i].BattleNetTId != bitReader.ReadString(idLength))
throw new DetailedParsedException("Duplicate TID does not match");
throw new DetailedParsedException("Duplicate internal id does not match");
}

bitReader.Read(2);
Expand Down

0 comments on commit 3b157d8

Please sign in to comment.