2024-04-14 08:49:30 +03:00
|
|
|
using NLog;
|
|
|
|
|
using Ragon.Protocol;
|
|
|
|
|
using Ragon.Server.IO;
|
|
|
|
|
using Ragon.Server.Lobby;
|
|
|
|
|
|
|
|
|
|
namespace Ragon.Server.Handler
|
|
|
|
|
{
|
2024-05-07 22:42:45 +03:00
|
|
|
public class PlayerPropertiesOperation : BaseOperation
|
2024-04-14 08:49:30 +03:00
|
|
|
{
|
|
|
|
|
private readonly ILogger _logger = LogManager.GetCurrentClassLogger();
|
|
|
|
|
|
2024-05-07 22:42:45 +03:00
|
|
|
public PlayerPropertiesOperation(RagonBuffer reader, RagonBuffer writer) : base(reader, writer)
|
2024-04-14 08:49:30 +03:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void Handle(RagonContext context, NetworkChannel channel)
|
|
|
|
|
{
|
|
|
|
|
if (context.ConnectionStatus == ConnectionStatus.Unauthorized)
|
|
|
|
|
{
|
|
|
|
|
_logger.Warn($"Player {context.Connection.Id} not authorized for this request");
|
|
|
|
|
return;
|
|
|
|
|
}
|
2024-05-07 22:42:45 +03:00
|
|
|
|
|
|
|
|
var playerData = Reader.ReadBytes(Reader.Capacity);
|
2024-04-29 09:12:42 +03:00
|
|
|
context.UserData.Data = playerData;
|
2024-04-14 08:49:30 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|