ManaPlus
|
#include <party.h>
Public Types | |
typedef std::vector< PartyMember * > | MemberList |
Public Member Functions | |
void | setName (const std::string &name) |
PartyMember * | addMember (const BeingId id, const std::string &name) |
PartyMember * | getMember (const BeingId id) const |
PartyMember * | getMember (const std::string &name) const |
const std::string & | getName () const |
int16_t | getId () const |
void | removeMember (const PartyMember *const member) |
void | removeMember (const BeingId id) |
void | removeMember (const std::string &name) |
void | clearMembers () |
void | removeFromMembers () |
int | getNumberOfElements () |
Avatar * | getAvatarAt (const int index) |
bool | getInviteRights () const |
void | setRights (const int16_t rights) |
bool | isMember (const PartyMember *const member) const |
bool | isMember (const BeingId id) const |
bool | isMember (const std::string &name) const |
void | getNames (StringVect &names) const |
void | getNamesSet (std::set< std::string > &names) const |
void | sort () |
const MemberList * | getMembers () const |
Public Member Functions inherited from AvatarListModel | |
AvatarListModel () | |
std::string | getElementAt (int i) |
Public Member Functions inherited from ListModel | |
ListModel () | |
virtual | ~ListModel () |
Static Public Member Functions | |
static Party * | getParty (const int16_t id) |
static void | clearParties () |
Private Types | |
typedef std::map< int, Party * > | PartyMap |
Private Member Functions | |
Party (const int16_t id) | |
~Party () | |
Private Attributes | |
MemberList | mMembers |
std::string | mName |
int16_t | mId |
bool | mCanInviteUsers |
Static Private Attributes | |
static PartyMap | parties |
typedef std::vector<PartyMember*> Party::MemberList |
|
private |
|
explicitprivate |
Constructor with party id passed to it.
Definition at line 71 of file party.cpp.
References parties.
Referenced by getParty().
|
private |
Definition at line 80 of file party.cpp.
References clearMembers().
PartyMember * Party::addMember | ( | const BeingId | id, |
const std::string & | name | ||
) |
Adds member to the list.
Definition at line 85 of file party.cpp.
References getMember(), and mMembers.
Referenced by EAthena::PartyRecv::processPartyInfo(), TmwAthena::PartyRecv::processPartyInfo(), and EAthena::PartyRecv::processPartyMemberInfo().
|
inline |
Definition at line 122 of file party.h.
References delete_all(), and mMembers.
Referenced by EAthena::PartyRecv::processPartyInfo(), TmwAthena::PartyRecv::processPartyInfo(), Ea::PartyRecv::processPartyLeave(), and ~Party().
|
static |
|
virtual |
|
inline |
|
inline |
Get whether user can invite users to this party.
Definition at line 140 of file party.h.
References mCanInviteUsers.
PartyMember * Party::getMember | ( | const BeingId | id | ) | const |
Find a member by ID.
Definition at line 99 of file party.cpp.
References mMembers.
Referenced by addMember(), EAthena::PartyHandler::kick(), TmwAthena::PartyHandler::kick(), EAthena::PartyRecv::processPartyLeader(), EAthena::PartyRecv::processPartyMemberDead(), EAthena::PartyRecv::processPartyMemberJobLevel(), EAthena::PartyRecv::processPartyMessage(), TmwAthena::PartyRecv::processPartyMessage(), TmwAthena::PartyRecv::processPartyMove(), Ea::PartyRecv::processPartyUpdateCoords(), TmwAthena::PartyRecv::processPartyUpdateHp(), EAthena::PlayerRecv::processPlayerHeal(), EAthena::PlayerHandler::setStat(), TmwAthena::PlayerHandler::setStat(), and SocialPlayersTab::updateAvatar().
PartyMember * Party::getMember | ( | const std::string & | name | ) | const |
|
inline |
Definition at line 159 of file party.h.
References mMembers.
Referenced by EAthena::PartyRecv::processPartyInfo(), and TmwAthena::PartyRecv::processPartyInfo().
|
inline |
Get the name of the party.
Definition at line 97 of file party.h.
References mName.
Referenced by SocialPartyTab::action(), PopupMenu::addPartyName(), SocialPartyTab::invite(), and SocialPartyTab::leave().
void Party::getNames | ( | StringVect & | names | ) | const |
Definition at line 285 of file party.cpp.
References Avatar::getName(), and mMembers.
Referenced by PartyTab::getAutoCompleteList().
void Party::getNamesSet | ( | std::set< std::string > & | names | ) | const |
Definition at line 299 of file party.cpp.
References Avatar::getName(), and mMembers.
Referenced by EAthena::PartyRecv::processPartyInfo(), and TmwAthena::PartyRecv::processPartyInfo().
|
inlinevirtual |
|
static |
Definition at line 313 of file party.cpp.
References parties, party, and Party().
Referenced by LocalPlayer::nextTile(), Ea::PartyHandler::PartyHandler(), EAthena::PartyRecv::processPartyInfo(), TmwAthena::PartyRecv::processPartyInfo(), EAthena::PlayerRecv::processPlayerHeal(), Ea::PartyHandler::reload(), EAthena::PlayerHandler::setStat(), TmwAthena::PlayerHandler::setStat(), and SocialPlayersTab::updateAvatar().
bool Party::isMember | ( | const BeingId | id | ) | const |
bool Party::isMember | ( | const PartyMember *const | member | ) | const |
Definition at line 230 of file party.cpp.
References Avatar::getName(), Avatar::mId, mMembers, and PartyMember::mParty.
bool Party::isMember | ( | const std::string & | name | ) | const |
void Party::removeFromMembers | ( | ) |
Definition at line 201 of file party.cpp.
References actorManager, ActorManager::findBeing(), mMembers, and Being::setParty().
Referenced by Ea::PartyRecv::processPartyLeave().
void Party::removeMember | ( | const BeingId | id | ) |
Removes a member from the party.
Definition at line 155 of file party.cpp.
References Avatar::mId, and mMembers.
void Party::removeMember | ( | const PartyMember *const | member | ) |
Removes a member from the party.
Definition at line 128 of file party.cpp.
References Avatar::getName(), Avatar::mId, and mMembers.
Referenced by Ea::PartyRecv::processPartyLeave(), and Being::setParty().
void Party::removeMember | ( | const std::string & | name | ) |
Removes a member from the party.
Definition at line 178 of file party.cpp.
References Avatar::getName(), and mMembers.
|
inline |
Set the party's name.
Definition at line 70 of file party.h.
References mName.
Referenced by EAthena::PartyRecv::processPartyInfo(), and TmwAthena::PartyRecv::processPartyInfo().
void Party::setRights | ( | const int16_t | rights | ) |
void Party::sort | ( | ) |
Definition at line 323 of file party.cpp.
References mMembers, and partySorter.
Referenced by EAthena::PartyRecv::processPartyInfo(), and TmwAthena::PartyRecv::processPartyInfo().
|
private |
Definition at line 180 of file party.h.
Referenced by getInviteRights(), and setRights().
|
private |
Definition at line 177 of file party.h.
Referenced by addMember(), clearMembers(), getAvatarAt(), getMember(), getMembers(), getNames(), getNamesSet(), getNumberOfElements(), isMember(), removeFromMembers(), removeMember(), and sort().
|
private |
|
staticprivate |
Definition at line 168 of file party.h.
Referenced by clearParties(), getParty(), and Party().