diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-08 13:01:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-08 13:01:48 +0300 |
commit | ecd14ef02d48407b33a8a32505165f99885d801a (patch) | |
tree | db565b5cd36525cba9db53b8e87acb65ad4fe623 /src/net/eathena/chathandler.cpp | |
parent | b7459717ecbcef46edd6e080e8dac481161a2bb5 (diff) | |
download | mv-ecd14ef02d48407b33a8a32505165f99885d801a.tar.gz mv-ecd14ef02d48407b33a8a32505165f99885d801a.tar.bz2 mv-ecd14ef02d48407b33a8a32505165f99885d801a.tar.xz mv-ecd14ef02d48407b33a8a32505165f99885d801a.zip |
eathena: add packet SMSG_GM_CHAT2 0x01c3.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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") |