From 2a0b524403f62e0217cf52e88a0c7e4e62f88df9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 5 Sep 2014 02:04:59 +0300 Subject: Move processWalkResponse from ea namespace into eathena and tmwa. --- src/net/eathena/playerhandler.cpp | 16 ++++++++++++++++ src/net/eathena/playerhandler.h | 2 ++ 2 files changed, 18 insertions(+) (limited to 'src/net/eathena') diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index a4ce3c0d0..c6636fded 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -340,4 +340,20 @@ void PlayerHandler::processPlayerGetExp(Net::MessageIn &msg) // need show particle depend on isQuest flag, for now ignored } +void PlayerHandler::processWalkResponse(Net::MessageIn &msg) +{ + BLOCK_START("PlayerHandler::processWalkResponse") + /* + * This client assumes that all walk messages succeed, + * and that the server will send a correction notice + * otherwise. + */ + uint16_t srcX, srcY, dstX, dstY; + msg.readInt32(); // tick + msg.readCoordinatePair(srcX, srcY, dstX, dstY); + if (localPlayer) + localPlayer->setRealPos(dstX, dstY); + BLOCK_END("PlayerHandler::processWalkResponse") +} + } // namespace EAthena diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h index 03806ec4d..cc6804164 100644 --- a/src/net/eathena/playerhandler.h +++ b/src/net/eathena/playerhandler.h @@ -64,6 +64,8 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler void processPlayerStatUpdate5(Net::MessageIn &msg); void processPlayerGetExp(Net::MessageIn &msg); + + static void processWalkResponse(Net::MessageIn &msg); }; } // namespace EAthena -- cgit v1.2.3-70-g09d2