summaryrefslogtreecommitdiff
path: root/src
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
parentafae3b08b51c527fb7d52027baacebabf2355c12 (diff)
downloadplus-90db2a6cd38c21648f6de6bdfad1e04654ff61da.tar.gz
plus-90db2a6cd38c21648f6de6bdfad1e04654ff61da.tar.bz2
plus-90db2a6cd38c21648f6de6bdfad1e04654ff61da.tar.xz
plus-90db2a6cd38c21648f6de6bdfad1e04654ff61da.zip
eathena: add packet CMSG_FRIENDS_ADD_PLAYER 0x023b.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/friendshandler.cpp7
-rw-r--r--src/net/eathena/friendshandler.h2
-rw-r--r--src/net/eathena/protocol.h2
-rw-r--r--src/net/friendshandler.h2
-rw-r--r--src/net/tmwa/friendshandler.cpp4
-rw-r--r--src/net/tmwa/friendshandler.h2
6 files changed, 19 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
diff --git a/src/net/friendshandler.h b/src/net/friendshandler.h
index 1599c9e6b..5cebc177b 100644
--- a/src/net/friendshandler.h
+++ b/src/net/friendshandler.h
@@ -31,6 +31,8 @@ namespace Net
class FriendsHandler notfinal
{
public:
+ virtual void invite(const std::string &name) const = 0;
+
virtual ~FriendsHandler()
{ }
};
diff --git a/src/net/tmwa/friendshandler.cpp b/src/net/tmwa/friendshandler.cpp
index 00a243a63..6b6558e7e 100644
--- a/src/net/tmwa/friendshandler.cpp
+++ b/src/net/tmwa/friendshandler.cpp
@@ -47,4 +47,8 @@ void FriendsHandler::handleMessage(Net::MessageIn &msg)
}
}
+void FriendsHandler::invite(const std::string &name A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/friendshandler.h b/src/net/tmwa/friendshandler.h
index 00081602a..e8003161a 100644
--- a/src/net/tmwa/friendshandler.h
+++ b/src/net/tmwa/friendshandler.h
@@ -36,6 +36,8 @@ class FriendsHandler final : public MessageHandler,
A_DELETE_COPY(FriendsHandler)
void handleMessage(Net::MessageIn &msg) override final;
+
+ void invite(const std::string &name) const override final;
};
} // namespace TmwAthena