From ecd14ef02d48407b33a8a32505165f99885d801a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Sep 2014 13:01:48 +0300 Subject: eathena: add packet SMSG_GM_CHAT2 0x01c3. --- src/net/eathena/chathandler.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/net/eathena/chathandler.cpp') diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index ad8c3bcdc..b8973dd66 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -55,6 +55,7 @@ ChatHandler::ChatHandler() : SMSG_WHISPER, SMSG_WHISPER_RESPONSE, SMSG_GM_CHAT, + SMSG_GM_CHAT2, SMSG_MVP, // MVP SMSG_IGNORE_ALL_RESPONSE, SMSG_COLOR_MESSAGE, @@ -88,6 +89,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg) processChat(msg); break; + case SMSG_GM_CHAT2: + processGmChat2(msg); + break; + case SMSG_MVP: processMVP(msg); break; @@ -313,6 +318,19 @@ void ChatHandler::processChat(Net::MessageIn &msg) BLOCK_END("ChatHandler::processChat") } +void ChatHandler::processGmChat2(Net::MessageIn &msg) +{ + int chatMsgLength = msg.readInt16("len") - 16; + msg.readInt32("font color"); + msg.readInt16("font type"); + msg.readInt16("font size"); + msg.readInt16("font align"); + msg.readInt16("font y"); + const std::string chatMsg = msg.readRawString(chatMsgLength, "message"); + if (chatWindow) + chatWindow->addGlobalMessage(chatMsg); +} + void ChatHandler::processWhisper(Net::MessageIn &msg) const { BLOCK_START("ChatHandler::processWhisper") -- cgit v1.2.3-70-g09d2