summaryrefslogtreecommitdiff
path: root/src/net/tmwa/partyhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-13 23:35:11 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-13 23:35:11 +0300
commit8438ad4513e9aa2af4b42317aa05358e36f06e98 (patch)
tree28d3a4a29fb6e2404a24c8b467dc23430b386f66 /src/net/tmwa/partyhandler.cpp
parent338fdcc49fbe3254946cbc37478cedd0f160d312 (diff)
downloadmanaplus-8438ad4513e9aa2af4b42317aa05358e36f06e98.tar.gz
manaplus-8438ad4513e9aa2af4b42317aa05358e36f06e98.tar.bz2
manaplus-8438ad4513e9aa2af4b42317aa05358e36f06e98.tar.xz
manaplus-8438ad4513e9aa2af4b42317aa05358e36f06e98.zip
Move processPartyInvited from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/tmwa/partyhandler.cpp')
-rw-r--r--src/net/tmwa/partyhandler.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index 7cf5cef3e..5762503c7 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -383,4 +383,24 @@ void PartyHandler::allowInvite(const bool allow A_UNUSED) const
{
}
+void PartyHandler::processPartyInvited(Net::MessageIn &msg)
+{
+ const int id = msg.readInt32("account id");
+ const std::string partyName = msg.readString(24, "party name");
+ std::string nick;
+
+ if (actorManager)
+ {
+ const Being *const being = actorManager->findBeing(id);
+ if (being)
+ {
+ if (being->getType() == ActorType::Player)
+ nick = being->getName();
+ }
+ }
+
+ if (socialWindow)
+ socialWindow->showPartyInvite(partyName, nick);
+}
+
} // namespace TmwAthena