summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/chathandler.cpp15
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
4 files changed, 19 insertions, 1 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 1e5d343e7..0dc632252 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -62,6 +62,7 @@ ChatHandler::ChatHandler() :
SMSG_CHAT_IGNORE_LIST,
SMSG_FORMAT_MESSAGE,
SMSG_FORMAT_MESSAGE_NUMBER,
+ SMSG_FORMAT_MESSAGE_SKILL,
0
};
handledMessages = _messages;
@@ -98,6 +99,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processFormatMessageNumber(msg);
break;
+ case SMSG_FORMAT_MESSAGE_SKILL:
+ processFormatMessageSkill(msg);
+ break;
+
case SMSG_COLOR_MESSAGE:
processColorChat(msg);
break;
@@ -307,6 +312,16 @@ void ChatHandler::processFormatMessageNumber(Net::MessageIn &msg)
processChatContinue(chatMsg);
}
+void ChatHandler::processFormatMessageSkill(Net::MessageIn &msg)
+{
+ const int skillId = msg.readInt16("skill id");
+ const int msgId = msg.readInt32("msg id");
+ // +++ here need load message from configuration file
+ const std::string chatMsg = strprintf(
+ "Message #%d, skill: %d", msgId, skillId);
+ processChatContinue(chatMsg);
+}
+
void ChatHandler::processColorChat(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processChat")
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 5597c9c71..dc75a6162 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -90,6 +90,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void processFormatMessage(Net::MessageIn &msg);
void processFormatMessageNumber(Net::MessageIn &msg);
+
+ void processFormatMessageSkill(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index fa9bab2e5..0fd1a3992 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -210,7 +210,7 @@ int16_t packet_lengths[] =
// #0x07C0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 8, 268, 0, 0, 0, 0, 0, 0,
- 0, 0, 8, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 8, 0, 6, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 8, 25, 0, 0, 0, 0,
//0 1 2 3 4 5 6 7 8 9 a b c d e f
//0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index fb8b4110e..d1998437f 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -105,6 +105,7 @@
#define SMSG_COLOR_MESSAGE 0x02c1
#define SMSG_FORMAT_MESSAGE 0x0291
#define SMSG_FORMAT_MESSAGE_NUMBER 0x07e2
+#define SMSG_FORMAT_MESSAGE_SKILL 0x07e6
#define SMSG_BEING_NAME_RESPONSE 0x0095 /**< Has to be requested */
#define SMSG_BEING_NAME_RESPONSE2 0x0220 /**< Has to be requested */
#define SMSG_BEING_CHANGE_DIRECTION 0x009c