diff --git a/Heroes.ReplayParser b/Heroes.ReplayParser index 1aa0731..f875a3d 160000 --- a/Heroes.ReplayParser +++ b/Heroes.ReplayParser @@ -1 +1 @@ -Subproject commit 1aa0731f00a93f73335c6fc3c41ca1bd036e33a7 +Subproject commit f875a3d95b3ec4be5261318ebf3d600873eac0d1 diff --git a/StatsDisplay/Properties/AssemblyInfo.cs b/StatsDisplay/Properties/AssemblyInfo.cs index f438ff4..26a3150 100644 --- a/StatsDisplay/Properties/AssemblyInfo.cs +++ b/StatsDisplay/Properties/AssemblyInfo.cs @@ -51,5 +51,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.6.0")] -[assembly: AssemblyFileVersion("0.6.0")] +[assembly: AssemblyVersion("0.6.2")] +[assembly: AssemblyFileVersion("0.6.2")] diff --git a/StatsFetcher/FileProcessor.cs b/StatsFetcher/FileProcessor.cs index b1a3496..aa797d0 100644 --- a/StatsFetcher/FileProcessor.cs +++ b/StatsFetcher/FileProcessor.cs @@ -17,7 +17,11 @@ public static class FileProcessor public static Game ProcessLobbyFile(string path) { var game = new BattleLobbyParser(path).Parse(); - FetchProfiles(game); + FetchProfiles(game).ContinueWith(t => { + if (t.Exception != null) { + throw t.Exception; + } + }); return game; } @@ -95,18 +99,21 @@ private static async Task SafeCopy(string source, string dest, bool overwrite) public static Replay ParseRejoin(string fileName) { try { - var replay = new Replay(); - - var archive = new MpqArchive(fileName); - archive.AddListfileFilenames(); + using (var archive = new MpqArchive(fileName)) { + archive.AddListfileFilenames(); + var replay = new Replay(); - // Replay Details - ReplayDetails.Parse(replay, DataParser.GetMpqFile(archive, "save.details"), true); + // Replay Details + ReplayDetails.Parse(replay, DataParser.GetMpqFile(archive, "save.details"), true); - // Player level is stored there - ReplayAttributeEvents.Parse(replay, DataParser.GetMpqFile(archive, "replay.attributes.events")); + // Player level is stored there + // does not exist in brawl + if (archive.FileExists("replay.attributes.events")) { + ReplayAttributeEvents.Parse(replay, DataParser.GetMpqFile(archive, "replay.attributes.events")); + } - return replay; + return replay; + } } catch (Exception ex) { //TODO: WE REALLY DON't want to do this diff --git a/StatsFetcher/PlayerProfile.cs b/StatsFetcher/PlayerProfile.cs index 72cc8e1..c8cb159 100644 --- a/StatsFetcher/PlayerProfile.cs +++ b/StatsFetcher/PlayerProfile.cs @@ -17,6 +17,7 @@ public PlayerProfile(Game game, string battleTag, Region region) Game = game; Ranks = new Dictionary { { GameMode.QuickMatch, null }, + { GameMode.UnrankedDraft, null }, { GameMode.HeroLeague, null }, { GameMode.TeamLeague, null } };