From 470f883b5701b74ae956f02f1b91ac7e584776b2 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Tue, 14 Oct 2014 12:39:55 +0300
Subject: eathena: add packet CMSG_FRIENDS_DELETE_PLAYER 0x020a.

---
 src/net/eathena/friendshandler.cpp | 7 +++++++
 src/net/eathena/friendshandler.h   | 3 +++
 src/net/eathena/protocol.h         | 1 +
 src/net/friendshandler.h           | 2 ++
 src/net/tmwa/friendshandler.cpp    | 5 +++++
 src/net/tmwa/friendshandler.h      | 3 +++
 6 files changed, 21 insertions(+)

diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp
index fbb505e47..783ad1109 100644
--- a/src/net/eathena/friendshandler.cpp
+++ b/src/net/eathena/friendshandler.cpp
@@ -107,4 +107,11 @@ void FriendsHandler::inviteResponse(const int accountId,
     outMsg.writeInt32(accept ? 1 : 0, "result");
 }
 
+void FriendsHandler::remove(const int accountId, const int charId) const
+{
+    createOutPacket(CMSG_FRIENDS_DELETE_PLAYER);
+    outMsg.writeInt32(accountId, "account id");
+    outMsg.writeInt32(charId, "char id");
+}
+
 }  // namespace EAthena
diff --git a/src/net/eathena/friendshandler.h b/src/net/eathena/friendshandler.h
index c0bdd5dc7..3b6dd4e45 100644
--- a/src/net/eathena/friendshandler.h
+++ b/src/net/eathena/friendshandler.h
@@ -43,6 +43,9 @@ class FriendsHandler final : public MessageHandler,
                             const int charId,
                             const bool accept) const override final;
 
+        void remove(const int accountId,
+                    const int charId) const override final;
+
     protected:
         void processPlayerOnline(Net::MessageIn &msg);
 
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index b7b86c612..c2a6dfbfc 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -481,5 +481,6 @@
 
 #define CMSG_FRIENDS_ADD_PLAYER      0x023b
 #define CMSG_FRIENDS_REQUEST_ACK     0x0208
+#define CMSG_FRIENDS_DELETE_PLAYER   0x020a
 
 #endif  // NET_EATHENA_PROTOCOL_H
diff --git a/src/net/friendshandler.h b/src/net/friendshandler.h
index 9e36578e0..3644169ea 100644
--- a/src/net/friendshandler.h
+++ b/src/net/friendshandler.h
@@ -37,6 +37,8 @@ class FriendsHandler notfinal
                                     const int charId,
                                     const bool accept) const = 0;
 
+        virtual void remove(const int accountId, const int charId) const = 0;
+
         virtual ~FriendsHandler()
         { }
 };
diff --git a/src/net/tmwa/friendshandler.cpp b/src/net/tmwa/friendshandler.cpp
index eb4d01845..5361a9f22 100644
--- a/src/net/tmwa/friendshandler.cpp
+++ b/src/net/tmwa/friendshandler.cpp
@@ -57,4 +57,9 @@ void FriendsHandler::inviteResponse(const int accountId A_UNUSED,
 {
 }
 
+void FriendsHandler::remove(const int accountId A_UNUSED,
+                            const int charId A_UNUSED) const
+{
+}
+
 }  // namespace TmwAthena
diff --git a/src/net/tmwa/friendshandler.h b/src/net/tmwa/friendshandler.h
index 96cd4db91..232c8153a 100644
--- a/src/net/tmwa/friendshandler.h
+++ b/src/net/tmwa/friendshandler.h
@@ -42,6 +42,9 @@ class FriendsHandler final : public MessageHandler,
         void inviteResponse(const int accountId,
                             const int charId,
                             const bool accept) const override final;
+
+        void remove(const int accountId,
+                    const int charId) const override final;
 };
 
 }  // namespace TmwAthena
-- 
cgit v1.2.3-70-g09d2