summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-13 15:51:25 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-13 15:51:25 +0100
commit16106cae769f485908c15ac39d0e017167099a48 (patch)
tree7afaf56eddb2138b528fa46f8f51cc66f7c128bb /src/being.h
parent1eba9b1bbd2e2c5a75a71c5592069c73e106015f (diff)
downloadmana-client-16106cae769f485908c15ac39d0e017167099a48.tar.gz
mana-client-16106cae769f485908c15ac39d0e017167099a48.tar.bz2
mana-client-16106cae769f485908c15ac39d0e017167099a48.tar.xz
mana-client-16106cae769f485908c15ac39d0e017167099a48.zip
Moved gender and hair style back to Being
These properties should also apply to NPCs and possibly even monsters in the future.
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/being.h b/src/being.h
index bf11e3ed..cce5e99f 100644
--- a/src/being.h
+++ b/src/being.h
@@ -46,6 +46,12 @@ class ImageSet;
class Particle;
class SpeechBubble;
+enum Gender {
+ GENDER_MALE = 0,
+ GENDER_FEMALE = 1,
+ GENDER_UNSPECIFIED = 2
+};
+
class Being : public Sprite
{
public:
@@ -174,6 +180,33 @@ class Being : public Sprite
setName(const std::string &name) { mName = name; }
/**
+ * Sets the gender for this being.
+ */
+ virtual void setGender(Gender gender) { mGender = gender; }
+
+ /**
+ * Gets the hair color for this being.
+ */
+ int getHairColor() const
+ { return mHairColor; }
+
+ /**
+ * Gets the hair style for this being.
+ */
+ int getHairStyle() const
+ { return mHairStyle; }
+
+ /**
+ * Sets the hair style and color for this being.
+ *
+ * NOTE: This method was necessary for convenience in the 0.0 client.
+ * It should be removed here since the server can provide the hair ID
+ * and coloring the same way it does for other equipment pieces. Then
+ * Being::setSprite can be used instead.
+ */
+ virtual void setHairStyle(int style, int color);
+
+ /**
* Sets visible equipments for this being.
*/
virtual void
@@ -353,6 +386,9 @@ class Being : public Sprite
Path mPath;
std::string mSpeech;
+ int mHairStyle;
+ int mHairColor;
+ Gender mGender;
Uint32 mSpeechTime;
std::vector<AnimatedSprite*> mSprites;