begin player auth
This commit is contained in:
19
src/client/state/LoggingState.cpp
Normal file
19
src/client/state/LoggingState.cpp
Normal 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
|
||||
Reference in New Issue
Block a user