diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-14 00:20:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-14 00:20:27 +0300 |
commit | f676561f759c2be6e51c68b085b7d01ee98fc0d4 (patch) | |
tree | b1868eb2a4a519c6531c20dda1c3a88ef183157c /src/net/eathena/friendshandler.cpp | |
parent | 55901aee07fe748590acb31b69777b1b6e914b6c (diff) | |
download | mv-f676561f759c2be6e51c68b085b7d01ee98fc0d4.tar.gz mv-f676561f759c2be6e51c68b085b7d01ee98fc0d4.tar.bz2 mv-f676561f759c2be6e51c68b085b7d01ee98fc0d4.tar.xz mv-f676561f759c2be6e51c68b085b7d01ee98fc0d4.zip |
eathena: add partial support for packet SMSG_FRIENDS_LIST 0x0201.
Diffstat (limited to 'src/net/eathena/friendshandler.cpp')
-rw-r--r-- | src/net/eathena/friendshandler.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp index c5bb7e8b5..0f57e9eea 100644 --- a/src/net/eathena/friendshandler.cpp +++ b/src/net/eathena/friendshandler.cpp @@ -35,6 +35,7 @@ FriendsHandler::FriendsHandler() : static const uint16_t _messages[] = { SMSG_FRIENDS_PLAYER_ONLINE, + SMSG_FRIENDS_LIST, 0 }; handledMessages = _messages; @@ -49,6 +50,10 @@ void FriendsHandler::handleMessage(Net::MessageIn &msg) processPlayerOnline(msg); break; + case SMSG_FRIENDS_LIST: + processFriendsList(msg); + break; + default: break; } @@ -61,4 +66,15 @@ void FriendsHandler::processPlayerOnline(Net::MessageIn &msg) msg.readUInt8("flag"); // 0 - online, 1 - offline } +void FriendsHandler::processFriendsList(Net::MessageIn &msg) +{ + const int count = (msg.readInt16("size") - 4) / 32; + for (int f = 0; f < count; f ++) + { + msg.readInt32("account id"); + msg.readInt32("char id"); + msg.readString(24, "name"); + } +} + } // namespace EAthena |