refactor: format code

This commit is contained in:
2021-09-19 17:33:16 +02:00
parent 52a143769e
commit 0856ca47ca
71 changed files with 1102 additions and 1110 deletions

View File

@@ -3,30 +3,30 @@
#include "game/client/ClientGame.h"
#include "render/WorldRenderer.h"
namespace td{
namespace client{
namespace td {
namespace client {
WorldClient::WorldClient(ClientGame* game) : game::World(game), protocol::PacketHandler(game->GetDispatcher()), m_Game(game){
WorldClient::WorldClient(ClientGame* game) : game::World(game), protocol::PacketHandler(game->GetDispatcher()), m_Game(game) {
GetDispatcher()->RegisterHandler(protocol::PacketType::WorldBeginData, this);
GetDispatcher()->RegisterHandler(protocol::PacketType::WorldData, this);
GetDispatcher()->RegisterHandler(protocol::PacketType::WorldAddTower, this);
GetDispatcher()->RegisterHandler(protocol::PacketType::SpawnMob, this);
}
void WorldClient::HandlePacket(protocol::WorldBeginDataPacket* packet){
void WorldClient::HandlePacket(protocol::WorldBeginDataPacket* packet) {
loadMap(packet);
}
void WorldClient::HandlePacket(protocol::WorldDataPacket* packet){
void WorldClient::HandlePacket(protocol::WorldDataPacket* packet) {
loadMap(packet);
}
void WorldClient::HandlePacket(protocol::WorldAddTowerPacket* packet){
void WorldClient::HandlePacket(protocol::WorldAddTowerPacket* packet) {
}
void WorldClient::HandlePacket(protocol::SpawnMobPacket* packet){
spawnMobAt(packet->getMobID(), packet->getMobType(), packet->getMobLevel(), packet->getSender(),
void WorldClient::HandlePacket(protocol::SpawnMobPacket* packet) {
spawnMobAt(packet->getMobID(), packet->getMobType(), packet->getMobLevel(), packet->getSender(),
packet->getMobX(), packet->getMobY(), packet->getMobDirection());
}