summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-13 23:37:15 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-13 23:37:15 +0300
commit564fa0de49a384284868eaddbbdb9f87c58a3661 (patch)
treee60f242e9df768ee8ed90f1652926e895841c1c3 /src/net/eathena/chathandler.cpp
parent949a27bfda6b3fa8e6a4ad2e05448c61e9889e8a (diff)
downloadplus-564fa0de49a384284868eaddbbdb9f87c58a3661.tar.gz
plus-564fa0de49a384284868eaddbbdb9f87c58a3661.tar.bz2
plus-564fa0de49a384284868eaddbbdb9f87c58a3661.tar.xz
plus-564fa0de49a384284868eaddbbdb9f87c58a3661.zip
eathena: add partial support for packet SMSG_FORMAT_MESSAGE_NUMBER 0x07e2.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index df1c45155..1e5d343e7 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -61,6 +61,7 @@ ChatHandler::ChatHandler() :
SMSG_COLOR_MESSAGE,
SMSG_CHAT_IGNORE_LIST,
SMSG_FORMAT_MESSAGE,
+ SMSG_FORMAT_MESSAGE_NUMBER,
0
};
handledMessages = _messages;
@@ -93,6 +94,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processFormatMessage(msg);
break;
+ case SMSG_FORMAT_MESSAGE_NUMBER:
+ processFormatMessageNumber(msg);
+ break;
+
case SMSG_COLOR_MESSAGE:
processColorChat(msg);
break;
@@ -286,13 +291,22 @@ void ChatHandler::processChat(Net::MessageIn &msg)
void ChatHandler::processFormatMessage(Net::MessageIn &msg)
{
- BLOCK_START("ChatHandler::processChat")
int msgId = msg.readInt16("msg id");
// +++ here need load message from configuration file
const std::string chatMsg = strprintf("Message #%d", msgId);
processChatContinue(chatMsg);
}
+void ChatHandler::processFormatMessageNumber(Net::MessageIn &msg)
+{
+ int msgId = msg.readInt16("msg id");
+ int value = msg.readInt32("value");
+ // +++ here need load message from configuration file
+ const std::string chatMsg = strprintf(
+ "Message #%d, value: %d", msgId, value);
+ processChatContinue(chatMsg);
+}
+
void ChatHandler::processColorChat(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processChat")