From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- .../Net/Messages/S2C/Message07JoinedGameS2C.cs | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Impostor-dev/src/Impostor.Api/Net/Messages/S2C/Message07JoinedGameS2C.cs (limited to 'Impostor-dev/src/Impostor.Api/Net/Messages/S2C/Message07JoinedGameS2C.cs') diff --git a/Impostor-dev/src/Impostor.Api/Net/Messages/S2C/Message07JoinedGameS2C.cs b/Impostor-dev/src/Impostor.Api/Net/Messages/S2C/Message07JoinedGameS2C.cs new file mode 100644 index 0000000..da6eb40 --- /dev/null +++ b/Impostor-dev/src/Impostor.Api/Net/Messages/S2C/Message07JoinedGameS2C.cs @@ -0,0 +1,31 @@ +namespace Impostor.Api.Net.Messages.S2C +{ + public static class Message07JoinedGameS2C + { + public static void Serialize(IMessageWriter writer, bool clear, int gameCode, int playerId, int hostId, int[] otherPlayerIds) + { + if (clear) + { + writer.Clear(MessageType.Reliable); + } + + writer.StartMessage(MessageFlags.JoinedGame); + writer.Write(gameCode); + writer.Write(playerId); + writer.Write(hostId); + writer.WritePacked(otherPlayerIds.Length); + + foreach (var id in otherPlayerIds) + { + writer.WritePacked(id); + } + + writer.EndMessage(); + } + + public static void Deserialize(IMessageReader reader) + { + throw new System.NotImplementedException(); + } + } +} \ No newline at end of file -- cgit v1.1-26-g67d0