Add StartSingleGame query and reply.

This commit is contained in:
Ray Koopa 2019-01-04 20:14:20 +01:00
parent 41991d6d78
commit c33e1f7987
3 changed files with 59 additions and 0 deletions

View File

@ -163,6 +163,11 @@ namespace Syroot.Worms.OnlineWorms.Server
SendPacket(new ChannelEnterFinishReply());
}
public void HandleStartSingleGameQuery(StartSingleGameQuery packet)
{
SendPacket(new StartSingleGameReply());
}
#if DEBUG
public void HandleRaw(RawPacket packet) { }
#endif

View File

@ -0,0 +1,29 @@
using System;
using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net
{
/// <summary>
/// Represents the client request for a <see cref="StartSingleGameReply"/>.
/// </summary>
[Packet(PacketType.Channel, 0x38)]
internal class StartSingleGameQuery : Packet
{
// ---- PROPERTIES ---------------------------------------------------------------------------------------------
public byte UnknownA { get; set; }
public byte UnknownB { get; set; }
public byte UnknownC { get; set; }
// ---- METHODS (INTERNAL) -------------------------------------------------------------------------------------
internal override void Deserialize(PacketStream stream)
{
UnknownA = stream.Read1Byte();
UnknownB = stream.Read1Byte();
UnknownC = stream.Read1Byte();
}
internal override void Serialize(PacketStream stream) => throw new NotImplementedException();
}
}

View File

@ -0,0 +1,25 @@
using System;
using Syroot.BinaryData;
namespace Syroot.Worms.OnlineWorms.Server.Net
{
/// <summary>
/// Represents the server response to a <see cref="StartSingleGameQuery"/>.
/// </summary>
[Packet(PacketType.Channel, 0x39)]
internal class StartSingleGameReply : Packet
{
// ---- PROPERTIES ---------------------------------------------------------------------------------------------
public bool Success { get; set; } = true;
// ---- METHODS (INTERNAL) -------------------------------------------------------------------------------------
internal override void Deserialize(PacketStream stream) => throw new NotImplementedException();
internal override void Serialize(PacketStream stream)
{
stream.WriteBoolean(Success, BooleanCoding.Word);
}
}
}