summaryrefslogtreecommitdiff
path: root/src/player.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-03 11:31:39 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-03 11:37:00 +0200
commit91242cdfe50922e7258a04743bd940956c0453da (patch)
tree85e66499c7a12920ec2309142e839abd74bee53b /src/player.h
parent1bc515864c9f317562b3edb0267a3cc4db5737ad (diff)
downloadmana-client-91242cdfe50922e7258a04743bd940956c0453da.tar.gz
mana-client-91242cdfe50922e7258a04743bd940956c0453da.tar.bz2
mana-client-91242cdfe50922e7258a04743bd940956c0453da.tar.xz
mana-client-91242cdfe50922e7258a04743bd940956c0453da.zip
Moved mIsGM from Being to Player and made isGM() const
Diffstat (limited to 'src/player.h')
-rw-r--r--src/player.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/player.h b/src/player.h
index 53b70b1d..dfcca310 100644
--- a/src/player.h
+++ b/src/player.h
@@ -62,7 +62,12 @@ class Player : public Being
/**
* Whether or not this player is a GM.
*/
- bool isGM() { return mIsGM; }
+ bool isGM() const { return mIsGM; }
+
+ /**
+ * Triggers whether or not to show the name as a GM name.
+ */
+ virtual void setGM() { mIsGM = true; }
/**
* Sets the hair style and color for this player.
@@ -90,7 +95,7 @@ class Player : public Being
/**
* Adds a guild to the player.
*/
- Guild* addGuild(short guildId, short rights);
+ Guild *addGuild(short guildId, short rights);
/**
* Removers a guild from the player.
@@ -100,12 +105,12 @@ class Player : public Being
/**
* Returns a pointer to the specified guild.
*/
- Guild* getGuild(const std::string &guildName);
+ Guild *getGuild(const std::string &guildName);
/**
* Returns a pointer to the guild with matching id.
*/
- Guild* getGuild(int id);
+ Guild *getGuild(int id);
/**
* Get number of guilds the player belongs to.
@@ -146,6 +151,8 @@ class Player : public Being
FlashText *mName;
+ bool mIsGM;
+
private:
bool mInParty;
};