diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-23 01:27:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-23 01:27:45 +0300 |
commit | 9be90b76adb1518c4ffe0e365a18c5afcc3158f2 (patch) | |
tree | bbfea959321e05c329f18ac37757be91f38b9df8 /src/inventory.cpp | |
parent | 7f1053c5ce9e80485730290d002f7ae25db83996 (diff) | |
download | manaplus-9be90b76adb1518c4ffe0e365a18c5afcc3158f2.tar.gz manaplus-9be90b76adb1518c4ffe0e365a18c5afcc3158f2.tar.bz2 manaplus-9be90b76adb1518c4ffe0e365a18c5afcc3158f2.tar.xz manaplus-9be90b76adb1518c4ffe0e365a18c5afcc3158f2.zip |
Add item type to item object.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index da15cbe42..89683d15c 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -104,6 +104,7 @@ Item *Inventory::findItem(const int itemId, const unsigned char color) const } int Inventory::addItem(const int id, + const int type, const int quantity, const uint8_t refine, const uint8_t color, @@ -114,13 +115,14 @@ int Inventory::addItem(const int id, const bool equipped) { const int slot = getFreeSlot(); - setItem(slot, id, quantity, refine, color, + setItem(slot, id, type, quantity, refine, color, identified, damaged, favorite, equipment, equipped); return slot; } void Inventory::setItem(const int index, const int id, + const int type, const int quantity, const uint8_t refine, const unsigned char color, @@ -139,7 +141,7 @@ void Inventory::setItem(const int index, Item *const item1 = mItems[index]; if (!item1 && id > 0) { - Item *const item = new Item(id, quantity, refine, color, + Item *const item = new Item(id, type, quantity, refine, color, identified, damaged, favorite, equipment, equipped); item->setInvIndex(index); mItems[index] = item; |