diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-07 15:10:13 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-07 15:10:13 -0600 |
commit | 3e8ed12a530426b3c649922452f42d9a2b2a8d89 (patch) | |
tree | b8a36133854f772438144529d68dfb657e06fa4f /src/net/ea/maphandler.cpp | |
parent | 9eebc7ddac10c6c7f483bfd1003db79e61438bff (diff) | |
download | mana-client-3e8ed12a530426b3c649922452f42d9a2b2a8d89.tar.gz mana-client-3e8ed12a530426b3c649922452f42d9a2b2a8d89.tar.bz2 mana-client-3e8ed12a530426b3c649922452f42d9a2b2a8d89.tar.xz mana-client-3e8ed12a530426b3c649922452f42d9a2b2a8d89.zip |
Make GeneralHandlers for both networks
Also make Net::LogoutHandler
Diffstat (limited to 'src/net/ea/maphandler.cpp')
-rw-r--r-- | src/net/ea/maphandler.cpp | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/net/ea/maphandler.cpp b/src/net/ea/maphandler.cpp index 6912176f..6fd27755 100644 --- a/src/net/ea/maphandler.cpp +++ b/src/net/ea/maphandler.cpp @@ -21,6 +21,7 @@ #include "net/ea/maphandler.h" +#include "net/ea/network.h" #include "net/ea/protocol.h" #include "net/messagein.h" @@ -42,7 +43,6 @@ namespace EAthena { MapHandler::MapHandler() { static const Uint16 _messages[] = { - SMSG_CONNECTION_PROBLEM, SMSG_LOGIN_SUCCESS, SMSG_SERVER_PING, SMSG_WHO_ANSWER, @@ -59,24 +59,6 @@ void MapHandler::handleMessage(MessageIn &msg) switch (msg.getId()) { - case SMSG_CONNECTION_PROBLEM: - code = msg.readInt8(); - logger->log("Connection problem: %i", code); - - switch (code) { - case 0: - errorMessage = _("Authentication failed"); - break; - case 2: - errorMessage = _("This account is already logged in"); - break; - default: - errorMessage = _("Unknown connection error"); - break; - } - state = STATE_ERROR; - break; - case SMSG_LOGIN_SUCCESS: msg.readInt32(); // server tick msg.readCoordinates(player_node->mX, player_node->mY, direction); @@ -107,6 +89,9 @@ void MapHandler::connect(LoginData *loginData) outMsg.writeInt32(loginData->session_ID1); outMsg.writeInt32(loginData->session_ID2); outMsg.writeInt8(loginData->sex); + + // We get 4 useless bytes before the real answer comes in (what are these?) + mNetwork->skip(4); } void MapHandler::mapLoaded(const std::string &mapName) |