diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-13 23:03:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-13 23:03:43 +0300 |
commit | 857b503b43dc7e2a452f1897efc2100b028f843a (patch) | |
tree | 7af2481fbd6f6fd057f1dc7a9047e54c6fbaf378 /src/net/eathena/chathandler.cpp | |
parent | cc597ceb752585ebf247dfbad6185d31e57e8ed8 (diff) | |
download | mv-857b503b43dc7e2a452f1897efc2100b028f843a.tar.gz mv-857b503b43dc7e2a452f1897efc2100b028f843a.tar.bz2 mv-857b503b43dc7e2a452f1897efc2100b028f843a.tar.xz mv-857b503b43dc7e2a452f1897efc2100b028f843a.zip |
eathena: add partial support for packet SMSG_FORMAT_MESSAGE 0x0291.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index beae2731b..df1c45155 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -60,6 +60,7 @@ ChatHandler::ChatHandler() : SMSG_IGNORE_ALL_RESPONSE, SMSG_COLOR_MESSAGE, SMSG_CHAT_IGNORE_LIST, + SMSG_FORMAT_MESSAGE, 0 }; handledMessages = _messages; @@ -88,6 +89,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg) processChat(msg); break; + case SMSG_FORMAT_MESSAGE: + processFormatMessage(msg); + break; + case SMSG_COLOR_MESSAGE: processColorChat(msg); break; @@ -279,6 +284,15 @@ void ChatHandler::processChat(Net::MessageIn &msg) processChatContinue(msg.readRawString(chatMsgLength, "message")); } +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::processColorChat(Net::MessageIn &msg) { BLOCK_START("ChatHandler::processChat") |