From 54ac35bc5a1484757efeae9b342469b9a00fe2a2 Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Thu, 18 Oct 2007 19:00:38 +0000 Subject: Removed player looks from generic beings. Prevented client termination on missing sprites. Merged weapon-type and attack-type fields for items. --- src/player.h | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) (limited to 'src/player.h') diff --git a/src/player.h b/src/player.h index 2c06bfba..e6d3743a 100644 --- a/src/player.h +++ b/src/player.h @@ -40,7 +40,7 @@ class Player : public Being /** * Constructor. */ - Player(Uint16 id, Uint16 job, Map *map); + Player(int id, int job, Map *map); virtual Type getType() const; @@ -48,17 +48,42 @@ class Player : public Being virtual void drawName(Graphics *graphics, int offsetX, int offsetY); - virtual void - setSex(Uint8 sex); + /** + * Sets the sex for this player. + */ + void setGender(int); - virtual void - setHairColor(Uint16 color); + /** + * Gets the hair color for this player. + */ + int getHairColor() const + { return mHairColor; } - virtual void - setHairStyle(Uint16 style); + /** + * Sets the hair color for this player. + */ + void setHairColor(int color); - virtual void - setVisibleEquipment(Uint8 slot, int id); + /** + * Gets the hair style for this player. + */ + int getHairStyle() const + { return mHairStyle; } + + /** + * Sets the hair style for this player. + */ + void setHairStyle(int style); + + /** + * Sets visible equipments for this player. + */ + void setVisibleEquipment(int slot, int id); + + private: + + std::vector mEquipmentSpriteIDs; + Uint8 mGender, mHairStyle, mHairColor; }; #endif -- cgit v1.2.3-60-g2f50