Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

cGuild Class Reference

a guild More...

#include <guild.h>

List of all members.

Public Methods

void load (cStringFile &file)
 Constructor for when loading from worldfile.

void save (FILE *file)
 cGuild (SERIAL guildstone)
 Contructor of cGuild.

 ~cGuild ()
 Destructor of cGuild.

void load ()
SERIAL getSerial ()
 Get the guild serial/stone id.

void setName (std::string &newName)
 Set the new guild name.

std::string getName ()
 Get the guild name.

void setAbbreviation (std::string &newAbbr)
 Set the new guild abbreviation.

std::string getAbbreviation ()
 Get the guild abbreviation.

const GUILD_TYPE getGuildType () const
void setGuildType (GUILD_TYPE newGuildType)
const SERIAL cGuild::getGuildMaster () const
void cGuild::setGuildMaster (SERIAL newGuildMaster)
void cGuild::calculateFealty ()
void cGuild::showTitle (P_CHAR pc, P_CHAR pc2)
std::map< SERIAL, P_GUILD_MEMBERgetMembers ()
P_GUILD_MEMBER addMember (P_CHAR pc)
 Add a new guild member.

void resignMember (P_CHAR pc)
 Remove a guild member.

void removeMember (SERIAL member)
P_GUILD_MEMBER getMember (SERIAL member)
 Get the given guild member.

int getMemberPosition (SERIAL member)
 Get the index of the guild member in the guild.

SERIAL getMemberByIndex (int index)
 Get the guild member at the given index in the guild.

int getRecruitIndex (SERIAL member)
 Get the index of the guild member in the guild.

SERIAL getRecruitByIndex (int index)
 Get the guild member at the given index in the guild.

std::vector< SERIAL > * getGuildsInWar ()
 Return array of guild wars.

std::vector< SERIAL > * getGuildsInPeace ()
 Return array of guild peace offers.

std::vector< SERIAL > * getGuildsAllied ()
 Return array of guild allies.

void addWar (SERIAL guild)
 Add a guild to declare war on.

void addPeace (SERIAL guild)
 Add a guild to make a peace offer to.

void addAlly (SERIAL guild)
 Add a guild as an ally to your guild.

bool hasWarWith (SERIAL guild)
bool hasPeaceWith (SERIAL guild)
bool hasAllianceWith (SERIAL guild)
void cGuild::makePeace (SERIAL guild)
P_GUILD_RECRUIT addNewRecruit (P_CHAR recruit, P_CHAR recruiter)
 Add a new recruit.

void refuseRecruit (P_CHAR pc)
 refuse a new recruit

P_GUILD_RECRUIT getRecruit (SERIAL recruit)
 Get the given guild recruit.


Public Attributes

std::map< SERIAL, P_GUILD_MEMBERmembers
 all members of this guild

std::wstring charter
 charter

std::string webpage
 web page

std::map< SERIAL, P_GUILD_RECRUITrecruits
 all who want become member of this guild


Private Types

enum  GUILD_RANK {
  RANK_GUILDMASTER, RANK_GUILDVICE, RANK_GUILDMEMBER, RANK_GUILDRECRUIT,
  ALL_RANKS
}

Private Attributes

SERIAL serial
 guild serial, is equal to the guildstone serial

GUILD_TYPE type
 guild type

std::string name
 guild name ( es Keeper of the Crimson Soul )

std::string abbreviation
 abbreviation ( es KCS )

SERIAL_VECTOR guildWar
SERIAL_VECTOR guildPeace
SERIAL_VECTOR guildAllies
SERIAL guildMaster


Detailed Description

a guild

Author:
Endymion


Member Enumeration Documentation

enum cGuild::GUILD_RANK [private]
 

Enumeration values:
RANK_GUILDMASTER 
RANK_GUILDVICE 
RANK_GUILDMEMBER 
RANK_GUILDRECRUIT 
ALL_RANKS 


Constructor & Destructor Documentation

cGuild::cGuild SERIAL    guildstone
 

Contructor of cGuild.

cGuild::~cGuild  
 

Destructor of cGuild.


Member Function Documentation

void cGuild::addAlly SERIAL    guild
 

Add a guild as an ally to your guild.

Author:
Wintermute
Parameters:
guild, the  guild to make an alliance with

P_GUILD_MEMBER cGuild::addMember P_CHAR    pc
 

Add a new guild member.

Author:
Endymion
Parameters:
pc  the player

P_GUILD_RECRUIT cGuild::addNewRecruit P_CHAR    recruit,
P_CHAR    recruiter
 

Add a new recruit.

Author:
Endymion

void cGuild::addPeace SERIAL    guild
 

Add a guild to make a peace offer to.

Author:
Wintermute
Parameters:
guild, the  guild to make an peace offer to

