summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp8
1 files changed, 6 insertions, 2 deletions
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)
{