diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-01 00:42:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:54 +0300 |
commit | ed5325ebc95fd9d954730a27c0e57be35bc5d3d0 (patch) | |
tree | d08c494813e4ce6537010aea1263fdda71cdc234 /src/net/eathena | |
parent | a232b6c9ae2315c4658a0de6ba0fc779d4606fdd (diff) | |
download | mv-ed5325ebc95fd9d954730a27c0e57be35bc5d3d0.tar.gz mv-ed5325ebc95fd9d954730a27c0e57be35bc5d3d0.tar.bz2 mv-ed5325ebc95fd9d954730a27c0e57be35bc5d3d0.tar.xz mv-ed5325ebc95fd9d954730a27c0e57be35bc5d3d0.zip |
Move processMapLogin from ea to tmwa and eathena namespaces.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/gamehandler.cpp | 18 | ||||
-rw-r--r-- | src/net/eathena/gamehandler.h | 3 |
2 files changed, 21 insertions, 0 deletions
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 diff --git a/src/net/eathena/gamehandler.h b/src/net/eathena/gamehandler.h index 56af1979b..c6b222f0c 100644 --- a/src/net/eathena/gamehandler.h +++ b/src/net/eathena/gamehandler.h @@ -57,6 +57,9 @@ class GameHandler final : public MessageHandler, public Ea::GameHandler bool mustPing() const override final A_WARN_UNUSED { return true; } + + protected: + void processMapLogin(Net::MessageIn &msg) const; }; } // namespace EAthena |