From 8438ad4513e9aa2af4b42317aa05358e36f06e98 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 13 Dec 2014 23:35:11 +0300 Subject: Move processPartyInvited from ea namespace into eathena and tmwa. --- src/net/eathena/partyhandler.cpp | 20 ++++++++++++++++++++ src/net/eathena/partyhandler.h | 2 ++ 2 files changed, 22 insertions(+) (limited to 'src/net/eathena') diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 1751140a5..452cf1408 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -497,4 +497,24 @@ void PartyHandler::processPartyLeader(Net::MessageIn &msg) newMember->setLeader(true); } +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 EAthena diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h index c4bab0f47..f389bcb42 100644 --- a/src/net/eathena/partyhandler.h +++ b/src/net/eathena/partyhandler.h @@ -81,6 +81,8 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler static void processPartyItemPickup(Net::MessageIn &msg); static void processPartyLeader(Net::MessageIn &msg); + + static void processPartyInvited(Net::MessageIn &msg); }; } // namespace EAthena -- cgit v1.2.3-70-g09d2