From 16106cae769f485908c15ac39d0e017167099a48 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 13 Dec 2008 15:51:25 +0100 Subject: Moved gender and hair style back to Being These properties should also apply to NPCs and possibly even monsters in the future. --- src/being.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'src/being.h') 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: @@ -173,6 +179,33 @@ class Being : public Sprite void 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. */ @@ -353,6 +386,9 @@ class Being : public Sprite Path mPath; std::string mSpeech; + int mHairStyle; + int mHairColor; + Gender mGender; Uint32 mSpeechTime; std::vector mSprites; -- cgit v1.2.3-60-g2f50