mirror of
https://gitlab.com/Syroot/Worms.git
synced 2025-03-03 17:05:21 +03:00
Fix game packets.
This commit is contained in:
parent
02a644abe9
commit
20d7c3c743
@ -395,7 +395,8 @@ namespace Syroot.Worms.Worms2.GameServer
|
||||
private void OnCreateGame(PacketConnection connection, Packet packet)
|
||||
{
|
||||
User? fromUser = GetUser(connection);
|
||||
if (fromUser == null || packet.Value2 == null || packet.Data == null || packet.Session == null)
|
||||
if (fromUser == null || packet.Value1 != 0 || packet.Value2 == null || packet.Value4 != 0x800
|
||||
|| packet.Data == null || packet.Name == null || packet.Session == null)
|
||||
return;
|
||||
|
||||
// Require valid room ID.
|
||||
@ -410,8 +411,9 @@ namespace Syroot.Worms.Worms2.GameServer
|
||||
foreach (User user in _users.Where(x => x != fromUser))
|
||||
{
|
||||
SendPacket(user.Connection, new Packet(PacketCode.CreateGame,
|
||||
value1: newGame.ID,
|
||||
value2: newGame.RoomID,
|
||||
value4: newGame.ID,
|
||||
value4: 0x800,
|
||||
data: newGame.IPAddress.ToString(),
|
||||
name: newGame.Name,
|
||||
session: newGame.Session));
|
||||
|
Loading…
x
Reference in New Issue
Block a user