ManaPlus
|
#include <guild.h>
Public Types | |
typedef std::vector< GuildMember * > | MemberList |
Public Member Functions | |
~Guild () | |
void | setName (const std::string &name) |
GuildMember * | addMember (const BeingId accountId, const int charId, const std::string &name) |
GuildMember * | addMember (const std::string &name) |
GuildMember * | getMember (const BeingId id) const |
GuildMember * | getMember (const BeingId accountId, const int charId) const |
GuildMember * | getMemberByCharId (const int charId) const |
GuildMember * | getMember (const std::string &name) const |
const std::string & | getName () const |
int16_t | getId () const |
void | removeMember (const GuildMember *const member) |
void | removeMember (const BeingId id) |
void | removeMember (const std::string &name) |
void | removeFromMembers () |
void | clearMembers () |
int | getNumberOfElements () |
Avatar * | getAvatarAt (const int index) |
bool | getInviteRights () const |
void | setRights (const int16_t rights) |
bool | isMember (const GuildMember *const member) const |
bool | isMember (const BeingId id) const |
bool | isMember (const std::string &name) const |
void | getNames (StringVect &names) const |
void | addPos (const int id, const std::string &name) |
void | sort () |
std::string | getPos (const int id) const |
const PositionsMap & | getPositions () const |
void | setEmblemId (const int id) |
int | getEmblemId () const |
void | setServerGuild (const bool b) |
bool | getServerGuild () const |
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 Guild * | getGuild (const int16_t id) |
static void | clearGuilds () |
Private Types | |
typedef std::map< int, Guild * > | GuildMap |
Private Member Functions | |
Guild (const int16_t id) | |
Private Attributes | |
MemberList | mMembers |
PositionsMap | mPositions |
std::string | mName |
int | mEmblemId |
int16_t | mId |
bool | mCanInviteUsers |
bool | mServerGuild |
Static Private Attributes | |
static GuildMap | guilds |
|
private |
typedef std::vector<GuildMember*> Guild::MemberList |
Guild::~Guild | ( | ) |
Definition at line 107 of file guild.cpp.
References clearMembers().
|
explicitprivate |
Constructor with guild id passed to it.
Definition at line 95 of file guild.cpp.
References guilds.
Referenced by getGuild().
GuildMember * Guild::addMember | ( | const BeingId | accountId, |
const int | charId, | ||
const std::string & | name | ||
) |
Adds member to the list.
Definition at line 112 of file guild.cpp.
References getMember(), and mMembers.
Referenced by EAthena::GuildRecv::processGuildMemberList().
GuildMember * Guild::addMember | ( | const std::string & | name | ) |
Adds member to the list.
Definition at line 127 of file guild.cpp.
References getMember(), and mMembers.
void Guild::addPos | ( | const int | id, |
const std::string & | name | ||
) |
Definition at line 369 of file guild.cpp.
References mPositions.
Referenced by EAthena::GuildRecv::processGuildPosNameList().
|
static |
|
inline |
Definition at line 155 of file guild.h.
References delete_all().
Referenced by EAthena::GuildRecv::processGuildExpulsionContinue(), EAthena::GuildRecv::processGuildLeave(), EAthena::GuildRecv::processGuildLeave2(), EAthena::GuildRecv::processGuildMemberList(), and ~Guild().
|
virtual |
|
inline |
|
static |
Definition at line 374 of file guild.cpp.
References Guild(), guild, and guilds.
Referenced by GuildManager::clear(), GuildManager::createGuild(), EAthena::GuildRecv::processGuildBasicInfo(), EAthena::GuildRecv::processGuildPositionInfo(), TmwAthena::BeingRecv::processPlayerMove(), TmwAthena::BeingRecv::processPlayerUpdate1(), TmwAthena::BeingRecv::processPlayerUpdate2(), GuildManager::reload(), WhoIsOnline::setNeutralColor(), and GuildManager::updateList().
|
inline |
Get the id of the guild.
Definition at line 135 of file guild.h.
References Avatar::mId.
Referenced by SocialGuildTab::action(), EAthena::GuildRecv::processGuildLeave(), EAthena::GuildRecv::processGuildLeave2(), WhoIsOnline::setNeutralColor(), PopupMenu::showChatPopup(), and PopupMenu::showPopup().
|
inline |
GuildMember * Guild::getMember | ( | const BeingId | accountId, |
const int | charId | ||
) | const |
GuildMember * Guild::getMember | ( | const BeingId | id | ) | const |
Find a member by ID.
Definition at line 140 of file guild.cpp.
References mMembers.
Referenced by addMember(), EAthena::GuildRecv::processGuildMemberLogin(), EAthena::GuildRecv::processGuildMemberPosChange(), EAthena::GuildRecv::processGuildUpdateCoords(), WhoIsOnline::setNeutralColor(), PopupMenu::showPlayerPopup(), and PopupMenu::showPopup().
GuildMember * Guild::getMember | ( | const std::string & | name | ) | const |
GuildMember * Guild::getMemberByCharId | ( | const int | charId | ) | const |
Find a member by char ID.
Definition at line 173 of file guild.cpp.
References mMembers.
Referenced by EAthena::GuildRecv::processGuildExpulsion2(), and EAthena::GuildRecv::processGuildLeave2().
|
inline |
|
inline |
Get the name of the guild.
Definition at line 128 of file guild.h.
References Avatar::mName.
Referenced by SocialGuildTab::action(), SocialGuildTab::invite(), SocialGuildTab::leave(), EAthena::GuildRecv::processGuildMemberList(), and EAthena::GuildRecv::processGuildPositionInfo().
void Guild::getNames | ( | StringVect & | names | ) | const |
Definition at line 355 of file guild.cpp.
References mMembers.
Referenced by GuildTab::getAutoCompleteList().
|
inlinevirtual |
std::string Guild::getPos | ( | const int | id | ) | const |
Definition at line 385 of file guild.cpp.
References mPositions.
Referenced by GuildMember::getAdditionString().
|
inline |
|
inline |
Definition at line 206 of file guild.h.
Referenced by PopupMenu::showChatPopup(), PopupMenu::showPlayerPopup(), and PopupMenu::showPopup().
bool Guild::isMember | ( | const BeingId | id | ) | const |
bool Guild::isMember | ( | const GuildMember *const | member | ) | const |
Definition at line 304 of file guild.cpp.
References Avatar::getName(), GuildMember::mGuild, Avatar::mId, and mMembers.
Referenced by WhoIsOnline::setNeutralColor().
bool Guild::isMember | ( | const std::string & | name | ) | const |
void Guild::removeFromMembers | ( | ) |
Definition at line 273 of file guild.cpp.
References actorManager, ActorManager::findBeing(), mId, mMembers, and Being::removeGuild().
Referenced by EAthena::GuildRecv::processGuildExpulsionContinue(), EAthena::GuildRecv::processGuildLeave(), and EAthena::GuildRecv::processGuildLeave2().
void Guild::removeMember | ( | const BeingId | id | ) |
void Guild::removeMember | ( | const GuildMember *const | member | ) |
Removes a member from the guild.
Definition at line 204 of file guild.cpp.
References Avatar::getName(), Avatar::mCharId, Avatar::mId, and mMembers.
Referenced by EAthena::GuildRecv::processGuildExpulsionContinue(), EAthena::GuildRecv::processGuildLeave(), and EAthena::GuildRecv::processGuildLeave2().
void Guild::removeMember | ( | const std::string & | name | ) |
|
inline |
Definition at line 195 of file guild.h.
Referenced by EAthena::GuildRecv::processGuildBasicInfo(), and EAthena::GuildRecv::processGuildPositionInfo().
|
inline |
Set the guild's name.
Definition at line 79 of file guild.h.
References Avatar::mName.
Referenced by EAthena::GuildRecv::processGuildBasicInfo(), and EAthena::GuildRecv::processGuildPositionInfo().
void Guild::setRights | ( | const int16_t | rights | ) |
void Guild::sort | ( | ) |
Definition at line 393 of file guild.cpp.
References guildSorter, and mMembers.
Referenced by EAthena::GuildRecv::processGuildMemberList().
|
staticprivate |
Definition at line 216 of file guild.h.
Referenced by clearGuilds(), getGuild(), and Guild().
|
private |
Definition at line 228 of file guild.h.
Referenced by setRights().
|
private |
Definition at line 227 of file guild.h.
Referenced by removeFromMembers().
|
private |
Definition at line 223 of file guild.h.
Referenced by addMember(), getAvatarAt(), getMember(), getMemberByCharId(), getNames(), isMember(), removeFromMembers(), removeMember(), and sort().
|
private |