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

Add boilerplate for server events

This commit is contained in:
Dean Herbert 2021-07-26 17:38:08 +09:00
parent 1d645d4ca9
commit d17b2b3268
3 changed files with 28 additions and 0 deletions

View File

@ -63,6 +63,12 @@ namespace osu.Game.Online.Multiplayer
/// <param name="state">The new state of the room.</param>
Task MatchRulesetRoomStateChanged(MatchRulesetRoomState state);
/// <summary>
/// Send a match ruleset specific request.
/// </summary>
/// <param name="e">The event to handle.</param>
Task MatchRulesetEvent(MatchRulesetServerEvent e);
/// <summary>
/// Signals that a user in this room changed their beatmap availability state.
/// </summary>

View File

@ -0,0 +1,17 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using MessagePack;
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// An event from the server to allow clients to update gameplay to an expected state.
/// </summary>
[Serializable]
[MessagePackObject]
public abstract class MatchRulesetServerEvent
{
}
}

View File

@ -432,6 +432,11 @@ namespace osu.Game.Online.Multiplayer
throw new NotImplementedException();
}
public Task MatchRulesetEvent(MatchRulesetServerEvent e)
{
throw new NotImplementedException();
}
Task IMultiplayerClient.UserBeatmapAvailabilityChanged(int userId, BeatmapAvailability beatmapAvailability)
{
if (Room == null)