TigerEmu/Communication/Messages/Incoming/Handshake/InfoRetrieveMessageEvent.cs

22 lines
728 B
C#

using Tiger.Communication.Messages.Interfaces;
using Tiger.Communication.Messages.Outgoing.User.Data;
using Tiger.Communication.Messages.Types;
using Tiger.Networking.Game.Sessions;
namespace Tiger.Communication.Messages.Incoming.Handshake;
public class InfoRetrieveMessageEvent : IMessageEvent
{
private readonly IGameSessionManager _gameSessionManager;
public InfoRetrieveMessageEvent(IGameSessionManager gameSessionManager)
{
_gameSessionManager = gameSessionManager;
}
public IncomingHeaders Header => IncomingHeaders.UserInfo;
public async Task HandleAsync(GameSession gameSession, ClientMessage request)
{
await gameSession.SendComposerAsync(new UserInfoComposer());
}
}