1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 15:27:24 +08:00

Merge pull request #28436 from omkelderman/fix-auto-pick-map-on-zero-ban-round

Fix auto picking maps on zero ban rounds
This commit is contained in:
Dean Herbert 2024-06-10 13:51:41 +09:00 committed by GitHub
commit a8a2e543d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,7 +123,12 @@ namespace osu.Game.Tournament.Screens.MapPool
private void beatmapChanged(ValueChangedEvent<TournamentBeatmap?> beatmap)
{
if (CurrentMatch.Value == null || CurrentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) < 2)
if (CurrentMatch.Value?.Round.Value == null)
return;
int totalBansRequired = CurrentMatch.Value.Round.Value.BanCount.Value * 2;
if (CurrentMatch.Value.PicksBans.Count(p => p.Type == ChoiceType.Ban) < totalBansRequired)
return;
// if bans have already been placed, beatmap changes result in a selection being made automatically