summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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