summaryrefslogtreecommitdiff
path: root/src/net/ea/partyhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/partyhandler.cpp')
-rw-r--r--src/net/ea/partyhandler.cpp104
1 files changed, 0 insertions, 104 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 7e2be5a95..5c5aaf80b 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -81,110 +81,6 @@ void PartyHandler::processPartyCreate(Net::MessageIn &msg) const
NotifyManager::notify(NotifyTypes::PARTY_CREATED);
}
-void PartyHandler::processPartyInfo(Net::MessageIn &msg) const
-{
- bool isOldParty = false;
- std::set<std::string> names;
- std::set<std::string> onlineNames;
- if (!Ea::taParty)
- {
- logger->log1("error: party empty in SMSG_PARTY_INFO");
- Ea::taParty = Party::getParty(1);
- }
- if (Ea::taParty)
- {
- if (Ea::taParty->getNumberOfElements() > 1)
- {
- isOldParty = true;
- Ea::taParty->getNamesSet(names);
- const Party::MemberList *const members = Ea::taParty->getMembers();
- FOR_EACHP (Party::MemberList::const_iterator, it, members)
- {
- if ((*it)->getOnline())
- onlineNames.insert((*it)->getName());
- }
- if (localPlayer)
- onlineNames.insert(localPlayer->getName());
- }
- }
-
- if (!localPlayer)
- logger->log1("error: localPlayer==0 in SMSG_PARTY_INFO");
-
- if (Ea::taParty)
- Ea::taParty->clearMembers();
-
- const int length = msg.readInt16();
- if (Ea::taParty)
- Ea::taParty->setName(msg.readString(24));
-
- const int count = (length - 28) / 46;
- if (localPlayer && Ea::taParty)
- {
- localPlayer->setParty(Ea::taParty);
- localPlayer->setPartyName(Ea::taParty->getName());
- }
-
- for (int i = 0; i < count; i++)
- {
- const int id = msg.readInt32();
- std::string nick = msg.readString(24);
- std::string map = msg.readString(16);
- const bool leader = msg.readUInt8() == 0U;
- const bool online = msg.readUInt8() == 0U;
-
- if (Ea::taParty)
- {
- bool joined(false);
-
- if (isOldParty)
- {
- if (names.find(nick) == names.end())
- {
- NotifyManager::notify(NotifyTypes::PARTY_USER_JOINED,
- nick);
- joined = true;
- }
- }
- PartyMember *const member = Ea::taParty->addMember(id, nick);
- if (member)
- {
- if (!joined && Ea::partyTab)
- {
- if (!names.empty() && ((onlineNames.find(nick)
- == onlineNames.end() && online)
- || (onlineNames.find(nick) != onlineNames.end()
- && !online)))
- {
- Ea::partyTab->showOnline(nick, online);
- }
-
- member->setLeader(leader);
- member->setOnline(online);
- member->setMap(map);
- }
- else
- {
- member->setLeader(leader);
- member->setOnline(online);
- member->setMap(map);
- }
- }
- }
- }
-
- if (Ea::taParty)
- Ea::taParty->sort();
-
- if (localPlayer && Ea::taParty)
- {
- localPlayer->setParty(Ea::taParty);
- localPlayer->setPartyName(Ea::taParty->getName());
- if (socialWindow)
- socialWindow->updateParty();
- }
-}
-
void PartyHandler::processPartyInviteResponse(Net::MessageIn &msg) const
{
if (!Ea::partyTab)