summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-08 13:01:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-08 13:01:48 +0300
commitecd14ef02d48407b33a8a32505165f99885d801a (patch)
treedb565b5cd36525cba9db53b8e87acb65ad4fe623
parentb7459717ecbcef46edd6e080e8dac481161a2bb5 (diff)
downloadmv-ecd14ef02d48407b33a8a32505165f99885d801a.tar.gz
mv-ecd14ef02d48407b33a8a32505165f99885d801a.tar.bz2
mv-ecd14ef02d48407b33a8a32505165f99885d801a.tar.xz
mv-ecd14ef02d48407b33a8a32505165f99885d801a.zip
eathena: add packet SMSG_GM_CHAT2 0x01c3.
-rw-r--r--src/net/eathena/chathandler.cpp18
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 21 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")
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 35a3c186c..05f2f7217 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -65,6 +65,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void processWhisper(Net::MessageIn &msg) const;
void processWhisperResponse(Net::MessageIn &msg);
+
+ void processGmChat2(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index c5b1277c5..243e2ed6c 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -127,6 +127,7 @@
#define SMSG_WHISPER 0x0097 /**< Whisper Recieved */
#define SMSG_WHISPER_RESPONSE 0x09df
#define SMSG_GM_CHAT 0x009a /**< GM announce */
+#define SMSG_GM_CHAT2 0x01c3
#define SMSG_WALK_RESPONSE 0x0087
// Receiving a request to trade