mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 21:53:22 +08:00
Change RoomSubmittingPlayer's request implementation to return null on RoomID missing, rather than silently succeeding
This commit is contained in:
parent
84b2f9a848
commit
d55324585d
@ -25,7 +25,13 @@ namespace osu.Game.Screens.Play
|
|||||||
PlaylistItem = playlistItem;
|
PlaylistItem = playlistItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override APIRequest<APIScoreToken> CreateTokenRequest() => new CreateRoomScoreRequest(RoomId.Value ?? 0, PlaylistItem.ID, Game.VersionHash);
|
protected override APIRequest<APIScoreToken> CreateTokenRequest()
|
||||||
|
{
|
||||||
|
if (!(RoomId.Value is long roomId))
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return new CreateRoomScoreRequest(roomId, PlaylistItem.ID, Game.VersionHash);
|
||||||
|
}
|
||||||
|
|
||||||
protected override APIRequest<MultiplayerScore> CreateSubmissionRequest(Score score, long token) => new SubmitRoomScoreRequest(token, RoomId.Value ?? 0, PlaylistItem.ID, score.ScoreInfo);
|
protected override APIRequest<MultiplayerScore> CreateSubmissionRequest(Score score, long token) => new SubmitRoomScoreRequest(token, RoomId.Value ?? 0, PlaylistItem.ID, score.ScoreInfo);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user