diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-14 00:13:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-14 00:13:08 +0300 |
commit | 55901aee07fe748590acb31b69777b1b6e914b6c (patch) | |
tree | ec333cf05b4ac8a2b4f2a8736b9fc657301f5a59 /src/net/eathena | |
parent | bde97e51963bc89b5922707fa628ffbeb7b03b01 (diff) | |
download | mv-55901aee07fe748590acb31b69777b1b6e914b6c.tar.gz mv-55901aee07fe748590acb31b69777b1b6e914b6c.tar.bz2 mv-55901aee07fe748590acb31b69777b1b6e914b6c.tar.xz mv-55901aee07fe748590acb31b69777b1b6e914b6c.zip |
eathena: add partial support for packet SMSG_FRIENDS_PLAYER_ONLINE 0x0206.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/friendshandler.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/friendshandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/packets.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 |
4 files changed, 20 insertions, 1 deletions
diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp index 55a88c9ed..c5bb7e8b5 100644 --- a/src/net/eathena/friendshandler.cpp +++ b/src/net/eathena/friendshandler.cpp @@ -20,6 +20,8 @@ #include "net/eathena/friendshandler.h" +#include "net/eathena/protocol.h" + #include "debug.h" extern Net::FriendsHandler *friendsHandler; @@ -32,6 +34,7 @@ FriendsHandler::FriendsHandler() : { static const uint16_t _messages[] = { + SMSG_FRIENDS_PLAYER_ONLINE, 0 }; handledMessages = _messages; @@ -42,9 +45,20 @@ void FriendsHandler::handleMessage(Net::MessageIn &msg) { switch (msg.getId()) { + case SMSG_FRIENDS_PLAYER_ONLINE: + processPlayerOnline(msg); + break; + default: break; } } +void FriendsHandler::processPlayerOnline(Net::MessageIn &msg) +{ + msg.readInt32("account id"); + msg.readInt32("char id"); + msg.readUInt8("flag"); // 0 - online, 1 - offline +} + } // namespace EAthena diff --git a/src/net/eathena/friendshandler.h b/src/net/eathena/friendshandler.h index 3f30a99c0..5616a4cf4 100644 --- a/src/net/eathena/friendshandler.h +++ b/src/net/eathena/friendshandler.h @@ -36,6 +36,9 @@ class FriendsHandler final : public MessageHandler, A_DELETE_COPY(FriendsHandler) void handleMessage(Net::MessageIn &msg) override final; + + protected: + void processPlayerOnline(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index aefff741e..fd4749989 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -83,7 +83,7 @@ int16_t packet_lengths[] = //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 // #0x0200 - 26, 0, 0, 0, 18, 26, 0, 0, 0, 0, 0, 19, 10, 0, 0, 0, + 26, 0, 0, 0, 18, 26, 11, 0, 0, 0, 0, 19, 10, 0, 0, 0, 22, -1, 16, 0, 42, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 122, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 19, 71, 5, 12, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index b117e1af0..113c7d8a6 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -287,6 +287,8 @@ #define SMSG_HOMUNCULUS_SKILL_UP 0x0239 #define SMSG_HOMUNCULUS_FOOD 0x022f +#define SMSG_FRIENDS_PLAYER_ONLINE 0x0206 + /********************************** * Packets from client to server * **********************************/ |