42 if ((m1 ==
nullptr) || (m2 ==
nullptr))
45 if (m1->getOnline() != m2->getOnline())
47 return static_cast<int>(m1->getOnline()) >=
48 static_cast<int>(m2->getOnline());
51 if (m1->getPos() != m2->getPos())
52 return m1->getPos() >= m2->getPos();
54 if (m1->getName() != m2->getName())
56 std::string s1 = m1->getName();
57 std::string s2 = m2->getName();
69 const std::string &name) :
101 mCanInviteUsers(false),
114 const std::string &name)
120 m =
new GuildMember(
this, accountId, charId, name);
142 MemberList::const_iterator itr =
mMembers.begin();
143 const MemberList::const_iterator itr_end =
mMembers.end();
144 while (itr != itr_end)
146 if (((*itr) !=
nullptr) && (*itr)->mId ==
id)
155 const int charId)
const
157 MemberList::const_iterator itr =
mMembers.begin();
158 const MemberList::const_iterator itr_end =
mMembers.end();
159 while (itr != itr_end)
161 if ((*itr) !=
nullptr &&
162 (*itr)->mId == accountId &&
163 (*itr)->mCharId == charId)
175 MemberList::const_iterator itr =
mMembers.begin();
176 const MemberList::const_iterator itr_end =
mMembers.end();
177 while (itr != itr_end)
179 if ((*itr) !=
nullptr &&
180 (*itr)->mCharId == charId)
192 MemberList::const_iterator itr =
mMembers.begin();
193 const MemberList::const_iterator itr_end =
mMembers.end();
194 while (itr != itr_end)
196 if (((*itr) !=
nullptr) && (*itr)->getName() == name)
206 if (member ==
nullptr)
208 MemberList::iterator itr =
mMembers.begin();
209 const MemberList::iterator itr_end =
mMembers.end();
210 while (itr != itr_end)
214 if ((*itr)->mId == member->
mId &&
215 (*itr)->mCharId == member->
mCharId &&
216 (*itr)->getName() == member->
getName())
233 MemberList::iterator itr =
mMembers.begin();
234 const MemberList::iterator itr_end =
mMembers.end();
235 while (itr != itr_end)
237 if (((*itr) !=
nullptr) && (*itr)->mId ==
id)
256 MemberList::iterator itr =
mMembers.begin();
257 const MemberList::iterator itr_end =
mMembers.end();
258 while (itr != itr_end)
260 if (((*itr) !=
nullptr) && (*itr)->getName() == name)
278 MemberList::const_iterator itr =
mMembers.begin();
279 const MemberList::const_iterator itr_end =
mMembers.end();
280 while (itr != itr_end)
306 if (member ==
nullptr)
309 if ((member->
mGuild !=
nullptr) && member->
mGuild !=
this)
312 MemberList::const_iterator itr =
mMembers.begin();
313 const MemberList::const_iterator itr_end =
mMembers.end();
314 while (itr != itr_end)
316 if (((*itr) !=
nullptr) && (*itr)->mId == member->
mId &&
317 (*itr)->getName() == member->
getName())
329 MemberList::const_iterator itr =
mMembers.begin();
330 const MemberList::const_iterator itr_end =
mMembers.end();
331 while (itr != itr_end)
333 if (((*itr) !=
nullptr) && (*itr)->mId ==
id)
343 MemberList::const_iterator itr =
mMembers.begin();
344 const MemberList::const_iterator itr_end =
mMembers.end();
345 while (itr != itr_end)
347 if (((*itr) !=
nullptr) && (*itr)->getName() == name)
358 MemberList::const_iterator it =
mMembers.begin();
359 const MemberList::const_iterator it_end =
mMembers.end();
364 names.push_back((*it)->getName());
376 const GuildMap::const_iterator it =
guilds.find(
id);
387 const PositionsMap::const_iterator it =
mPositions.find(
id);
400 GuildMap::iterator it =
guilds.begin();
401 while (it !=
guilds.end())
ActorManager * actorManager
Being * findBeing(const BeingId id) const
std::string getName() const
void removeGuild(const int id)
std::string getAdditionString() const
GuildMember(Guild *const guild, const BeingId accountId, const int charId, const std::string &name)
GuildMember * addMember(const BeingId accountId, const int charId, const std::string &name)
bool isMember(const GuildMember *const member) const
static Guild * getGuild(const int16_t id)
std::string getPos(const int id) const
GuildMember * getMemberByCharId(const int charId) const
Avatar * getAvatarAt(const int index)
void getNames(StringVect &names) const
void removeMember(const GuildMember *const member)
void setRights(const int16_t rights)
static void clearGuilds()
std::map< int, Guild * > GuildMap
void addPos(const int id, const std::string &name)
GuildMember * getMember(const BeingId id) const
static class SortGuildFunctor guildSorter
#define A_DEFAULT_COPY(func)
std::string toLower(std::string const &s)
std::vector< std::string > StringVect