diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-07-29 17:15:40 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-07-29 17:15:40 +0000 |
commit | 18c0302e49c761b2a3b531a0ac2683e5f1135c5e (patch) | |
tree | 5ed10d14ce764e8252d3e23f95aa62b6aad76ac4 /src/game-server/character.hpp | |
parent | fd2cecb5c45cd6f69b193c97b7c78121f6b5b30f (diff) | |
download | manaserv-18c0302e49c761b2a3b531a0ac2683e5f1135c5e.tar.gz manaserv-18c0302e49c761b2a3b531a0ac2683e5f1135c5e.tar.bz2 manaserv-18c0302e49c761b2a3b531a0ac2683e5f1135c5e.tar.xz manaserv-18c0302e49c761b2a3b531a0ac2683e5f1135c5e.zip |
Added support for trading.
Diffstat (limited to 'src/game-server/character.hpp')
-rw-r--r-- | src/game-server/character.hpp | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp index 15c72a3d..efb93e1e 100644 --- a/src/game-server/character.hpp +++ b/src/game-server/character.hpp @@ -33,6 +33,7 @@ class GameClient; class MessageIn; class MessageOut; class Point; +class Trade; /** * The representation of a player's character in the game world. @@ -76,6 +77,17 @@ class Character : public Being Possessions &getPossessions() { return mPossessions; } + /** + * Gets the trade object the character is involved in. + */ + Trade *getTrading() const + { return mTrading; } + + /** + * Sets the trade object the character is involved in. + */ + void setTrading(Trade *t) + { mTrading = t; } /* * Character data: @@ -105,7 +117,7 @@ class Character : public Being /** Gets the gender of the character (male or female). */ int getGender() const - { return mGender;} + { return mGender; } /** Sets the gender of the character (male or female). */ void @@ -200,25 +212,26 @@ class Character : public Being Character &operator=(Character const &); GameClient *mClient; /**< Client computer. */ + Trade *mTrading; /**< Trade object the character is involved in. */ /** Atributes as the client should currently know them. */ std::vector<unsigned short> mOldAttributes; - /** - * true when one or more attributes might have changed since the - * client has been updated about them. - */ - bool mAttributesChanged; + Possessions mPossessions; /**< Possesssions of the character. */ - int mDatabaseID; /**< Character's database ID. */ std::string mName; /**< Name of the character. */ + int mDatabaseID; /**< Character's database ID. */ + unsigned short mMoney; /**< Wealth of the character. */ unsigned char mGender; /**< Gender of the character. */ unsigned char mHairStyle; /**< Hair Style of the character. */ unsigned char mHairColor; /**< Hair Color of the character. */ unsigned char mLevel; /**< Level of the character. */ - unsigned int mMoney; /**< Wealth of the being. */ - Possessions mPossessions; /**< Possesssions of the character. */ + /** + * true when one or more attributes might have changed since the + * client has been updated about them. + */ + bool mAttributesChanged; }; #endif // _TMWSERV_CHARACTER_HPP_ |