summaryrefslogtreecommitdiff
path: root/src/account-server/character.hpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-23 21:00:16 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-04-26 17:18:21 +0200
commite726c34606f85347e70a0deb6b180db03b6d0c25 (patch)
treee78e5ba07dd9484abed035cc3e63744101bbef57 /src/account-server/character.hpp
parenta3f72002fa02cd4c525f101c5f240a22d4480119 (diff)
downloadmanaserv-e726c34606f85347e70a0deb6b180db03b6d0c25.tar.gz
manaserv-e726c34606f85347e70a0deb6b180db03b6d0c25.tar.bz2
manaserv-e726c34606f85347e70a0deb6b180db03b6d0c25.tar.xz
manaserv-e726c34606f85347e70a0deb6b180db03b6d0c25.zip
Merged MovingObject into the Being class
Also renamed Object to Actor, to make it sound a little less generic. Cleans up a bit the rather big hierarchy of different object types we have.
Diffstat (limited to 'src/account-server/character.hpp')
-rw-r--r--src/account-server/character.hpp110
1 files changed, 43 insertions, 67 deletions
diff --git a/src/account-server/character.hpp b/src/account-server/character.hpp
index fa8ce3e2..d63a0b0b 100644
--- a/src/account-server/character.hpp
+++ b/src/account-server/character.hpp
@@ -38,16 +38,10 @@ class Character
Character(std::string const &name, int id = -1);
/**
- * Get and set methods
+ * Gets the database id of the character.
*/
-
- /** Gets the database id of the character. */
- int
- getDatabaseID() const { return mDatabaseID; }
-
- /** Sets the database id of the character. */
- void
- setDatabaseID(int id) { mDatabaseID = id; }
+ int getDatabaseID() const { return mDatabaseID; }
+ void setDatabaseID(int id) { mDatabaseID = id; }
/** Gets the account the character belongs to. */
Account *getAccount() const
@@ -56,45 +50,35 @@ class Character
/** Sets the account the character belongs to, and related fields. */
void setAccount(Account *ptr);
- /** Gets the ID of the account the character belongs to. */
- int getAccountID() const
- { return mAccountID; }
-
- /** Sets the ID of the account the character belongs to. */
- void setAccountID(int id)
- { mAccountID = id; }
-
- /** Gets the name of the character. */
- std::string const &
- getName() const { return mName; }
-
- /** Sets the name of the character. */
- void
- setName(const std::string& name) { mName = name; }
-
- /** Gets the gender of the character (male / female). */
- int
- getGender() const { return mGender; }
-
- /** Sets the gender of the character (male / female). */
- void
- setGender(int gender) { mGender = gender; }
+ /**
+ * Gets the ID of the account the character belongs to.
+ */
+ int getAccountID() const { return mAccountID; }
+ void setAccountID(int id) { mAccountID = id; }
- /** Gets the hairstyle of the character. */
- int
- getHairStyle() const { return mHairStyle; }
+ /**
+ * Gets the name of the character.
+ */
+ std::string const &getName() const { return mName; }
+ void setName(const std::string& name) { mName = name; }
- /** Sets the hairstyle of the character. */
- void
- setHairStyle(int style) { mHairStyle = style; }
+ /**
+ * Gets the gender of the character (male / female).
+ */
+ int getGender() const { return mGender; }
+ void setGender(int gender) { mGender = gender; }
- /** Gets the haircolor of the character. */
- int
- getHairColor() const { return mHairColor; }
+ /**
+ * Gets the hairstyle of the character.
+ */
+ int getHairStyle() const { return mHairStyle; }
+ void setHairStyle(int style) { mHairStyle = style; }
- /** Sets the haircolor of the character. */
- void
- setHairColor(int color) { mHairColor = color; }
+ /**
+ * Gets the haircolor of the character.
+ */
+ int getHairColor() const { return mHairColor; }
+ void setHairColor(int color) { mHairColor = color; }
/** Gets the account level of the user. */
int getAccountLevel() const
@@ -107,13 +91,11 @@ class Character
void setAccountLevel(int l, bool force = false)
{ if (force) mAccountLevel = l; }
- /** Gets the level of the character. */
- int
- getLevel() const { return mLevel; }
-
- /** Sets the level of the character. */
- void
- setLevel(int level) { mLevel = level; }
+ /**
+ * Gets the level of the character.
+ */
+ int getLevel() const { return mLevel; }
+ void setLevel(int level) { mLevel = level; }
/** Gets the value of a base attribute of the character. */
int getAttribute(int n) const
@@ -132,21 +114,17 @@ class Character
void receiveExperience(int skill, int value)
{ mExperience[skill] += value; }
- /** Gets the Id of the map that the character is on. */
- int
- getMapId() const { return mMapId; }
-
- /** Sets the Id of the map that the character is on. */
- void
- setMapId(int mapId) { mMapId = mapId; }
-
- /** Gets the position of the character on the map. */
- Point const &
- getPosition() const { return mPos; }
+ /**
+ * Gets the Id of the map that the character is on.
+ */
+ int getMapId() const { return mMapId; }
+ void setMapId(int mapId) { mMapId = mapId; }
- /** Sets the position of the character on the map. */
- void
- setPosition(const Point &p) { mPos = p; }
+ /**
+ * Gets the position of the character on the map.
+ */
+ Point const &getPosition() const { return mPos; }
+ void setPosition(const Point &p) { mPos = p; }
/** Add a guild to the character */
void addGuild(const std::string &name) { mGuilds.push_back(name); }
@@ -205,8 +183,6 @@ class Character
//!< belongs to.
};
-// Utility typedefs
-
/**
* Type definition for a list of Characters.
*/