summaryrefslogtreecommitdiff
path: root/src/net/eathena/friendshandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-26 15:02:51 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-26 15:02:51 +0300
commit6fd6deb1ba87ddf74bff15055421f2b434b96f85 (patch)
treecbcfc33f0bfac42d3ce8d9721d8a250e17675966 /src/net/eathena/friendshandler.cpp
parent9eea292d5035c8a592ba8b69b1a1c3f78cd08406 (diff)
downloadplus-6fd6deb1ba87ddf74bff15055421f2b434b96f85.tar.gz
plus-6fd6deb1ba87ddf74bff15055421f2b434b96f85.tar.bz2
plus-6fd6deb1ba87ddf74bff15055421f2b434b96f85.tar.xz
plus-6fd6deb1ba87ddf74bff15055421f2b434b96f85.zip
Move receive code from friendshandler into separate file.
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