From f6b5e4e208c3020957422c7efdf97ac1d878a012 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 10 Sep 2014 19:54:29 +0300 Subject: Move processPartyInviteResponse from ea namespace into eathena and tmwa. --- src/net/tmwa/partyhandler.cpp | 29 +++++++++++++++++++++++++++++ src/net/tmwa/partyhandler.h | 2 ++ 2 files changed, 31 insertions(+) (limited to 'src/net/tmwa') 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 -- cgit v1.2.3-70-g09d2