Skip to content

Commit defecd5

Browse files
committed
Removed PreMatch toggle temporarily due to game crash issue
1 parent 7691272 commit defecd5

File tree

6 files changed

+8
-83
lines changed

6 files changed

+8
-83
lines changed

Heroesprofile.Uploader.Common/Manager.cs

+1-76
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public async void Start(IMonitor monitor, PreMatchIMonitor prematch_monitor, IAn
137137
};
138138
_monitor.Start();
139139

140-
140+
/*
141141
_prematch_monitor.TempBattleLobbyCreated += async (_, e) => {
142142
if (PreMatchPage) {
143143
prematch_id = 0;
@@ -151,82 +151,7 @@ public async void Start(IMonitor monitor, PreMatchIMonitor prematch_monitor, IAn
151151
}
152152
};
153153
_prematch_monitor.Start();
154-
155-
156-
/*
157-
_prematch_monitor.StormSaveCreated += async (_, e) => {
158-
var tmpPath = Path.GetTempFileName();
159-
await SafeCopy(e.Data, tmpPath, true);
160-
var replay = new Replay();
161-
162-
MpqHeader.ParseHeader(replay, e.Data);
163-
164-
using (var archive = new Foole.Mpq.MpqArchive(tmpPath)) {
165-
archive.AddListfileFilenames();
166-
167-
168-
//Gets Players
169-
MpqDetails.Parse(replay, DataParser.GetMpqFile(archive, "save.details"), true);
170-
171-
//Gets which Heroes each player played
172-
if (archive.FileExists("replay.attributes.events")) {
173-
MpqAttributeEvents.Parse(replay, DataParser.GetMpqFile(archive, "replay.attributes.events"));
174-
}
175-
176-
177-
//Get Game Mode
178-
if (archive.FileExists("save.initData")) {
179-
MpqInitData.Parse(replay, DataParser.GetMpqFile(archive, "save.initData"));
180-
}
181-
182-
////Fails
183-
//
184-
//if (archive.FileExists("replay.game.events")) {
185-
// MpqGameEvents.Parse(DataParser.GetMpqFile(archive, "replay.game.events"), replay.Players, replay.ReplayBuild, replay.ReplayVersionMajor, false);
186-
//}
187-
//
188-
//
189-
190-
//
191-
//
192-
////Not Needed
193-
//
194-
//if (archive.FileExists("replay.message.events")) {
195-
// MpqMessageEvents.Parse(replay, DataParser.GetMpqFile(archive, "replay.message.events"));
196-
//}
197-
//
198-
//
199-
////Fails
200-
//
201-
//if (archive.FileExists("replay.resumable.events")) {
202-
// MpqResumableEvents.Parse(replay, DataParser.GetMpqFile(archive, "replay.resumable.events"));
203-
//}
204-
205-
206-
207-
for (int i = 0; i < replay.Players.Length; i++) {
208-
replay.Players[i].Talents = new Talent[7];
209-
for (int j = 0; j < replay.Players[i].Talents.Length; j++) {
210-
replay.Players[i].Talents[j] = new Talent();
211-
}
212-
}
213-
214-
if (archive.FileExists("replay.tracker.events")) {
215-
replay.TrackerEvents = MpqTrackerEvents.Parse(DataParser.GetMpqFile(archive, "replay.tracker.events"));
216-
}
217-
218-
219-
Statistics.Parse(replay);
220-
221-
}
222-
223-
224-
await updatePreMatch(replay);
225-
};
226154
*/
227-
//_prematch_monitor.Start();
228-
229-
230155

231156
_analyzer.MinimumBuild = await _uploader.GetMinimumBuild();
232157

Heroesprofile.Uploader.Common/PreMatchMonitor.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected virtual void OnStormSaveAdded(string path)
3939
public void Start()
4040
{
4141
if (_battlelobby_watcher == null) {
42-
System.IO.Directory.CreateDirectory(BattleLobbyTempPath);
42+
//System.IO.Directory.CreateDirectory(BattleLobbyTempPath);
4343
_battlelobby_watcher = new FileSystemWatcher() {
4444
Path = BattleLobbyTempPath,
4545
Filter = "*.battlelobby",

Heroesprofile.Uploader.Windows/App.xaml.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private void Application_Startup(object sender, StartupEventArgs e)
102102
RestoreSettings();
103103
}
104104
SetupTrayIcon();
105-
Manager = new Manager(new ReplayStorage($@"{SettingsDir}\replays_v2.xml"));
105+
Manager = new Manager(new ReplayStorage($@"{SettingsDir}\replays_v3.xml"));
106106
// Enable collection modification from any thread
107107
BindingOperations.EnableCollectionSynchronization(Manager.Files, _lock);
108108

Heroesprofile.Uploader.Windows/MainWindow.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<StackPanel DockPanel.Dock="Bottom" helpers:MarginSetter.Margin="0, 8, 8, 0">
6262
<CheckBox IsChecked="{Binding App.StartWithWindows}" Content="Start with windows" Height="23" />
6363
<CheckBox IsChecked="{Binding App.Settings.MinimizeToTray}" Content="Minimize to tray" Height="23" />
64-
<CheckBox IsChecked="{Binding App.Settings.PreMatchPage}" Content="Prematch Page" Height="23" Margin="0,0,8,0" />
64+
<CheckBox IsChecked="False" Content="Prematch Page" Height="23" Margin="0,0,8,0" IsEnabled="False" />
6565
<Button HorizontalAlignment="Stretch" Content="Show log" Click="ShowLog_Click" Margin="0, 8, 0, 0" />
6666
<Button HorizontalAlignment="Stretch" Content="Settings" Click="Settings_Click" Margin="0, 8, 0, 0" />
6767
</StackPanel>

Heroesprofile.Uploader.Windows/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public static void Main(string[] args)
3636
}
3737

3838
// Move files from old locations
39-
if (File.Exists($@"{App.AppDir}\..\replays_v2.xml") && !File.Exists($@"{App.SettingsDir}\replays_v2.xml")) {
40-
File.Move($@"{App.AppDir}\..\replays.replays_v2", $@"{App.SettingsDir}\replays_v2.xml");
39+
if (File.Exists($@"{App.AppDir}\..\replays_v3.xml") && !File.Exists($@"{App.SettingsDir}\replays_v3.xml")) {
40+
File.Move($@"{App.AppDir}\..\replays.replays_v3", $@"{App.SettingsDir}\replays_v3.xml");
4141
}
4242
if (File.Exists($@"{App.AppDir}\..\last.config") && !File.Exists($@"{App.SettingsDir}\last.config")) {
4343
File.Move($@"{App.AppDir}\..\last.config", $@"{App.SettingsDir}\last.config");

Heroesprofile.Uploader.Windows/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@
5252
// You can specify all the values or you can default the Build and Revision Numbers
5353
// by using the '*' as shown below:
5454
// [assembly: AssemblyVersion("1.0.*")]
55-
[assembly: AssemblyVersion("1.0.5")]
56-
[assembly: AssemblyFileVersion("1.0.5")]
55+
[assembly: AssemblyVersion("1.0.6")]
56+
[assembly: AssemblyFileVersion("1.0.6")]
5757
[assembly: AssemblyInformationalVersion("1.0.0")]

0 commit comments

Comments
 (0)