Guild Class Reference

A guild and its members. More...

#include <guild.hpp>

List of all members.

Public Member Functions

 Guild (const std::string &name)
 Constructor.
 ~Guild ()
 Destructor.
void addMember (int playerId, int permissions=0)
 Add a member to the guild.
void removeMember (int playerId)
 Remove a member from the guild.
int getOwner ()
 Return owner id.
void setOwner (int playerId)
 Set player as owner of the guild.
void setId (int id)
 Set the ID of the guild.
bool checkInvited (int playerId)
 Check if player has been invited to the guild.
void addInvited (int playerId)
 Add a player to the invite list.
std::string getName () const
 Returns the name of the guild.
int getId () const
 Returns the ID of the guild.
std::list< GuildMember * > getMembers ()
 Returns a list of the members in this guild.
int totalMembers () const
 Returns the total number of members in the guild.
bool checkInGuild (int playerId)
 Find member by name.
bool canInvite (int playerId)
 Returns whether a user can invite.
int getUserPermissions (int playerId)
 Returns a users permissions.
void setUserPermissions (int playerId, int level)
 Sets a users permissions.

Protected Member Functions

GuildMembergetMember (int playerId)
 Return a member based on their character name.


Detailed Description

A guild and its members.

Definition at line 43 of file guild.hpp.


Member Function Documentation

void Guild::addMember ( int  playerId,
int  permissions = 0 
)

Add a member to the guild.

Removes a user from invite list if on it

Definition at line 35 of file guild.cpp.

References checkInvited(), GuildMember::mId, and GuildMember::mPermissions.

Referenced by GuildManager::addGuildMember().


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:46 2009 for TMW Server Collection by  doxygen 1.5.5