begin player auth

This commit is contained in:
2025-08-15 11:25:35 +02:00
parent 833173b5e8
commit a50898a88b
16 changed files with 139 additions and 40 deletions

View File

@@ -0,0 +1,19 @@
#include <client/state/LoggingState.h>
#include <iostream>
namespace td {
namespace client {
LoggingState::LoggingState(Client& a_Client, const std::string& a_PlayerName) : ClientState(a_Client) {
SendPacket(td::protocol::packets::PlayerLoginPacket(a_PlayerName));
}
LoggingState::~LoggingState() {}
void LoggingState::Handle(const protocol::packets::PlayerJoinPacket& a_Packet) {
std::cout << "[Client] " << a_Packet->m_Player.m_PlayerName << "(" << +a_Packet->m_Player.m_PlayerId << ") joined !\n";
}
} // namespace client
} // namespace td