summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-21 12:30:17 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-21 12:30:17 +0300
commit40a60a7bb7fd3291fde0a2a689f674a8169c7b64 (patch)
tree9410a23feea6c6248612afdc8968a1c04306e5b0 /src/inventory.cpp
parent76e55447563fae6f8d17f2fd90231c81e0b3f927 (diff)
downloadmanaplus-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.gz
manaplus-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.bz2
manaplus-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.xz
manaplus-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.zip
Add to item field damaged.
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)
{