summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-17 19:12:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-17 21:22:47 +0300
commitefb2f46fc326117d77851fe588784ff869e2935f (patch)
treeba483c230a64e16aefa89f9717d6915d267e2f01 /src/net/eathena
parent661dec0f325a01427911598fb6b7e24754a3a1b5 (diff)
downloadplus-efb2f46fc326117d77851fe588784ff869e2935f.tar.gz
plus-efb2f46fc326117d77851fe588784ff869e2935f.tar.bz2
plus-efb2f46fc326117d77851fe588784ff869e2935f.tar.xz
plus-efb2f46fc326117d77851fe588784ff869e2935f.zip
Add static in gamehandler.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/gamehandler.cpp13
-rw-r--r--src/net/eathena/gamehandler.h8
2 files changed, 13 insertions, 8 deletions
diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp
index b8d0ecd8e..6caf57c20 100644
--- a/src/net/eathena/gamehandler.cpp
+++ b/src/net/eathena/gamehandler.cpp
@@ -173,7 +173,7 @@ void GameHandler::processMapAccountId(Net::MessageIn &msg)
msg.readInt32("account id");
}
-void GameHandler::processMapLogin(Net::MessageIn &msg) const
+void GameHandler::processMapLogin(Net::MessageIn &msg)
{
unsigned char direction;
uint16_t x, y;
@@ -188,8 +188,13 @@ void GameHandler::processMapLogin(Net::MessageIn &msg) const
mLastHost &= 0xffffff;
- if (mNetwork)
- mNetwork->pauseDispatch();
+ GameHandler *const g = dynamic_cast<GameHandler*>(gameHandler);
+ if (g)
+ {
+ Network *const network = g->mNetwork;
+ if (network)
+ network->pauseDispatch();
+ }
// Switch now or we'll have problems
client->setState(STATE_GAME);
@@ -197,7 +202,7 @@ void GameHandler::processMapLogin(Net::MessageIn &msg) const
localPlayer->setTileCoords(x, y);
}
-void GameHandler::processServerTick(Net::MessageIn &msg) const
+void GameHandler::processServerTick(Net::MessageIn &msg)
{
msg.readInt32("tick");
}
diff --git a/src/net/eathena/gamehandler.h b/src/net/eathena/gamehandler.h
index 85314d117..ef257e016 100644
--- a/src/net/eathena/gamehandler.h
+++ b/src/net/eathena/gamehandler.h
@@ -53,15 +53,15 @@ class GameHandler final : public MessageHandler, public Ea::GameHandler
void mapLoadedEvent() const override final;
- static void processMapAccountId(Net::MessageIn &msg);
-
bool mustPing() const override final A_WARN_UNUSED
{ return true; }
protected:
- void processMapLogin(Net::MessageIn &msg) const;
+ static void processMapAccountId(Net::MessageIn &msg);
+
+ static void processMapLogin(Net::MessageIn &msg);
- void processServerTick(Net::MessageIn &msg) const;
+ static void processServerTick(Net::MessageIn &msg);
};
} // namespace EAthena