summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-14 01:42:11 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-14 01:42:11 +0300
commit90db2a6cd38c21648f6de6bdfad1e04654ff61da (patch)
tree6324cb5cd4320bc16baeeae28ccac2b454bd5a3c /src/net/eathena
parentafae3b08b51c527fb7d52027baacebabf2355c12 (diff)
downloadmanaplus-90db2a6cd38c21648f6de6bdfad1e04654ff61da.tar.gz
manaplus-90db2a6cd38c21648f6de6bdfad1e04654ff61da.tar.bz2
manaplus-90db2a6cd38c21648f6de6bdfad1e04654ff61da.tar.xz
manaplus-90db2a6cd38c21648f6de6bdfad1e04654ff61da.zip
eathena: add packet CMSG_FRIENDS_ADD_PLAYER 0x023b.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/friendshandler.cpp7
-rw-r--r--src/net/eathena/friendshandler.h2
-rw-r--r--src/net/eathena/protocol.h2
3 files changed, 11 insertions, 0 deletions
diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp
index 4914a9a1c..6a42f7aa4 100644
--- a/src/net/eathena/friendshandler.cpp
+++ b/src/net/eathena/friendshandler.cpp
@@ -20,6 +20,7 @@
#include "net/eathena/friendshandler.h"
+#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
#include "debug.h"
@@ -90,4 +91,10 @@ void FriendsHandler::processRequestAck(Net::MessageIn &msg)
msg.readString(24, "name");
}
+void FriendsHandler::invite(const std::string &name) const
+{
+ createOutPacket(CMSG_FRIENDS_ADD_PLAYER);
+ outMsg.writeString(name, 24, "name");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/friendshandler.h b/src/net/eathena/friendshandler.h
index 8071bccf1..f3e9df91f 100644
--- a/src/net/eathena/friendshandler.h
+++ b/src/net/eathena/friendshandler.h
@@ -37,6 +37,8 @@ class FriendsHandler final : public MessageHandler,
void handleMessage(Net::MessageIn &msg) override final;
+ void invite(const std::string &name) const override final;
+
protected:
void processPlayerOnline(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 9854f4ce7..c4f21b320 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -479,4 +479,6 @@
#define SMSG_MERCENARY_ACTION 0x029f
+#define CMSG_FRIENDS_ADD_PLAYER 0x023b
+
#endif // NET_EATHENA_PROTOCOL_H