summaryrefslogtreecommitdiff
path: root/src/net/eathena/friendshandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena/friendshandler.cpp')
-rw-r--r--src/net/eathena/friendshandler.cpp55
1 files changed, 6 insertions, 49 deletions
diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp
index 43634d9fc..a2e01bc79 100644
--- a/src/net/eathena/friendshandler.cpp
+++ b/src/net/eathena/friendshandler.cpp
@@ -22,6 +22,7 @@
#include "logger.h"
+#include "net/eathena/friendsrecv.h"
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
@@ -53,23 +54,23 @@ void FriendsHandler::handleMessage(Net::MessageIn &msg)
switch (msg.getId())
{
case SMSG_FRIENDS_PLAYER_ONLINE:
- processPlayerOnline(msg);
+ FriendsRecv::processPlayerOnline(msg);
break;
case SMSG_FRIENDS_LIST:
- processFriendsList(msg);
+ FriendsRecv::processFriendsList(msg);
break;
case SMSG_FRIENDS_REQUEST_ACK:
- processRequestAck(msg);
+ FriendsRecv::processRequestAck(msg);
break;
case SMSG_FRIENDS_REQUEST:
- processRequest(msg);
+ FriendsRecv::processRequest(msg);
break;
case SMSG_FRIENDS_DELETE_PLAYER:
- processDeletePlayer(msg);
+ FriendsRecv::processDeletePlayer(msg);
break;
default:
@@ -77,43 +78,6 @@ void FriendsHandler::handleMessage(Net::MessageIn &msg)
}
}
-void FriendsHandler::processPlayerOnline(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readBeingId("account id");
- msg.readInt32("char id");
- msg.readUInt8("flag"); // 0 - online, 1 - offline
-}
-
-void FriendsHandler::processFriendsList(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- const int count = (msg.readInt16("size") - 4) / 32;
- for (int f = 0; f < count; f ++)
- {
- msg.readBeingId("account id");
- msg.readInt32("char id");
- msg.readString(24, "name");
- }
-}
-
-void FriendsHandler::processRequestAck(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readInt16("type");
- msg.readBeingId("account id");
- msg.readInt32("char id");
- msg.readString(24, "name");
-}
-
-void FriendsHandler::processRequest(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readBeingId("account id");
- msg.readInt32("char id");
- msg.readString(24, "name");
-}
-
void FriendsHandler::invite(const std::string &name) const
{
createOutPacket(CMSG_FRIENDS_ADD_PLAYER);
@@ -137,11 +101,4 @@ void FriendsHandler::remove(const int accountId, const int charId) const
outMsg.writeInt32(charId, "char id");
}
-void FriendsHandler::processDeletePlayer(Net::MessageIn &msg)
-{
- UNIMPLIMENTEDPACKET;
- msg.readBeingId("account id");
- msg.readInt32("char id");
-}
-
} // namespace EAthena