mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 10:47:22 +09:00
Fix player rank data not being re-fetched after a tournament's ruleset is changed
This commit is contained in:
parent
3f2077a527
commit
74bb44e05d
@ -113,7 +113,7 @@ namespace osu.Game.Tournament.Screens.Setup
|
|||||||
new LabelledDropdown<RulesetInfo>
|
new LabelledDropdown<RulesetInfo>
|
||||||
{
|
{
|
||||||
Label = "Ruleset",
|
Label = "Ruleset",
|
||||||
Description = "Decides what stats are displayed and which ranks are retrieved for players.",
|
Description = "Decides what stats are displayed and which ranks are retrieved for players. This requires a restart to reload data for an existing bracket.",
|
||||||
Items = rulesets.AvailableRulesets,
|
Items = rulesets.AvailableRulesets,
|
||||||
Current = LadderInfo.Ruleset,
|
Current = LadderInfo.Ruleset,
|
||||||
},
|
},
|
||||||
|
@ -159,6 +159,18 @@ namespace osu.Game.Tournament
|
|||||||
SaveChanges();
|
SaveChanges();
|
||||||
|
|
||||||
ladder.CurrentMatch.Value = ladder.Matches.FirstOrDefault(p => p.Current.Value);
|
ladder.CurrentMatch.Value = ladder.Matches.FirstOrDefault(p => p.Current.Value);
|
||||||
|
|
||||||
|
ladder.Ruleset.BindValueChanged(r =>
|
||||||
|
{
|
||||||
|
// Refetch player rank data on next startup as the ruleset has changed.
|
||||||
|
foreach (var team in ladder.Teams)
|
||||||
|
{
|
||||||
|
foreach (var player in team.Players)
|
||||||
|
player.Rank = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
SaveChanges();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user