ManaPlus
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
GuildMember Class Reference

#include <guild.h>

Inheritance diagram for GuildMember:
Avatar

Public Member Functions

const GuildgetGuild () const
 
int getPos () const
 
void setPos (const int pos)
 
std::string getAdditionString () const
 
- Public Member Functions inherited from Avatar
 Avatar (const std::string &name)
 
virtual ~Avatar ()
 
std::string getName () const
 
void setName (const std::string &name)
 
std::string getOriginalName () const
 
std::string getComplexName () const
 
void setOriginalName (const std::string &name)
 
bool getOnline () const
 
void setOnline (const bool online)
 
int getHp () const
 
void setHp (const int hp)
 
int getMaxHp () const
 
void setMaxHp (const int maxHp)
 
int getDamageHp () const
 
void setDamageHp (const int damageHp)
 
bool getDisplayBold () const
 
void setDisplayBold (const bool displayBold)
 
int getLevel () const
 
void setLevel (const int level)
 
std::string getMap () const
 
void setMap (const std::string &map)
 
int getX () const
 
void setX (const int x)
 
int getY () const
 
void setY (const int y)
 
int getType () const
 
void setType (const int n)
 
int getExp () const
 
void setExp (const int n)
 
BeingId getID () const
 
void setID (const BeingId id)
 
int getCharId () const
 
void setCharId (const int id)
 
GenderT getGender () const
 
void setGender (const GenderT g)
 
int getRace () const
 
void setRace (const int r)
 
const std::string & getIp () const
 
void setIp (const std::string &ip)
 
bool getPoison () const
 
void setPoison (const bool b)
 

Protected Member Functions

 GuildMember (Guild *const guild, const BeingId accountId, const int charId, const std::string &name)
 
 GuildMember (Guild *const guild, const std::string &name)
 

Protected Attributes

GuildmGuild
 
int mPos
 
- Protected Attributes inherited from Avatar
BeingId mId
 
int mCharId
 
std::string mName
 
std::string mOriginalName
 
int mHp
 
int mMaxHp
 
int mDamageHp
 
int mLevel
 
std::string mMap
 
int mX
 
int mY
 
int mType
 
int mExp
 
GenderT mGender
 
int mRace
 
std::string mIp
 
bool mOnline
 
bool mDisplayBold
 
bool mPoison
 

Friends

class Guild
 

Detailed Description

Definition at line 39 of file guild.h.

Constructor & Destructor Documentation

◆ GuildMember() [1/2]

GuildMember::GuildMember ( Guild *const  guild,
const BeingId  accountId,
const int  charId,
const std::string &  name 
)
protected

Definition at line 66 of file guild.cpp.

69  :
70  Avatar(name),
71  mGuild(guild),
72  mPos(0)
73 {
74  mId = accountId;
75  mCharId = charId;
76 }
int mCharId
Definition: avatar.h:188
Avatar(const std::string &name)
Definition: avatar.cpp:28
BeingId mId
Definition: avatar.h:187
Guild * mGuild
Definition: guild.h:65
int mPos
Definition: guild.h:66
uint32_t guild

References Avatar::mCharId, and Avatar::mId.

◆ GuildMember() [2/2]

GuildMember::GuildMember ( Guild *const  guild,
const std::string &  name 
)
protected

Definition at line 78 of file guild.cpp.

78  :
79  Avatar(name),
80  mGuild(guild),
81  mPos(0)
82 {
83 }

Member Function Documentation

◆ getAdditionString()

std::string GuildMember::getAdditionString ( ) const
virtual

Reimplemented from Avatar.

Definition at line 85 of file guild.cpp.

86 {
87  if (mGuild == nullptr)
88  return "";
89 
90  return " - " + mGuild->getPos(mPos);
91 }
std::string getPos(const int id) const
Definition: guild.cpp:385

References Guild::getPos(), mGuild, and mPos.

◆ getGuild()

const Guild* GuildMember::getGuild ( ) const
inline

Definition at line 44 of file guild.h.

45  { return mGuild; }

References mGuild.

Referenced by EAthena::GuildHandler::changeMemberPostion().

◆ getPos()

int GuildMember::getPos ( ) const
inline

Definition at line 47 of file guild.h.

48  { return mPos; }

References mPos.

◆ setPos()

void GuildMember::setPos ( const int  pos)
inline

Friends And Related Function Documentation

◆ Guild

friend class Guild
friend

Definition at line 56 of file guild.h.

Field Documentation

◆ mGuild

Guild* GuildMember::mGuild
protected

Definition at line 65 of file guild.h.

Referenced by getAdditionString(), getGuild(), and Guild::isMember().

◆ mPos

int GuildMember::mPos
protected

Definition at line 66 of file guild.h.

Referenced by getAdditionString(), getPos(), and setPos().


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