summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-21 01:13:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-21 01:13:46 +0300
commit76e55447563fae6f8d17f2fd90231c81e0b3f927 (patch)
treefa0b2b5daaa50149329f12b7f47b28901d95cc79 /src/inventory.cpp
parent8d12abe6ff4114a04b8fc9549e8f44683fed9e3d (diff)
downloadmanaplus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.gz
manaplus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.bz2
manaplus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.xz
manaplus-76e55447563fae6f8d17f2fd90231c81e0b3f927.zip
Add to item field identified.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 245927ce9..d407d94f9 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -103,16 +103,26 @@ Item *Inventory::findItem(const int itemId, const unsigned char color) const
return nullptr;
}
-void Inventory::addItem(const int id, const int quantity, const uint8_t refine,
- const uint8_t color, const bool equipment,
+void Inventory::addItem(const int id,
+ const int quantity,
+ const uint8_t refine,
+ const uint8_t color,
+ const bool identified,
+ const bool equipment,
const bool equipped)
{
- setItem(getFreeSlot(), id, quantity, refine, color, equipment, equipped);
+ setItem(getFreeSlot(), id, quantity, refine, color,
+ identified, equipment, equipped);
}
-void Inventory::setItem(const int index, const int id, const int quantity,
- const uint8_t refine, const unsigned char color,
- const bool equipment, const bool equipped)
+void Inventory::setItem(const int index,
+ const int id,
+ const int quantity,
+ const uint8_t refine,
+ const unsigned char color,
+ const bool identified,
+ const bool equipment,
+ const bool equipped)
{
if (index < 0 || index >= static_cast<int>(mSize))
{
@@ -124,7 +134,7 @@ void Inventory::setItem(const int index, const int id, const int quantity,
if (!item1 && id > 0)
{
Item *const item = new Item(id, quantity, refine, color,
- equipment, equipped);
+ identified, equipment, equipped);
item->setInvIndex(index);
mItems[index] = item;
mUsed++;