22 #ifndef __PSGUILDINFO_H__ 23 #define __PSGUILDINFO_H__ 27 #include <csutil/ref.h> 28 #include <csutil/refarr.h> 29 #include <csutil/refcount.h> 30 #include <csutil/weakreferenced.h> 147 return (guildlevel->
HasRights(rights) && !(removedPrivileges & rights)) || (privileges & rights);
212 bool Load(
unsigned int id);
223 bool Load(
const csString &name);
234 bool Load(iResultRow &row);
339 bool MeetsMinimumRequirements()
const;
379 bool RenameLevel(
int level,
const char* levelname);
442 void AdjustMoney(
const psMoney &money);
459 void SaveBankMoney();
471 unsigned int MinutesUntilUserChangeName()
const;
490 bool SetMaxMemberPoints(
int points);
499 return max_guild_points;
528 bool SetMemberNotes(
psGuildMember* member,
const csString ¬es,
bool isPublic);
539 bool SetName(csString guildName);
560 bool SetWebPage(
const csString &web_page);
571 bool SetSecret(
bool secretGuild);
601 bool SetMOTD(
const csString &str);
621 bool SetKarmaPoints(
int n_karma_points);
679 return levels.GetIterator();
689 return levels.GetIterator();
699 return members.GetIterator();
709 return members.GetIterator();
719 return members.GetSize();
768 bool RemoveAlliance();
827 return members.GetSize();
int GetID() const
Gets the ID.
PID char_id
The character ID of the person.
User can change guild points of players of lower level.
User can view alliance chat (command /alliance /a)
csString last_login
The last login time for that user.
csString web_page
URL for the guild.
bool Load(int id)
Loads alliance data from database.
csArray< psGuildMember * >::ConstIterator GetMemberIterator() const
Gets a const iterator for levels.
User can view guild chat (command /guild)
PID founder
Character id for the founder of the guild.
int alliance
Alliance ID that this guild belongs to Default: 0(no alliance)
int level
The rank of the level.
int karma_points
Guild's current karma points.
size_t GetMemberCount() const
Gets the number of members in this alliance.
bool RemoveMember(psGuildInfo *member)
Removes a guild from the alliance.
User can view and edit private notes of players with a lower level. < Private notes are only visible ...
psGuildLevel * guildlevel
Members current level.
int GetMaxMemberPoints() const
Simply returns the max member points allowed for this guild.
int privileges
Bit field for additional privileges.
csArray< int > guild_war_with_id
IDs of guild that this guild is at war with.
csArray< psGuildInfo * > members
Array of the members of this alliance.
int GetAllianceID() const
Gets the ID of the alliance this guild belongs to.
bool IsSecret() const
Returns whether this guild is secret.
bool InsertNew()
INSERTs alliance data in database.
A guild alliance between 2+ guilds.
Defines a level inside a guild.
csString motd
The guild's Message of the day.
bool HasRights(GUILD_PRIVILEGE rights)
Checks if the request right is possessed by this guild member.
Defines a guild member in a guild.
bool HasRights(GUILD_PRIVILEGE rights) const
Checks if the request right is possessed by this guild level.
csString private_notes
Private Guild notes for the player.
int privileges
Bit field for the privileges.
psCharacter * character
Pointer to the character data of the person.
void AdjustMoney(const psMoney &money, bool unused)
Override for BankManager.
int max_guild_points
Maximum guild points obtainable in the guild.
csArray< psGuildLevel * >::ConstIterator GetLevelIterator() const
Gets a const iterator for levels.
int GetKarmaPoints() const
Gets the karma points.
csArray< psGuildMember * >::Iterator GetMemberIterator()
Gets an iterator for level.
psMoney bankMoney
Money stored in the guild bank account.
static csString lastError
When a psGuildAlliance method fails (returns false), this contains a description of the problem...
csArray< psGuildLevel * > levels
All of the levels of the guild.
csString name
Viewable name of the alliance.
int guild_points
Their points in the guild.
csString name
Name of the guild.
User can send guild chat messages (command /guild)
size_t GetMemberCount() const
Gets the number of members.
csArray< psGuildMember * > members
All of the members of the guild.
const csString & GetName() const
Simply returns this guild's name.
const csString & GetWebPage() const
Gets the web page.
csString public_notes
The public notes the member has.
User can send alliace chat messages (command /alliace /a)
bool secret
Flag if the guild is secret or not.
int id
The ID of the alliance, used for storing in the DB.
const csString & GetName() const
Gets the name.
const csString & GetMOTD() const
Gets the MOTD string.
User can change privileges of lower guild levels.
User can remove player of lower level from guild.
GUILD_PRIVILEGE
Privileges that may be specifically given/taken from members of a guild.
csString title
Name of the level.
User can change guild name, guild secrecy, guild web page, max guild points < and can disband the gui...
csString name
The name of the member.
psGuildInfo * GetLeader() const
Gets the leader.
bool AddNewMember(psGuildInfo *member)
Adds a new guild to the alliance.
int removedPrivileges
Bit field for privileges removed from this member.
psMoney & GetBankMoney()
Returns the amount of money this guild has in it's bank.
int GetID() const
Gets the ID of this guild.
User can invite players to guild.
User can promote/demote players of lower level to another lower level.
csTicks lastNameChange
Last time the name of this guild was changed Default: 0
csArray< psGuildLevel * >::Iterator GetLevelIterator()
Gets an iterator for level.
psGuildInfo * leader
Leader of the alliance, must also be a member.
User can edit public notes of players with a lower level. < Public notes are visible to all guild mem...