feat: add upgrade tower (non gui)
This commit is contained in:
@@ -40,6 +40,7 @@ void ServerConnexion::registerHandlers() {
|
||||
GetDispatcher()->RegisterHandler(protocol::PacketType::Disconnect, this);
|
||||
GetDispatcher()->RegisterHandler(protocol::PacketType::PlaceTower, this);
|
||||
GetDispatcher()->RegisterHandler(protocol::PacketType::SendMobs, this);
|
||||
GetDispatcher()->RegisterHandler(protocol::PacketType::UpgradeTower, this);
|
||||
}
|
||||
|
||||
bool ServerConnexion::updateSocket() {
|
||||
@@ -173,6 +174,12 @@ void ServerConnexion::HandlePacket(protocol::SendMobsPacket* packet) {
|
||||
}
|
||||
}
|
||||
|
||||
void ServerConnexion::HandlePacket(protocol::UpgradeTowerPacket* packet){
|
||||
//TODO: verify the packet
|
||||
|
||||
m_Server->broadcastPacket(packet);
|
||||
}
|
||||
|
||||
ServerConnexion::~ServerConnexion() {
|
||||
if (GetDispatcher() != nullptr)
|
||||
GetDispatcher()->UnregisterHandler(this);
|
||||
|
||||
Reference in New Issue
Block a user