summaryrefslogtreecommitdiff
path: root/src/net/eathena/generalhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-31 00:17:14 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-31 00:17:14 +0300
commitfb36852e1fe3e93811ef7de329729789ec815cf5 (patch)
tree586b47294692b9b40a2bd332e2b3c26e55731902 /src/net/eathena/generalhandler.cpp
parent593dbe6cbce8a4137b7e86633e801d6200f6e999 (diff)
downloadplus-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.cpp13
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);