summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-21 14:40:14 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-21 14:40:14 +0300
commit0875a6ddfda9ece1af4a818e38be1f99e578c59a (patch)
tree7bef19d2a2f41f090be11dfe5a8af88716e7b21c /src/inventory.cpp
parent40a60a7bb7fd3291fde0a2a689f674a8169c7b64 (diff)
downloadplus-0875a6ddfda9ece1af4a818e38be1f99e578c59a.tar.gz
plus-0875a6ddfda9ece1af4a818e38be1f99e578c59a.tar.bz2
plus-0875a6ddfda9ece1af4a818e38be1f99e578c59a.tar.xz
plus-0875a6ddfda9ece1af4a818e38be1f99e578c59a.zip
Add to item field favorite.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 91a3a9b29..dfa201cdf 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -109,11 +109,12 @@ void Inventory::addItem(const int id,
const uint8_t color,
const bool identified,
const bool damaged,
+ const bool favorite,
const bool equipment,
const bool equipped)
{
setItem(getFreeSlot(), id, quantity, refine, color,
- identified, damaged, equipment, equipped);
+ identified, damaged, favorite, equipment, equipped);
}
void Inventory::setItem(const int index,
@@ -123,6 +124,7 @@ void Inventory::setItem(const int index,
const unsigned char color,
const bool identified,
const bool damaged,
+ const bool favorite,
const bool equipment,
const bool equipped)
{
@@ -136,7 +138,7 @@ void Inventory::setItem(const int index,
if (!item1 && id > 0)
{
Item *const item = new Item(id, quantity, refine, color,
- identified, damaged, equipment, equipped);
+ identified, damaged, favorite, equipment, equipped);
item->setInvIndex(index);
mItems[index] = item;
mUsed++;
@@ -150,6 +152,7 @@ void Inventory::setItem(const int index,
item1->setEquipment(equipment);
item1->setIdentified(identified);
item1->setDamaged(damaged);
+ item1->setFavorite(favorite);
}
else if (item1)
{