1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 13:32:54 +08:00

Throw an exception if we try and retrieve local scores online

This commit is contained in:
Dean Herbert 2017-12-20 20:25:57 +09:00
parent 21829ba37b
commit 63dce59c8c

View File

@ -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;