From 8a31e96d8534d402db9cd48183c0b15732f7d95e Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 8 Feb 2010 14:40:04 -0700 Subject: Merge PartyWindow and GuildWindow into SocialWindow --- src/player.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/player.h') diff --git a/src/player.h b/src/player.h index 2d46b4de..6e2566b8 100644 --- a/src/player.h +++ b/src/player.h @@ -25,8 +25,9 @@ #include "being.h" class Graphics; -class Map; class Guild; +class Map; +class Party; enum Gender { @@ -86,7 +87,7 @@ class Player : public Being /** * Adds a guild to the player. */ - Guild *addGuild(short guildId, short rights); + void addGuild(Guild *guild); /** * Removers a guild from the player. @@ -106,16 +107,13 @@ class Player : public Being /** * Get number of guilds the player belongs to. */ - short getNumberOfGuilds(); + short getNumberOfGuilds() const { return mGuilds.size(); } - /** - * Set whether the player in the LocalPlayer's party. Players that are - * in the same party as the local player get their name displayed in - * a different color. - */ - void setInParty(bool inParty); + bool isInParty() const { return mParty != NULL; } + + void setParty(Party *party); - bool isInParty() const { return mInParty; } + Party *getParty() const { return mParty; } /** * Gets the way the character is blocked by other objects. @@ -143,11 +141,9 @@ class Player : public Being // Character guild information std::map mGuilds; + Party *mParty; bool mIsGM; - - private: - bool mInParty; }; #endif -- cgit v1.2.3-60-g2f50