From 1b57518ca97c670174f89c5af28659b6ad0c3d42 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Feb 2011 03:36:52 +0200 Subject: Implement receiving item color from server. --- src/item.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/item.h') 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 mTags; }; -- cgit v1.2.3-60-g2f50