summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-11 20:08:03 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-11 20:08:03 +0300
commit674269cdc7ce138b4c9b89f19ade3186888119cc (patch)
tree03e467f2d7e656f2ecf408ed5a9aeadbae02476c /src
parent248b4b33701fedf1a82aa4d09acc87d794273095 (diff)
downloadmv-674269cdc7ce138b4c9b89f19ade3186888119cc.tar.gz
mv-674269cdc7ce138b4c9b89f19ade3186888119cc.tar.bz2
mv-674269cdc7ce138b4c9b89f19ade3186888119cc.tar.xz
mv-674269cdc7ce138b4c9b89f19ade3186888119cc.zip
eathena: add partial support for packet SMSG_FRIENDS_REQUEST 0x0207.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/friendshandler.cpp13
-rw-r--r--src/net/eathena/friendshandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
4 files changed, 17 insertions, 1 deletions
diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp
index 7d28441b6..fafe3c76b 100644
--- a/src/net/eathena/friendshandler.cpp
+++ b/src/net/eathena/friendshandler.cpp
@@ -40,6 +40,7 @@ FriendsHandler::FriendsHandler() :
SMSG_FRIENDS_PLAYER_ONLINE,
SMSG_FRIENDS_LIST,
SMSG_FRIENDS_REQUEST_ACK,
+ SMSG_FRIENDS_REQUEST,
0
};
handledMessages = _messages;
@@ -62,6 +63,10 @@ void FriendsHandler::handleMessage(Net::MessageIn &msg)
processRequestAck(msg);
break;
+ case SMSG_FRIENDS_REQUEST:
+ processRequest(msg);
+ break;
+
default:
break;
}
@@ -96,6 +101,14 @@ void FriendsHandler::processRequestAck(Net::MessageIn &msg)
msg.readString(24, "name");
}
+void FriendsHandler::processRequest(Net::MessageIn &msg)
+{
+ UNIMPLIMENTEDPACKET;
+ msg.readInt32("account id");
+ msg.readInt32("char id");
+ msg.readString(24, "name");
+}
+
void FriendsHandler::invite(const std::string &name) const
{
createOutPacket(CMSG_FRIENDS_ADD_PLAYER);
diff --git a/src/net/eathena/friendshandler.h b/src/net/eathena/friendshandler.h
index f0b5ead71..6b14382fc 100644
--- a/src/net/eathena/friendshandler.h
+++ b/src/net/eathena/friendshandler.h
@@ -54,6 +54,8 @@ class FriendsHandler final : public MessageHandler,
static void processFriendsList(Net::MessageIn &msg);
static void processRequestAck(Net::MessageIn &msg);
+
+ static void processRequest(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index d096fd2c8..ddd716451 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, -1, 0, 0, 18, 26, 11, 0, 0, 36, 0, 19, 10, 0, 0, 0,
+ 26, -1, 0, 0, 18, 26, 11, 34, 0, 36, 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 0e0ce50bd..23cd0d230 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -344,6 +344,7 @@
#define SMSG_FRIENDS_PLAYER_ONLINE 0x0206
#define SMSG_FRIENDS_LIST 0x0201
+#define SMSG_FRIENDS_REQUEST 0x0207
#define SMSG_FRIENDS_REQUEST_ACK 0x0209
#define SMSG_AUCTION_OPEN_WINDOW 0x025f