diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-03 02:50:03 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-03 02:50:03 +0200 |
commit | de51eaa43e05c2126fc1eef2a7e115843f972547 (patch) | |
tree | 286a05a069e048247f90c7595f1b8939be784608 /src/item.h | |
parent | d4c08d3bf69410a35a50875de50cc6fe74b3bf3e (diff) | |
parent | 8627c7745f47492ab349da6a74e98e3d5813418f (diff) | |
download | plus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.gz plus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.bz2 plus-de51eaa43e05c2126fc1eef2a7e115843f972547.tar.xz plus-de51eaa43e05c2126fc1eef2a7e115843f972547.zip |
Merge branch 'coloritems'
Diffstat (limited to 'src/item.h')
-rw-r--r-- | src/item.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/item.h b/src/item.h index bc21a437a..ae2cc9dfb 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. @@ -153,10 +154,13 @@ class Item const ItemInfo &getInfo() const { return ItemDB::get(mId); } - static Image *getImage(int id); + static Image *getImage(int id, unsigned char color); 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; }; |