diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-02-27 03:36:52 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-02-27 03:36:52 +0200 |
commit | 1b57518ca97c670174f89c5af28659b6ad0c3d42 (patch) | |
tree | 369c6e2f8cfbd791f252de68c0f85bd1af47c351 /src/item.h | |
parent | 037248d338291529e0c044a80ca8345abe05dd2b (diff) | |
download | manaverse-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.gz manaverse-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.bz2 manaverse-1b57518ca97c670174f89c5af28659b6ad0c3d42.tar.xz manaverse-1b57518ca97c670174f89c5af28659b6ad0c3d42.zip |
Implement receiving item color from server.
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/item.h b/src/item.h index bc21a437a..cb58f6f9f 100644 --- a/src/item.h +++ b/src/item.h @@ -39,7 +39,8 @@ class Item * Constructor. */ Item(int id = -1, int quantity = 0, int refine = 0, - bool equipment = false, bool equipped = false); + unsigned char color = 1, bool equipment = false, + bool equipped = false); /** * Destructor. @@ -49,7 +50,7 @@ class Item /** * Sets the item id, identifying the item type. */ - void setId(int id); + void setId(int id, unsigned char color); /** * Returns the item id. @@ -157,6 +158,9 @@ class Item bool isHaveTag(int tagId); + unsigned char getColor() + { return mColor; } + protected: int mId; /**< Item type id. */ Image *mImage; /**< Item image. */ @@ -167,6 +171,7 @@ class Item bool mInEquipment; /**< Item is in equipment */ int mRefine; /**< Item refine level. */ int mInvIndex; /**< Inventory index. */ + unsigned char mColor; std::map <int, int> mTags; }; |