diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-31 00:17:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-31 00:17:14 +0300 |
commit | fb36852e1fe3e93811ef7de329729789ec815cf5 (patch) | |
tree | 586b47294692b9b40a2bd332e2b3c26e55731902 /src/net/eathena/generalhandler.cpp | |
parent | 593dbe6cbce8a4137b7e86633e801d6200f6e999 (diff) | |
download | plus-fb36852e1fe3e93811ef7de329729789ec815cf5.tar.gz plus-fb36852e1fe3e93811ef7de329729789ec815cf5.tar.bz2 plus-fb36852e1fe3e93811ef7de329729789ec815cf5.tar.xz plus-fb36852e1fe3e93811ef7de329729789ec815cf5.zip |
eathena: add packet SMSG_MAP_NOT_FOUND 0x0840.
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); |