diff options
author | David Athay <ko2fan@gmail.com> | 2008-02-28 12:31:04 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-02-28 12:31:04 +0000 |
commit | fb3cbeddd6f5d59e3f83da059b2a1d4bed2cb80f (patch) | |
tree | 65e3086f341bb92154e99806f3b6255d9696ed4b /src/localplayer.h | |
parent | ac2de5e0bd7dfc79e344b6724ee6a13db9994aa4 (diff) | |
download | mana-client-fb3cbeddd6f5d59e3f83da059b2a1d4bed2cb80f.tar.gz mana-client-fb3cbeddd6f5d59e3f83da059b2a1d4bed2cb80f.tar.bz2 mana-client-fb3cbeddd6f5d59e3f83da059b2a1d4bed2cb80f.tar.xz mana-client-fb3cbeddd6f5d59e3f83da059b2a1d4bed2cb80f.zip |
Work in Progress commit of guilds.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r-- | src/localplayer.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/localplayer.h b/src/localplayer.h index fc528171..d850ed5f 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -24,6 +24,7 @@ #ifndef _TMW_LOCALPLAYER_H #define _TMW_LOCALPLAYER_H +#include "guild.h" #include "player.h" // TODO move into some sane place... @@ -149,6 +150,38 @@ class LocalPlayer : public Player */ virtual void drawName(Graphics *, int, int) {}; + + /** + * Adds a guild to the local player. + */ + void addGuild(short guildId, bool inviteRights); + + /** + * Removers a guild from the local player. + */ + void removeGuild(short guildId); + + /** + * Finds a guild the local player belongs to, by the guildId + * @return returns the guild associated with the guildId + */ + Guild* findGuildById(short guildId); + + /** + * Finds a guild the local player belongs to, by the guild's name. + * @return returns the guild with that name + */ + Guild* findGuildByName(const std::string &guildName); + + /** + * Get number of guilds the player belongs to + */ + short getNumberOfGuilds(); + + /** + * Check the player has permission to invite users + */ + bool checkInviteRights(const std::string &guildName); void clearInventory(); void setInvItem(int index, int id, int amount); @@ -334,6 +367,9 @@ class LocalPlayer : public Player protected: void walk(unsigned char dir); + + // Character guild information + std::vector<Guild*> mGuilds; // Character status: std::vector<int> mAttributeBase; |