diff options
Diffstat (limited to 'src/net/eathena/generalhandler.cpp')
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index c5730556a..aa939acb5 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -118,6 +118,7 @@ GeneralHandler::GeneralHandler() : static const uint16_t _messages[] = { SMSG_CONNECTION_PROBLEM, + SMSG_MAP_NOT_FOUND, 0 }; handledMessages = _messages; @@ -147,6 +148,10 @@ void GeneralHandler::handleMessage(Net::MessageIn &msg) processConnectionProblem(msg); break; + case SMSG_MAP_NOT_FOUND: + processMapNotFound(msg); + break; + default: break; } @@ -254,6 +259,14 @@ void GeneralHandler::processConnectionProblem(Net::MessageIn &msg) client->setState(STATE_ERROR); } +void GeneralHandler::processMapNotFound(Net::MessageIn &msg) +{ + const int sz = msg.readInt16("len") - 4; + msg.readString(sz, "map name?"); + errorMessage = _("Map not found"); + client->setState(STATE_ERROR); +} + void GeneralHandler::load() { (new Network)->registerHandler(this); |