Skip to content

Commit

Permalink
Merge pull request #103 from koliva8245/battlelobby
Browse files Browse the repository at this point in the history
For 47479 and older or 47903, then just get the battle tags
  • Loading branch information
barrett777 authored Jan 31, 2020
2 parents f081695 + d5c8213 commit 72a91cd
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions Heroes.ReplayParser/MPQFiles/ReplayServerBattlelobby.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public static void Parse(Replay replay, byte[] buffer)
var bitReader = new BitReader(stream);

// 52124 and 52381 are non-tested ptr builds
if (replay.ReplayBuild < 38793 ||
replay.ReplayBuild == 52124 || replay.ReplayBuild == 52381 ||
if (replay.ReplayBuild < 47479 ||
replay.ReplayBuild < 47903 || replay.ReplayBuild == 52124 || replay.ReplayBuild == 52381 ||
replay.GameMode == GameMode.Unknown)
{
GetBattleTags(replay, bitReader);
Expand Down Expand Up @@ -127,13 +127,6 @@ private static void DetailedParse(BitReader bitReader, Replay replay, uint s2maC

// Player info
// ------------------------
if (replay.ReplayBuild <= 43905 || replay.ReplayBuild == 47801)
{
// Builds that are not yet supported for detailed parsing
// build 47801 is a ptr build that had new data in the battletag section, the data was changed in 47944 (patch for 47801)
GetBattleTags(replay, bitReader);
return;
}

// m_randomSeed, set it if it hasn't been set
if (replay.RandomValue == 0)
Expand All @@ -143,12 +136,6 @@ private static void DetailedParse(BitReader bitReader, Replay replay, uint s2maC

bitReader.ReadBytes(4);

if (replay.ReplayBuild <= 47479 || replay.ReplayBuild == 47903)
{
ExtendedBattleTagParsingOld(replay, bitReader);
return;
}

uint playerListLength = bitReader.Read(5);

for (uint i = 0; i < playerListLength; i++)
Expand Down

0 comments on commit 72a91cd

Please sign in to comment.