mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-01-15 00:08:02 +03:00
Add ChannelEnterFinishReply.
This commit is contained in:
parent
1a5bbe714f
commit
41991d6d78
@ -142,6 +142,7 @@ namespace Syroot.Worms.OnlineWorms.Server
|
|||||||
|
|
||||||
public void HandleChannelUnkInfo(ChannelUnkInfoQuery packet)
|
public void HandleChannelUnkInfo(ChannelUnkInfoQuery packet)
|
||||||
{
|
{
|
||||||
|
// Send player rank infos.
|
||||||
ChannelUnkInfoReply reply = new ChannelUnkInfoReply
|
ChannelUnkInfoReply reply = new ChannelUnkInfoReply
|
||||||
{
|
{
|
||||||
UnknownA = "Test",
|
UnknownA = "Test",
|
||||||
@ -158,7 +159,8 @@ namespace Syroot.Worms.OnlineWorms.Server
|
|||||||
}
|
}
|
||||||
SendPacket(reply);
|
SendPacket(reply);
|
||||||
|
|
||||||
SendPacket(new RawPacket(PacketType.Channel, 0x44, (byte)0x00));
|
// This is the last channel info packet, tell the client to go to the channel screen.
|
||||||
|
SendPacket(new ChannelEnterFinishReply());
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
@ -167,9 +167,11 @@ namespace Syroot.Worms.OnlineWorms.Server.Net
|
|||||||
{
|
{
|
||||||
OnPrePacketSend(packet);
|
OnPrePacketSend(packet);
|
||||||
|
|
||||||
// Serialize the raw packet data.
|
// Serialize the raw packet data, which must consist of at least 1 byte (at least for channels).
|
||||||
_sendStream.Position = 0;
|
_sendStream.Position = 0;
|
||||||
packet.Serialize(_sendStream);
|
packet.Serialize(_sendStream);
|
||||||
|
if (_sendStream.Position == 0)
|
||||||
|
_sendStream.WriteByte(0);
|
||||||
ushort dataSize = (ushort)_sendStream.Position;
|
ushort dataSize = (ushort)_sendStream.Position;
|
||||||
|
|
||||||
// Send the data and return success.
|
// Send the data and return success.
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Syroot.Worms.OnlineWorms.Server.Net
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Represents an additional server response to a <see cref="ChannelUnkInfoQuery"/>, causing the client to switch
|
||||||
|
/// to the channel screen (game lobby).
|
||||||
|
/// </summary>
|
||||||
|
[Packet(PacketType.Channel, 0x44)]
|
||||||
|
internal class ChannelEnterFinishReply : Packet
|
||||||
|
{
|
||||||
|
// ---- METHODS (INTERNAL) -------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
internal override void Deserialize(PacketStream stream) => throw new NotImplementedException();
|
||||||
|
|
||||||
|
internal override void Serialize(PacketStream stream) { }
|
||||||
|
}
|
||||||
|
}
|
@ -14,7 +14,7 @@ namespace Syroot.Worms.OnlineWorms.Server.Net
|
|||||||
|
|
||||||
public string UnknownA { get; set; } // Max. 30 chars
|
public string UnknownA { get; set; } // Max. 30 chars
|
||||||
|
|
||||||
public IList<ChannelUnkInfo> UnkInfos { get; set; } // Client always requests 20 elements.
|
public IList<ChannelUnkInfo> UnkInfos { get; set; } // Apparently ranks. Client always requests 20 elements.
|
||||||
|
|
||||||
// ---- METHODS (INTERNAL) -------------------------------------------------------------------------------------
|
// ---- METHODS (INTERNAL) -------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -32,6 +32,9 @@ namespace Syroot.Worms.OnlineWorms.Server.Net
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a player channel rank, apparently.
|
||||||
|
/// </summary>
|
||||||
public class ChannelUnkInfo
|
public class ChannelUnkInfo
|
||||||
{
|
{
|
||||||
public ushort UnknownA { get; set; }
|
public ushort UnknownA { get; set; }
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"IP": "87.123.189.212", // external IP sent to clients to connect to
|
"IP": "127.0.0.1", // external IP sent to clients to connect to
|
||||||
"Port": 17022,
|
"Port": 17022,
|
||||||
"Name": "Online Worms Private Server",
|
"Name": "Online Worms Private Server",
|
||||||
"Region": "Global",
|
"Region": "Global",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user