summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-14 01:52:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-14 01:52:32 +0300
commit633ec96c9a4403eeacdd91fdb5302f8989933265 (patch)
tree42ebebd0924fcb0c80b356c3eb2c439d9685f64d /src
parent90db2a6cd38c21648f6de6bdfad1e04654ff61da (diff)
downloadplus-633ec96c9a4403eeacdd91fdb5302f8989933265.tar.gz
plus-633ec96c9a4403eeacdd91fdb5302f8989933265.tar.bz2
plus-633ec96c9a4403eeacdd91fdb5302f8989933265.tar.xz
plus-633ec96c9a4403eeacdd91fdb5302f8989933265.zip
eathena: add packet CMSG_FRIENDS_REQUEST_ACK 0x0208.
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/friendshandler.cpp10
-rw-r--r--src/net/eathena/friendshandler.h4
-rw-r--r--src/net/eathena/protocol.h1
-rw-r--r--src/net/friendshandler.h4
-rw-r--r--src/net/tmwa/friendshandler.cpp6
-rw-r--r--src/net/tmwa/friendshandler.h4
6 files changed, 29 insertions, 0 deletions
diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp
index 6a42f7aa4..fbb505e47 100644
--- a/src/net/eathena/friendshandler.cpp
+++ b/src/net/eathena/friendshandler.cpp
@@ -97,4 +97,14 @@ void FriendsHandler::invite(const std::string &name) const
outMsg.writeString(name, 24, "name");
}
+void FriendsHandler::inviteResponse(const int accountId,
+ const int charId,
+ const bool accept) const
+{
+ createOutPacket(CMSG_FRIENDS_REQUEST_ACK);
+ outMsg.writeInt32(accountId, "account id");
+ outMsg.writeInt32(charId, "char id");
+ outMsg.writeInt32(accept ? 1 : 0, "result");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/friendshandler.h b/src/net/eathena/friendshandler.h
index f3e9df91f..c0bdd5dc7 100644
--- a/src/net/eathena/friendshandler.h
+++ b/src/net/eathena/friendshandler.h
@@ -39,6 +39,10 @@ class FriendsHandler final : public MessageHandler,
void invite(const std::string &name) const override final;
+ void inviteResponse(const int accountId,
+ const int charId,
+ const bool accept) const override final;
+
protected:
void processPlayerOnline(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index c4f21b320..b7b86c612 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -480,5 +480,6 @@
#define SMSG_MERCENARY_ACTION 0x029f
#define CMSG_FRIENDS_ADD_PLAYER 0x023b
+#define CMSG_FRIENDS_REQUEST_ACK 0x0208
#endif // NET_EATHENA_PROTOCOL_H
diff --git a/src/net/friendshandler.h b/src/net/friendshandler.h
index 5cebc177b..9e36578e0 100644
--- a/src/net/friendshandler.h
+++ b/src/net/friendshandler.h
@@ -33,6 +33,10 @@ class FriendsHandler notfinal
public:
virtual void invite(const std::string &name) const = 0;
+ virtual void inviteResponse(const int accountId,
+ const int charId,
+ const bool accept) const = 0;
+
virtual ~FriendsHandler()
{ }
};
diff --git a/src/net/tmwa/friendshandler.cpp b/src/net/tmwa/friendshandler.cpp
index 6b6558e7e..eb4d01845 100644
--- a/src/net/tmwa/friendshandler.cpp
+++ b/src/net/tmwa/friendshandler.cpp
@@ -51,4 +51,10 @@ void FriendsHandler::invite(const std::string &name A_UNUSED) const
{
}
+void FriendsHandler::inviteResponse(const int accountId A_UNUSED,
+ const int charId A_UNUSED,
+ const bool accept A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/friendshandler.h b/src/net/tmwa/friendshandler.h
index e8003161a..96cd4db91 100644
--- a/src/net/tmwa/friendshandler.h
+++ b/src/net/tmwa/friendshandler.h
@@ -38,6 +38,10 @@ class FriendsHandler final : public MessageHandler,
void handleMessage(Net::MessageIn &msg) override final;
void invite(const std::string &name) const override final;
+
+ void inviteResponse(const int accountId,
+ const int charId,
+ const bool accept) const override final;
};
} // namespace TmwAthena