void PartyHandler::processPartyLeave(Net::MessageIn &msg) { int id = msg.readInt32(); std::string nick = msg.readString(24); msg.readInt8(); // fail if (!player_node) return; if (id == player_node->getId()) { if (Ea::taParty) { Ea::taParty->removeFromMembers(); Ea::taParty->clearMembers(); } SERVER_NOTICE(_("You have left the party.")) delete Ea::partyTab; Ea::partyTab = nullptr; if (socialWindow && Ea::taParty) socialWindow->removeTab(Ea::taParty); player_node->setPartyName(""); } else { if (Ea::partyTab) { Ea::partyTab->chatLog(strprintf( _("%s has left your party."), nick.c_str()), BY_SERVER); } if (actorSpriteManager) { Being *b = actorSpriteManager->findBeing(id); if (b && b->getType() == Being::PLAYER) { b->setParty(nullptr); b->setPartyName(""); } } if (Ea::taParty) Ea::taParty->removeMember(id); } }