summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-18 22:46:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-18 22:53:08 +0300
commit48aff1ac90431f47fb82f40a7d23b980b512644b (patch)
tree9ab336e842b7b21842c702ef2bab9bd8d5fffa6a /src
parent0988e2f3c2fe46c2b2288707016d2a7f9f16b206 (diff)
downloadmanaplus-48aff1ac90431f47fb82f40a7d23b980b512644b.tar.gz
manaplus-48aff1ac90431f47fb82f40a7d23b980b512644b.tar.bz2
manaplus-48aff1ac90431f47fb82f40a7d23b980b512644b.tar.xz
manaplus-48aff1ac90431f47fb82f40a7d23b980b512644b.zip
eathena: add partial support for packet SMSG_CHAT_DISPLAY 0x00d7.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/chathandler.cpp16
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 19 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 5eec14491..632997081 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -63,6 +63,7 @@ ChatHandler::ChatHandler() :
SMSG_FORMAT_MESSAGE,
SMSG_FORMAT_MESSAGE_NUMBER,
SMSG_FORMAT_MESSAGE_SKILL,
+ SMSG_CHAT_DISPLAY,
0
};
handledMessages = _messages;
@@ -127,6 +128,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processChatIgnoreList(msg);
break;
+ case SMSG_CHAT_DISPLAY:
+ processChatDisplay(msg);
+ break;
+
default:
break;
}
@@ -444,4 +449,15 @@ void ChatHandler::processChatIgnoreList(Net::MessageIn &msg)
msg.readString(24, "nick");
}
+void ChatHandler::processChatDisplay(Net::MessageIn &msg)
+{
+ const int len = msg.readInt16("len") - 17;
+ msg.readInt32("owner account id");
+ msg.readInt32("char id");
+ msg.readInt16("max users");
+ msg.readInt16("current users");
+ msg.readUInt8("type");
+ msg.readString(len, "title");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 505a5ddea..590d461ca 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -94,6 +94,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void processFormatMessageNumber(Net::MessageIn &msg);
void processFormatMessageSkill(Net::MessageIn &msg);
+
+ void processChatDisplay(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 0d3aa1e14..3bf1b08a8 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -213,6 +213,7 @@
#define SMSG_PVP_INFO 0x0210
#define SMSG_CHAT_IGNORE_LIST 0x00d4
+#define SMSG_CHAT_DISPLAY 0x00d7
#define SMSG_MAIL_OPEN_WINDOW 0x0260