2023-09-23 11:11:07 +00:00
|
|
|
using Tiger.Communication.Messages.Interfaces;
|
2023-10-14 16:21:53 +00:00
|
|
|
using Tiger.Communication.Messages.Outgoing.User.Data;
|
2023-09-23 11:11:07 +00:00
|
|
|
using Tiger.Communication.Messages.Types;
|
|
|
|
using Tiger.Networking.Game.Sessions;
|
|
|
|
|
|
|
|
namespace Tiger.Communication.Messages.Incoming.Handshake;
|
|
|
|
|
2023-10-14 16:21:53 +00:00
|
|
|
public class InfoRetrieveMessageEvent : IMessageEvent
|
2023-09-23 11:11:07 +00:00
|
|
|
{
|
|
|
|
private readonly IGameSessionManager _gameSessionManager;
|
|
|
|
|
2023-10-14 16:21:53 +00:00
|
|
|
public InfoRetrieveMessageEvent(IGameSessionManager gameSessionManager)
|
2023-09-23 11:11:07 +00:00
|
|
|
{
|
|
|
|
_gameSessionManager = gameSessionManager;
|
|
|
|
}
|
|
|
|
|
2023-10-14 16:21:53 +00:00
|
|
|
public IncomingHeaders Header => IncomingHeaders.UserInfo;
|
2023-09-23 11:11:07 +00:00
|
|
|
public async Task HandleAsync(GameSession gameSession, ClientMessage request)
|
|
|
|
{
|
2024-02-18 12:43:34 +00:00
|
|
|
await gameSession.SendComposerAsync(new UserInfoComposer());
|
2023-09-23 11:11:07 +00:00
|
|
|
}
|
|
|
|
}
|