From 4560d6660217598df26631496ca666793b6be3f5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 19 Sep 2014 14:26:20 +0300 Subject: eathena: add partial support for packet SMSG_CHAT_JOIN_ACK 0x00db. --- src/net/eathena/chathandler.cpp | 16 ++++++++++++++++ src/net/eathena/chathandler.h | 2 ++ src/net/eathena/protocol.h | 1 + 3 files changed, 19 insertions(+) (limited to 'src/net/eathena') diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index d09234af3..6ed5dc30c 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -68,6 +68,7 @@ ChatHandler::ChatHandler() : SMSG_FORMAT_MESSAGE_NUMBER, SMSG_FORMAT_MESSAGE_SKILL, SMSG_CHAT_DISPLAY, + SMSG_CHAT_JOIN_ACK, 0 }; handledMessages = _messages; @@ -136,6 +137,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg) processChatDisplay(msg); break; + case SMSG_CHAT_JOIN_ACK: + processChatJoinAck(msg); + break; + default: break; } @@ -480,4 +485,15 @@ void ChatHandler::joinChat(const ChatObject *const chat, outMsg.writeString(password, 8, "password"); } +void ChatHandler::processChatJoinAck(Net::MessageIn &msg) +{ + const int count = msg.readInt16("len") - 8; + msg.readInt32("chat id"); + for (int f = 0; f < count; f ++) + { + msg.readInt32("role"); + msg.readString(24, "name"); + } +} + } // namespace EAthena diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index ad66c9303..4f544fb27 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -99,6 +99,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void processFormatMessageSkill(Net::MessageIn &msg); void processChatDisplay(Net::MessageIn &msg); + + void processChatJoinAck(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 2d32d6f54..2dc33397a 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -214,6 +214,7 @@ #define SMSG_CHAT_IGNORE_LIST 0x00d4 #define SMSG_CHAT_DISPLAY 0x00d7 +#define SMSG_CHAT_JOIN_ACK 0x00db #define SMSG_MAIL_OPEN_WINDOW 0x0260 -- cgit v1.2.3-70-g09d2