diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-21 12:30:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-21 12:30:17 +0300 |
commit | 40a60a7bb7fd3291fde0a2a689f674a8169c7b64 (patch) | |
tree | 9410a23feea6c6248612afdc8968a1c04306e5b0 /src/inventory.cpp | |
parent | 76e55447563fae6f8d17f2fd90231c81e0b3f927 (diff) | |
download | plus-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.gz plus-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.bz2 plus-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.tar.xz plus-40a60a7bb7fd3291fde0a2a689f674a8169c7b64.zip |
Add to item field damaged.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 8 |
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) { |