summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-19 14:26:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-19 14:26:20 +0300
commit4560d6660217598df26631496ca666793b6be3f5 (patch)
treed51365b3495fd6a4a828699bec859daa5a5248b4
parent23311af88da21e9f704069edca9081c49e10c872 (diff)
downloadplus-4560d6660217598df26631496ca666793b6be3f5.tar.gz
plus-4560d6660217598df26631496ca666793b6be3f5.tar.bz2
plus-4560d6660217598df26631496ca666793b6be3f5.tar.xz
plus-4560d6660217598df26631496ca666793b6be3f5.zip
eathena: add partial support for packet SMSG_CHAT_JOIN_ACK 0x00db.
-rw-r--r--src/net/eathena/chathandler.cpp16
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 19 insertions, 0 deletions
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