From 91242cdfe50922e7258a04743bd940956c0453da Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 3 May 2009 11:31:39 +0200 Subject: Moved mIsGM from Being to Player and made isGM() const --- src/player.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/player.h') 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; }; -- cgit v1.2.3-70-g09d2