From 2c2a9956f8271fc6a1ac0ff978ceb1c57403f849 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 19 Sep 2014 14:46:46 +0300 Subject: eathena: add partial support for packet SMSG_CHAT_LEAVE 0x00dd. --- src/net/eathena/chathandler.cpp | 12 ++++++++++++ src/net/eathena/chathandler.h | 2 ++ src/net/eathena/protocol.h | 1 + 3 files changed, 15 insertions(+) (limited to 'src/net') diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 6ed5dc30c..d03e3b304 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -69,6 +69,7 @@ ChatHandler::ChatHandler() : SMSG_FORMAT_MESSAGE_SKILL, SMSG_CHAT_DISPLAY, SMSG_CHAT_JOIN_ACK, + SMSG_CHAT_LEAVE, 0 }; handledMessages = _messages; @@ -141,6 +142,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg) processChatJoinAck(msg); break; + case SMSG_CHAT_LEAVE: + processChatLeave(msg); + break; + default: break; } @@ -496,4 +501,11 @@ void ChatHandler::processChatJoinAck(Net::MessageIn &msg) } } +void ChatHandler::processChatLeave(Net::MessageIn &msg) +{ + msg.readInt16("users"); + msg.readString(24, "name"); + msg.readUInt8("flag"); // 0 - left, 1 - kicked +} + } // namespace EAthena diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index 4f544fb27..77484c946 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -101,6 +101,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void processChatDisplay(Net::MessageIn &msg); void processChatJoinAck(Net::MessageIn &msg); + + void processChatLeave(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 2dc33397a..16f0acb09 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -215,6 +215,7 @@ #define SMSG_CHAT_IGNORE_LIST 0x00d4 #define SMSG_CHAT_DISPLAY 0x00d7 #define SMSG_CHAT_JOIN_ACK 0x00db +#define SMSG_CHAT_LEAVE 0x00dd #define SMSG_MAIL_OPEN_WINDOW 0x0260 -- cgit v1.2.3-70-g09d2