summaryrefslogtreecommitdiff
path: root/src/net/tmwa/gamehandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-28 01:51:25 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-28 01:51:25 +0300
commitff936ce120283ade23d88725c7d38542beca0a93 (patch)
tree5b2d26630c3a0537b0f578994d9ada7653c0cab3 /src/net/tmwa/gamehandler.cpp
parentc9b13ba269857de0311863bf4d4461185fe10459 (diff)
downloadManaVerse-ff936ce120283ade23d88725c7d38542beca0a93.tar.gz
ManaVerse-ff936ce120283ade23d88725c7d38542beca0a93.tar.bz2
ManaVerse-ff936ce120283ade23d88725c7d38542beca0a93.tar.xz
ManaVerse-ff936ce120283ade23d88725c7d38542beca0a93.zip
improve gamehandler class
Diffstat (limited to 'src/net/tmwa/gamehandler.cpp')
-rw-r--r--src/net/tmwa/gamehandler.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index 80dc461f5..ce6fa0e14 100644
--- a/src/net/tmwa/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -88,7 +88,7 @@ void GameHandler::handleMessage(Net::MessageIn &msg)
BLOCK_END("GameHandler::handleMessage")
}
-void GameHandler::mapLoadedEvent()
+void GameHandler::mapLoadedEvent() const
{
MessageOut outMsg(CMSG_MAP_LOADED);
}
@@ -99,10 +99,8 @@ void GameHandler::connect()
return;
mNetwork->connect(mapServer);
-
- const Token &token =
- static_cast<LoginHandler*>(Net::getLoginHandler())->getToken();
-
+ const Token &token = static_cast<LoginHandler*>(
+ Net::getLoginHandler())->getToken();
if (Client::getState() == STATE_CONNECT_GAME)
{
@@ -137,7 +135,7 @@ void GameHandler::connect()
mNetwork->skip(4);
}
-bool GameHandler::isConnected()
+bool GameHandler::isConnected() const
{
if (!mNetwork)
return false;
@@ -150,18 +148,18 @@ void GameHandler::disconnect()
mNetwork->disconnect();
}
-void GameHandler::quit()
+void GameHandler::quit() const
{
MessageOut outMsg(CMSG_CLIENT_QUIT);
}
-void GameHandler::ping(int tick)
+void GameHandler::ping(const int tick) const
{
MessageOut msg(CMSG_CLIENT_PING);
msg.writeInt32(tick);
}
-void GameHandler::disconnect2()
+void GameHandler::disconnect2() const
{
MessageOut outMsg(CMSG_CLIENT_DISCONNECT);
}