diff options
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 15 |
1 files changed, 15 insertions, 0 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") |