mirror of
https://github.com/ppy/osu
synced 2025-01-03 04:42:10 +00:00
Send in initial score request instead
This commit is contained in:
parent
6c7e806eac
commit
9e6d562872
@ -11,17 +11,20 @@ namespace osu.Game.Online.Multiplayer
|
||||
{
|
||||
private readonly int roomId;
|
||||
private readonly int playlistItemId;
|
||||
private readonly string versionHash;
|
||||
|
||||
public CreateRoomScoreRequest(int roomId, int playlistItemId)
|
||||
public CreateRoomScoreRequest(int roomId, int playlistItemId, string versionHash)
|
||||
{
|
||||
this.roomId = roomId;
|
||||
this.playlistItemId = playlistItemId;
|
||||
this.versionHash = versionHash;
|
||||
}
|
||||
|
||||
protected override WebRequest CreateWebRequest()
|
||||
{
|
||||
var req = base.CreateWebRequest();
|
||||
req.Method = HttpMethod.Post;
|
||||
req.AddParameter("version_hash", versionHash);
|
||||
return req;
|
||||
}
|
||||
|
||||
|
@ -51,9 +51,6 @@ namespace osu.Game.Scoring
|
||||
[NotMapped]
|
||||
public bool Passed { get; set; } = true;
|
||||
|
||||
[JsonProperty("version_hash")]
|
||||
public string VersionHash { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual RulesetInfo Ruleset { get; set; }
|
||||
|
||||
|
@ -58,7 +58,7 @@ namespace osu.Game.Screens.Multi.Play
|
||||
if (!playlistItem.RequiredMods.All(m => Mods.Value.Any(m.Equals)))
|
||||
throw new InvalidOperationException("Current Mods do not match PlaylistItem's RequiredMods");
|
||||
|
||||
var req = new CreateRoomScoreRequest(roomId.Value ?? 0, playlistItem.ID);
|
||||
var req = new CreateRoomScoreRequest(roomId.Value ?? 0, playlistItem.ID, Game.VersionHash);
|
||||
req.Success += r => token = r.ID;
|
||||
req.Failure += e =>
|
||||
{
|
||||
|
@ -465,7 +465,6 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
Beatmap = Beatmap.Value.BeatmapInfo,
|
||||
Ruleset = rulesetInfo,
|
||||
VersionHash = Game.VersionHash,
|
||||
Mods = Mods.Value.ToArray(),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user