summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/chatrecv.cpp12
-rw-r--r--src/net/eathena/chatrecv.h1
-rw-r--r--src/net/eathena/packetsin.inc1
3 files changed, 14 insertions, 0 deletions
diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp
index fdcdfe8ed..092fc0589 100644
--- a/src/net/eathena/chatrecv.cpp
+++ b/src/net/eathena/chatrecv.cpp
@@ -194,6 +194,18 @@ void ChatRecv::processFormatMessageString(Net::MessageIn &msg)
processChatContinue(chatMsg, ChatMsgType::BY_SERVER);
}
+void ChatRecv::processFormatMessageStringColor(Net::MessageIn &msg)
+{
+ const int strLen = msg.readInt16("len") - 10;
+ const int msgId = msg.readInt16("msg id");
+ msg.readInt32("color");
+ const std::string message = msg.readString(strLen, "value");
+ // +++ here need load message from configuration file
+ const std::string chatMsg = strprintf(
+ "Message #%d, value: %s", msgId, message.c_str());
+ processChatContinue(chatMsg, ChatMsgType::BY_SERVER);
+}
+
void ChatRecv::processFormatMessageSkill(Net::MessageIn &msg)
{
const int skillId = msg.readInt16("skill id");
diff --git a/src/net/eathena/chatrecv.h b/src/net/eathena/chatrecv.h
index ec8b0528d..cf306056f 100644
--- a/src/net/eathena/chatrecv.h
+++ b/src/net/eathena/chatrecv.h
@@ -50,6 +50,7 @@ namespace EAthena
void processFormatMessageNumber(Net::MessageIn &msg);
void processFormatColor(Net::MessageIn &msg);
void processFormatMessageString(Net::MessageIn &msg);
+ void processFormatMessageStringColor(Net::MessageIn &msg);
void processFormatMessageSkill(Net::MessageIn &msg);
void processChatDisplay(Net::MessageIn &msg);
void processChatRoomJoinAck(Net::MessageIn &msg);
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 191e801f5..b11b20fbd 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -981,6 +981,7 @@ if (packetVersion >= 20151223)
if (packetVersion >= 20160330)
{
packet(SMSG_MAP_LOGIN_SUCCESS, 0x02eb, 13, &GameRecv::processMapLogin, 20160330);
+ packet(SMSG_FORMAT_MESSAGE_STRING_COLOR, 0x0a6f, -1, &ChatRecv::processFormatMessageStringColor, 20160330);
}
// 20160622