1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Simplify scope logic

This commit is contained in:
Dean Herbert 2017-12-20 20:33:16 +09:00
parent 63dce59c8c
commit 1b91f24044
2 changed files with 2 additions and 17 deletions

View File

@ -56,22 +56,7 @@ namespace osu.Game.Online.API.Requests
{
var req = base.CreateWebRequest();
switch(scope)
{
default:
case LeaderboardScope.Global:
req.AddParameter(@"type", @"global");
break;
case LeaderboardScope.Friends:
req.AddParameter(@"type", @"friend");
break;
case LeaderboardScope.Country:
req.AddParameter(@"type", @"country");
break;
}
req.AddParameter(@"type", scope.ToString().ToLowerInvariant());
req.AddParameter(@"mode", ruleset?.ShortName ?? @"osu");
return req;

View File

@ -355,6 +355,6 @@ namespace osu.Game.Screens.Select.Leaderboards
Local,
Country,
Global,
Friends,
Friend,
}
}