summaryrefslogtreecommitdiff
path: root/src/account-server/guild.hpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-07-20 20:33:34 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-07-20 20:33:34 +0000
commit2c0a5ba8f1334b9ea3c0935ed16c7c580bb33243 (patch)
treeb86acd9244ae604f8c21c34ace2ef8d1ce55ce67 /src/account-server/guild.hpp
parentb41074c5c51ed9574bceddf94a727bbcd0513bd9 (diff)
downloadmanaserv-2c0a5ba8f1334b9ea3c0935ed16c7c580bb33243.tar.gz
manaserv-2c0a5ba8f1334b9ea3c0935ed16c7c580bb33243.tar.bz2
manaserv-2c0a5ba8f1334b9ea3c0935ed16c7c580bb33243.tar.xz
manaserv-2c0a5ba8f1334b9ea3c0935ed16c7c580bb33243.zip
Separated ChatClient class from chathandler.cpp, cleaned up handling of
messages, defining a method for each handled message and some code formatting cleanup and corrected headers.
Diffstat (limited to 'src/account-server/guild.hpp')
-rw-r--r--src/account-server/guild.hpp154
1 files changed, 80 insertions, 74 deletions
diff --git a/src/account-server/guild.hpp b/src/account-server/guild.hpp
index c91b6467..2116e1ef 100644
--- a/src/account-server/guild.hpp
+++ b/src/account-server/guild.hpp
@@ -28,82 +28,88 @@
class CharacterData;
+/**
+ * A guild and its members.
+ */
class Guild
{
-public:
- typedef std::list<CharacterData*> guildMembers;
- Guild(const std::string &name);
- ~Guild();
-
- /**
- * Add a member to the guild.
- */
- void addMember(CharacterData* player);
-
- /**
- * Remove a member from the guild.
- */
- void removeMember(CharacterData* player);
-
- /**
- * Check player is the leader of the guild.
- */
- bool checkLeader(CharacterData* player);
-
- /**
- * Set the ID of the guild.
- */
- void setId(short id)
- {
- mId = id;
- }
-
- /**
- * Check if player has been invited to the guild.
- */
- bool checkInvited(const std::string &name);
-
- /**
- * Add a player to the invite list.
- */
- void addInvited(const std::string &name);
-
- /**
- * Returns the name of the guild.
- */
- const std::string& getName() const;
-
- /**
- * Returns the ID of the guild.
- */
- short getId() const
- {
- return mId;
- }
-
- /**
- * Returns the total number of members in the guild.
- */
- short totalMembers() const
- {
- return mMembers.size();
- }
-
- /**
- * Get a member in the guild
- */
- std::string getMember(int i) const;
-
- /**
- * Find member by name
- */
- bool checkInGuild(const std::string &name);
-
-private:
- short mId;
- std::string mName;
- std::list<CharacterData*> mMembers;
- std::list<std::string> mInvited;
+ public:
+ typedef std::list<CharacterData*> guildMembers;
+
+ /**
+ * Constructor.
+ */
+ Guild(const std::string &name);
+
+ /**
+ * Destructor.
+ */
+ ~Guild();
+
+ /**
+ * Add a member to the guild.
+ */
+ void addMember(CharacterData* player);
+
+ /**
+ * Remove a member from the guild.
+ */
+ void removeMember(CharacterData* player);
+
+ /**
+ * Check player is the leader of the guild.
+ */
+ bool checkLeader(CharacterData* player);
+
+ /**
+ * Set the ID of the guild.
+ */
+ void setId(short id)
+ { mId = id; }
+
+ /**
+ * Check if player has been invited to the guild.
+ */
+ bool checkInvited(const std::string &name);
+
+ /**
+ * Add a player to the invite list.
+ */
+ void addInvited(const std::string &name);
+
+ /**
+ * Returns the name of the guild.
+ */
+ const std::string& getName() const
+ { return mName; }
+
+ /**
+ * Returns the ID of the guild.
+ */
+ short getId() const
+ { return mId; }
+
+ /**
+ * Returns the total number of members in the guild.
+ */
+ short totalMembers() const
+ { return mMembers.size(); }
+
+ /**
+ * Get a member in the guild.
+ */
+ std::string getMember(int i) const;
+
+ /**
+ * Find member by name.
+ */
+ bool checkInGuild(const std::string &name);
+
+ private:
+ short mId;
+ std::string mName;
+ std::list<CharacterData*> mMembers;
+ std::list<std::string> mInvited;
};
#endif