From ed5325ebc95fd9d954730a27c0e57be35bc5d3d0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 Sep 2014 00:42:35 +0300 Subject: Move processMapLogin from ea to tmwa and eathena namespaces. --- src/net/eathena/gamehandler.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/net/eathena/gamehandler.cpp') diff --git a/src/net/eathena/gamehandler.cpp b/src/net/eathena/gamehandler.cpp index 31c883158..0da88d8b4 100644 --- a/src/net/eathena/gamehandler.cpp +++ b/src/net/eathena/gamehandler.cpp @@ -176,4 +176,22 @@ void GameHandler::processMapAccountId(Net::MessageIn &msg) msg.readInt32("account id"); } +void GameHandler::processMapLogin(Net::MessageIn &msg) const +{ + unsigned char direction; + uint16_t x, y; + msg.readInt32(); // server tick + msg.readCoordinates(x, y, direction); + msg.skip(2); // 0x0505 + logger->log("Protocol: Player start position: (%d, %d)," + " Direction: %d", x, y, direction); + + mLastHost &= 0xffffff; + + // Switch now or we'll have problems + client->setState(STATE_GAME); + if (localPlayer) + localPlayer->setTileCoords(x, y); +} + } // namespace EAthena -- cgit v1.2.3-60-g2f50