summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-10 19:54:29 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-10 19:54:29 +0300
commitf6b5e4e208c3020957422c7efdf97ac1d878a012 (patch)
treec07114fa5d8ce5c346bd89989fee0371ee6d40d2 /src/net/eathena
parent95a33edfcb70ea6bbb8e56717917721152bd07b8 (diff)
downloadmanaplus-f6b5e4e208c3020957422c7efdf97ac1d878a012.tar.gz
manaplus-f6b5e4e208c3020957422c7efdf97ac1d878a012.tar.bz2
manaplus-f6b5e4e208c3020957422c7efdf97ac1d878a012.tar.xz
manaplus-f6b5e4e208c3020957422c7efdf97ac1d878a012.zip
Move processPartyInviteResponse from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/partyhandler.cpp29
-rw-r--r--src/net/eathena/partyhandler.h2
2 files changed, 31 insertions, 0 deletions
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