summaryrefslogtreecommitdiff
path: root/src/net/eathena/friendshandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-02 20:58:41 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-02 20:58:41 +0300
commit84d2bab38202cd52b5eb0a37c12204ab6f607915 (patch)
tree2f3951b2f4f3b75f190eb2539979cc4afbace27c /src/net/eathena/friendshandler.cpp
parent40730c4fa73d403cf7284a76d9b26f7ec662afa4 (diff)
downloadmanaplus-84d2bab38202cd52b5eb0a37c12204ab6f607915.tar.gz
manaplus-84d2bab38202cd52b5eb0a37c12204ab6f607915.tar.bz2
manaplus-84d2bab38202cd52b5eb0a37c12204ab6f607915.tar.xz
manaplus-84d2bab38202cd52b5eb0a37c12204ab6f607915.zip
Remove MessageHandler class
Diffstat (limited to 'src/net/eathena/friendshandler.cpp')
-rw-r--r--src/net/eathena/friendshandler.cpp42
1 files changed, 1 insertions, 41 deletions
diff --git a/src/net/eathena/friendshandler.cpp b/src/net/eathena/friendshandler.cpp
index 8d07aa94d..844c292f1 100644
--- a/src/net/eathena/friendshandler.cpp
+++ b/src/net/eathena/friendshandler.cpp
@@ -31,51 +31,11 @@ extern Net::FriendsHandler *friendsHandler;
namespace EAthena
{
-FriendsHandler::FriendsHandler() :
- MessageHandler()
+FriendsHandler::FriendsHandler()
{
- static const uint16_t _messages[] =
- {
- SMSG_FRIENDS_PLAYER_ONLINE,
- SMSG_FRIENDS_LIST,
- SMSG_FRIENDS_REQUEST_ACK,
- SMSG_FRIENDS_REQUEST,
- SMSG_FRIENDS_DELETE_PLAYER,
- 0
- };
- handledMessages = _messages;
friendsHandler = this;
}
-void FriendsHandler::handleMessage(Net::MessageIn &msg)
-{
- switch (msg.getId())
- {
- case SMSG_FRIENDS_PLAYER_ONLINE:
- FriendsRecv::processPlayerOnline(msg);
- break;
-
- case SMSG_FRIENDS_LIST:
- FriendsRecv::processFriendsList(msg);
- break;
-
- case SMSG_FRIENDS_REQUEST_ACK:
- FriendsRecv::processRequestAck(msg);
- break;
-
- case SMSG_FRIENDS_REQUEST:
- FriendsRecv::processRequest(msg);
- break;
-
- case SMSG_FRIENDS_DELETE_PLAYER:
- FriendsRecv::processDeletePlayer(msg);
- break;
-
- default:
- break;
- }
-}
-
void FriendsHandler::invite(const std::string &name) const
{
createOutPacket(CMSG_FRIENDS_ADD_PLAYER);