1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Disallow custom rulesets from score submission

This commit is contained in:
Salman Ahmed 2021-07-11 03:34:57 +03:00
parent 236e8019cc
commit 07ede7a147

View File

@ -6,6 +6,7 @@ using System.Diagnostics;
using osu.Game.Online.API; using osu.Game.Online.API;
using osu.Game.Online.Rooms; using osu.Game.Online.Rooms;
using osu.Game.Online.Solo; using osu.Game.Online.Solo;
using osu.Game.Rulesets;
using osu.Game.Scoring; using osu.Game.Scoring;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
@ -27,7 +28,7 @@ namespace osu.Game.Screens.Play
if (!(Beatmap.Value.BeatmapInfo.OnlineBeatmapID is int beatmapId)) if (!(Beatmap.Value.BeatmapInfo.OnlineBeatmapID is int beatmapId))
return null; return null;
if (!(Ruleset.Value.ID is int rulesetId)) if (!(Ruleset.Value.ID is int rulesetId) || Ruleset.Value.ID > ILegacyRuleset.MAX_LEGACY_RULESET_ID)
return null; return null;
return new CreateSoloScoreRequest(beatmapId, rulesetId, Game.VersionHash); return new CreateSoloScoreRequest(beatmapId, rulesetId, Game.VersionHash);