diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/friendshandler.cpp | 7 | ||||
-rw-r--r-- | src/net/eathena/friendshandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 |
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 |