From 63dce59c8c6f2ac2273d385cc0a20f981ceb2e44 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 20 Dec 2017 20:25:57 +0900 Subject: [PATCH] Throw an exception if we try and retrieve local scores online --- osu.Game/Online/API/Requests/GetScoresRequest.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Online/API/Requests/GetScoresRequest.cs b/osu.Game/Online/API/Requests/GetScoresRequest.cs index 4379daa47b..c32d8045ab 100644 --- a/osu.Game/Online/API/Requests/GetScoresRequest.cs +++ b/osu.Game/Online/API/Requests/GetScoresRequest.cs @@ -36,6 +36,9 @@ namespace osu.Game.Online.API.Requests if (!beatmap.OnlineBeatmapID.HasValue) throw new InvalidOperationException($"Cannot lookup a beatmap's scores without having a populated {nameof(BeatmapInfo.OnlineBeatmapID)}."); + if (scope == LeaderboardScope.Local) + throw new InvalidOperationException("Should not attempt to request online scores for a local scoped leaderboard"); + this.beatmap = beatmap; this.scope = scope; this.ruleset = ruleset;