From 857b503b43dc7e2a452f1897efc2100b028f843a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 13 Sep 2014 23:03:43 +0300 Subject: eathena: add partial support for packet SMSG_FORMAT_MESSAGE 0x0291. --- src/net/eathena/chathandler.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/net/eathena/chathandler.cpp') 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") -- cgit v1.2.3-60-g2f50