1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Automatically fix invalid pairing dates on load (based on contained groupings)

This commit is contained in:
Dean Herbert 2018-12-14 18:11:04 +09:00
parent f083b18663
commit 8907ce3f63

View File

@ -109,7 +109,12 @@ namespace osu.Game.Tournament
foreach (var id in group.Pairings)
{
var found = Ladder.Pairings.FirstOrDefault(p => p.ID == id);
if (found != null) found.Grouping.Value = group;
if (found != null)
{
found.Grouping.Value = group;
if (group.StartDate.Value > found.Date.Value)
found.Date.Value = group.StartDate.Value;
}
}
Ladder.CurrentMatch.Value = Ladder.Pairings.FirstOrDefault(p => p.Current.Value);