From 5d0e738a90341dff367c49e4dfefe8e6c565882f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 25 Jan 2019 19:52:39 +0300 Subject: Add packet SMSG_SERVICE_MESSAGE_COLOR 0x0adb --- src/net/eathena/chatrecv.cpp | 11 +++++++++++ src/net/eathena/chatrecv.h | 1 + src/net/eathena/packetsin.inc | 1 + 3 files changed, 13 insertions(+) diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp index f4c41d120..318fe7c30 100644 --- a/src/net/eathena/chatrecv.cpp +++ b/src/net/eathena/chatrecv.cpp @@ -822,4 +822,15 @@ void ChatRecv::processScriptMessage(Net::MessageIn &msg) TryRemoveColors_true); } +void ChatRecv::processServiceMessageColor(Net::MessageIn &msg) +{ + const int sz = msg.readInt16("len") - 8; + msg.readInt32("color"); + const std::string message = msg.readString(sz, "message"); + localChatTab->chatLog(message, + ChatMsgType::BY_SERVER, + IgnoreRecord_false, + TryRemoveColors_true); +} + } // namespace EAthena diff --git a/src/net/eathena/chatrecv.h b/src/net/eathena/chatrecv.h index c304ce912..19d93f198 100644 --- a/src/net/eathena/chatrecv.h +++ b/src/net/eathena/chatrecv.h @@ -74,6 +74,7 @@ namespace EAthena void processChatTalkieBox(Net::MessageIn &msg); void processBattleChatMessage(Net::MessageIn &msg); void processScriptMessage(Net::MessageIn &msg); + void processServiceMessageColor(Net::MessageIn &msg); extern std::string mChatRoom; } // namespace ChatRecv } // namespace EAthena diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 5e2b3eb5d..6417c251c 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -1181,6 +1181,7 @@ if (packetVersionMain >= 20170726) // 20170830 packet(SMSG_PLAYER_STAT_UPDATE_7, 0x0acb, 12, &PlayerRecv::processPlayerStatUpdate7, 20170830); packet(SMSG_PLAYER_GET_EXP2, 0x0acc, 18, &PlayerRecv::processPlayerGetExp2, 20170830); +packet(SMSG_SERVICE_MESSAGE_COLOR, 0x0adb, -1, &ChatRecv::processServiceMessageColor, 20170830); // zero 20171018 if (packets_zero == true) -- cgit v1.2.3-70-g09d2