diff --git a/Heroes.ReplayParser/MPQFiles/ReplayInitData.cs b/Heroes.ReplayParser/MPQFiles/ReplayInitData.cs index 2a87355..205fea2 100644 --- a/Heroes.ReplayParser/MPQFiles/ReplayInitData.cs +++ b/Heroes.ReplayParser/MPQFiles/ReplayInitData.cs @@ -91,21 +91,44 @@ public static void Parse(Replay replay, byte[] buffer) // m_ammId if (replay.ReplayBuild >= 43905 && reader.ReadBoolean()) - { - replay.GameMode = (reader.ReadInt32()) switch + switch (reader.ReadInt32()) { - 50001 => GameMode.QuickMatch, - 50021 => GameMode.Cooperative, - 50031 => GameMode.Brawl, - 50041 => GameMode.Practice, - 50051 => GameMode.UnrankedDraft, - 50061 => GameMode.HeroLeague, - 50071 => GameMode.TeamLeague, - 50091 => GameMode.StormLeague, - - _ => GameMode.Unknown, - }; - } + case 50001: + replay.GameMode = GameMode.QuickMatch; + break; + + case 50021: + replay.GameMode = GameMode.Cooperative; + break; + + case 50031: + replay.GameMode = GameMode.Brawl; + break; + + case 50041: + replay.GameMode = GameMode.TryMe; + break; + + case 50051: + replay.GameMode = GameMode.UnrankedDraft; + break; + + case 50061: + replay.GameMode = GameMode.HeroLeague; + break; + + case 50071: + replay.GameMode = GameMode.TeamLeague; + break; + + case 50091: + replay.GameMode = GameMode.StormLeague; + break; + + default: + replay.GameMode = GameMode.Unknown; + break; + } reader.Read(3); // Game Speed