diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-10 19:54:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-10 19:54:29 +0300 |
commit | f6b5e4e208c3020957422c7efdf97ac1d878a012 (patch) | |
tree | c07114fa5d8ce5c346bd89989fee0371ee6d40d2 /src | |
parent | 95a33edfcb70ea6bbb8e56717917721152bd07b8 (diff) | |
download | mv-f6b5e4e208c3020957422c7efdf97ac1d878a012.tar.gz mv-f6b5e4e208c3020957422c7efdf97ac1d878a012.tar.bz2 mv-f6b5e4e208c3020957422c7efdf97ac1d878a012.tar.xz mv-f6b5e4e208c3020957422c7efdf97ac1d878a012.zip |
Move processPartyInviteResponse from ea namespace into eathena and tmwa.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/ea/partyhandler.cpp | 29 | ||||
-rw-r--r-- | src/net/ea/partyhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/partyhandler.cpp | 29 | ||||
-rw-r--r-- | src/net/eathena/partyhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/partyhandler.cpp | 29 | ||||
-rw-r--r-- | src/net/tmwa/partyhandler.h | 2 |
6 files changed, 62 insertions, 31 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 4e2fd8e52..c048178f8 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -81,35 +81,6 @@ void PartyHandler::processPartyCreate(Net::MessageIn &msg) const NotifyManager::notify(NotifyTypes::PARTY_CREATED); } -void PartyHandler::processPartyInviteResponse(Net::MessageIn &msg) const -{ - if (!Ea::partyTab) - return; - - const std::string nick = msg.readString(24); - - switch (msg.readUInt8()) - { - case 0: - NotifyManager::notify(NotifyTypes::PARTY_INVITE_ALREADY_MEMBER, - nick); - break; - case 1: - NotifyManager::notify(NotifyTypes::PARTY_INVITE_REFUSED, nick); - break; - case 2: - NotifyManager::notify(NotifyTypes::PARTY_INVITE_DONE, nick); - break; - case 3: - NotifyManager::notify(NotifyTypes::PARTY_INVITE_PARTY_FULL, - nick); - break; - default: - NotifyManager::notify(NotifyTypes::PARTY_INVITE_ERROR, nick); - break; - } -} - void PartyHandler::processPartyInvited(Net::MessageIn &msg) const { const int id = msg.readInt32(); diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index 7cc5c10bf..82db2179b 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -62,8 +62,6 @@ class PartyHandler notfinal : public Net::PartyHandler virtual void processPartyCreate(Net::MessageIn &msg) const; - virtual void processPartyInviteResponse(Net::MessageIn &msg) const; - virtual void processPartyInvited(Net::MessageIn &msg) const; virtual void processPartyMove(Net::MessageIn &msg) const; diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 3828156a5..c53654c57 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -402,4 +402,33 @@ void PartyHandler::processPartyMessage(Net::MessageIn &msg) const } } +void PartyHandler::processPartyInviteResponse(Net::MessageIn &msg) const +{ + if (!Ea::partyTab) + return; + + const std::string nick = msg.readString(24); + + switch (msg.readUInt8()) + { + case 0: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_ALREADY_MEMBER, + nick); + break; + case 1: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_REFUSED, nick); + break; + case 2: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_DONE, nick); + break; + case 3: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_PARTY_FULL, + nick); + break; + default: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_ERROR, nick); + break; + } +} + } // namespace EAthena diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h index 5db8a505e..100656e83 100644 --- a/src/net/eathena/partyhandler.h +++ b/src/net/eathena/partyhandler.h @@ -71,6 +71,8 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void processPartyInfo(Net::MessageIn &msg) const; void processPartyMessage(Net::MessageIn &msg) const; + + void processPartyInviteResponse(Net::MessageIn &msg) const; }; } // namespace EAthena diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 5d7f37046..6791fca3d 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -346,4 +346,33 @@ void PartyHandler::processPartyMessage(Net::MessageIn &msg) const } } +void PartyHandler::processPartyInviteResponse(Net::MessageIn &msg) const +{ + if (!Ea::partyTab) + return; + + const std::string nick = msg.readString(24); + + switch (msg.readUInt8()) + { + case 0: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_ALREADY_MEMBER, + nick); + break; + case 1: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_REFUSED, nick); + break; + case 2: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_DONE, nick); + break; + case 3: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_PARTY_FULL, + nick); + break; + default: + NotifyManager::notify(NotifyTypes::PARTY_INVITE_ERROR, nick); + break; + } +} + } // namespace TmwAthena diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h index 5cba1f08d..f0df03a71 100644 --- a/src/net/tmwa/partyhandler.h +++ b/src/net/tmwa/partyhandler.h @@ -67,6 +67,8 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void processPartyInfo(Net::MessageIn &msg) const; void processPartyMessage(Net::MessageIn &msg) const; + + void processPartyInviteResponse(Net::MessageIn &msg) const; }; } // namespace TmwAthena |