summaryrefslogtreecommitdiff
path: root/src/guild.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-02-08 14:40:04 -0700
committerJared Adams <jaxad0127@gmail.com>2010-02-08 14:43:51 -0700
commit8a31e96d8534d402db9cd48183c0b15732f7d95e (patch)
tree885d83febf301c1289c3bf7f83bf9dca89e0347c /src/guild.h
parentbc5c031e43eff506c925682349dd2a52b89d6565 (diff)
downloadmana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.gz
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.bz2
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.tar.xz
mana-8a31e96d8534d402db9cd48183c0b15732f7d95e.zip
Merge PartyWindow and GuildWindow into SocialWindow
Diffstat (limited to 'src/guild.h')
-rw-r--r--src/guild.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/guild.h b/src/guild.h
index fc60ae0a..11ba6e14 100644
--- a/src/guild.h
+++ b/src/guild.h
@@ -22,7 +22,9 @@
#ifndef GUILD_H
#define GUILD_H
-#include <guichan/listmodel.hpp>
+#include "avatar.h"
+
+#include "gui/widgets/avatarlistbox.h"
#include <map>
#include <string>
@@ -30,7 +32,7 @@
class Guild;
-class GuildMember
+class GuildMember : public Avatar
{
public:
GuildMember(int guildId, int id, const std::string &name);
@@ -43,26 +45,16 @@ public:
void setID(int id) { mId = id; }
- std::string getName() const { return mName; }
-
- void setName(std::string name) { mName = name; }
-
Guild *getGuild() const { return mGuild; }
- bool getOnline() const { return mOnline; }
-
- void setOnline(bool online) { mOnline = online; }
-
protected:
friend class Guild;
- std::string mName;
int mId;
Guild *mGuild;
- bool mOnline;
};
-class Guild : public gcn::ListModel
+class Guild : public AvatarListModel
{
public:
@@ -136,11 +128,7 @@ public:
return mMembers.size();
}
- /**
- * Get member at \a index.
- * @return Returns the name of member.
- */
- std::string getElementAt(int index);
+ Avatar *getAvatarAt(int i);
/**
* Get whether user can invite users to this guild.
@@ -159,6 +147,8 @@ public:
bool isMember(const std::string &name) const;
+ void getNames(std::vector<std::string> &names) const;
+
static Guild *getGuild(int id);
private: