From 40a60a7bb7fd3291fde0a2a689f674a8169c7b64 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Oct 2014 12:30:17 +0300 Subject: Add to item field damaged. --- src/inventory.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/inventory.cpp') diff --git a/src/inventory.cpp b/src/inventory.cpp index d407d94f9..91a3a9b29 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -108,11 +108,12 @@ void Inventory::addItem(const int id, const uint8_t refine, const uint8_t color, const bool identified, + const bool damaged, const bool equipment, const bool equipped) { setItem(getFreeSlot(), id, quantity, refine, color, - identified, equipment, equipped); + identified, damaged, equipment, equipped); } void Inventory::setItem(const int index, @@ -121,6 +122,7 @@ void Inventory::setItem(const int index, const uint8_t refine, const unsigned char color, const bool identified, + const bool damaged, const bool equipment, const bool equipped) { @@ -134,7 +136,7 @@ void Inventory::setItem(const int index, if (!item1 && id > 0) { Item *const item = new Item(id, quantity, refine, color, - identified, equipment, equipped); + identified, damaged, equipment, equipped); item->setInvIndex(index); mItems[index] = item; mUsed++; @@ -146,6 +148,8 @@ void Inventory::setItem(const int index, item1->setQuantity(quantity); item1->setRefine(refine); item1->setEquipment(equipment); + item1->setIdentified(identified); + item1->setDamaged(damaged); } else if (item1) { -- cgit v1.2.3-60-g2f50