void cGuild::addWar SERIAL    guild
 

Add a guild to declare war on.

Author:
Wintermute
Parameters:
guild, the  guild to declare war on

void cGuild::cGuild::calculateFealty  
 

const SERIAL cGuild::cGuild::getGuildMaster   const [inline]
 

void cGuild::cGuild::makePeace SERIAL    guild
 

void cGuild::cGuild::setGuildMaster SERIAL    newGuildMaster [inline]
 

void cGuild::cGuild::showTitle P_CHAR    pc,
P_CHAR    pc2
 

std::string cGuild::getAbbreviation  
 

Get the guild abbreviation.

Author:
Endymion
Returns:
the guild abbreviation

std::vector< SERIAL > * cGuild::getGuildsAllied  
 

Return array of guild allies.

Author:
Wintermute
Returns:
pointer to std::vector of serials of the guilds this guild is allied with

std::vector< SERIAL > * cGuild::getGuildsInPeace  
 

Return array of guild peace offers.

Author:
Wintermute
Returns:
pointer to std::vector of serials of the guilds this guild has made a peace offer to

std::vector< SERIAL > * cGuild::getGuildsInWar  
 

Return array of guild wars.

Author:
Wintermute
Returns:
pointer to std::vector of serials of the guilds this guild is warring with

const GUILD_TYPE cGuild::getGuildType   const [inline]
 

P_GUILD_MEMBER cGuild::getMember SERIAL    member
 

Get the given guild member.

Author:
Endymion
Parameters:
member  the member

SERIAL cGuild::getMemberByIndex int    index
 

Get the guild member at the given index in the guild.

Author:
Wintermute
Parameters:
index, position  of member

int cGuild::getMemberPosition SERIAL    member
 

Get the index of the guild member in the guild.

Author:
Wintermute
Parameters:
member  the member

std::map< SERIAL, P_GUILD_MEMBER > cGuild::getMembers   [inline]
 

std::string cGuild::getName  
 

Get the guild name.

Author:
Endymion
Returns:
the guild name

P_GUILD_RECRUIT cGuild::getRecruit SERIAL    recruit
 

Get the given guild recruit.

Author:
Endymion
Parameters:
recruit  the recruit

SERIAL cGuild::getRecruitByIndex int    index
 

Get the guild member at the given index in the guild.

Author:
Wintermute
Parameters:
index, position  of member

int cGuild::getRecruitIndex SERIAL    member
 

Get the index of the guild member in the guild.

Author:
Wintermute
Parameters:
member  the member

SERIAL cGuild::getSerial  
 

Get the guild serial/stone id.

Author:
Wintermute
Returns:
the guild serial which is also the serial of the guildstone

bool cGuild::hasAllianceWith SERIAL    guild
 

bool cGuild::hasPeaceWith SERIAL    guild
 

bool cGuild::hasWarWith SERIAL    guild
 

void cGuild::load  
 

void cGuild::load cStringFile   file
 

Constructor for when loading from worldfile.

void cGuild::refuseRecruit P_CHAR    pc
 

refuse a new recruit

Author:
Endymion
Returns:
pc the player

void cGuild::removeMember SERIAL    member [inline]
 

void cGuild::resignMember P_CHAR    pc
 

Remove a guild member.

Author:
Endymion
Parameters:
pc  the player

void cGuild::save FILE *    file
 

void cGuild::setAbbreviation std::string &    newAbbr
 

Set the new guild abbreviation.

Author:
Endymion
Parameters:
newAbbr  the new guild abbreviation

void cGuild::setGuildType GUILD_TYPE    newGuildType [inline]
 

void cGuild::setName std::string &    newName
 

Set the new guild name.

Author:
Endymion
Parameters:
newName  the new name
Note:
Maximun MAX_NAME_LENGTH ( 41 now ) characters


Member Data Documentation

std::string cGuild::abbreviation [private]
 

abbreviation ( es KCS )

std::wstring cGuild::charter
 

charter

SERIAL_VECTOR cGuild::guildAllies [private]
 

SERIAL cGuild::guildMaster [private]
 

SERIAL_VECTOR cGuild::guildPeace [private]
 

SERIAL_VECTOR cGuild::guildWar [private]
 

std::map< SERIAL, P_GUILD_MEMBER > cGuild::members
 

all members of this guild

std::string cGuild::name [private]
 

guild name ( es Keeper of the Crimson Soul )

std::map< SERIAL, P_GUILD_RECRUIT > cGuild::recruits
 

all who want become member of this guild

SERIAL cGuild::serial [private]
 

guild serial, is equal to the guildstone serial

GUILD_TYPE cGuild::type [private]
 

guild type

std::string cGuild::webpage
 

web page


The documentation for this class was generated from the following files: SourceForge.net Logo