summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-20 18:43:00 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-20 18:43:00 +0300
commita9877525597aa94f1d974b8f45567b4168cf6c8e (patch)
tree56673d8e770302a2846f1d1db0db1a890bba95cd /src/inventory.cpp
parent2ce675592a1a96cc9960082485797045a921676d (diff)
downloadmv-a9877525597aa94f1d974b8f45567b4168cf6c8e.tar.gz
mv-a9877525597aa94f1d974b8f45567b4168cf6c8e.tar.bz2
mv-a9877525597aa94f1d974b8f45567b4168cf6c8e.tar.xz
mv-a9877525597aa94f1d974b8f45567b4168cf6c8e.zip
Remove item default parameters.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 6656f2266..245927ce9 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -104,14 +104,15 @@ Item *Inventory::findItem(const int itemId, const unsigned char color) const
}
void Inventory::addItem(const int id, const int quantity, const uint8_t refine,
- const uint8_t color, const bool equipment)
+ const uint8_t color, const bool equipment,
+ const bool equipped)
{
- setItem(getFreeSlot(), id, quantity, refine, color, equipment);
+ setItem(getFreeSlot(), id, quantity, refine, color, 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 equipment, const bool equipped)
{
if (index < 0 || index >= static_cast<int>(mSize))
{
@@ -122,7 +123,8 @@ void Inventory::setItem(const int index, const int id, const int quantity,
Item *const item1 = mItems[index];
if (!item1 && id > 0)
{
- Item *const item = new Item(id, quantity, refine, color, equipment);
+ Item *const item = new Item(id, quantity, refine, color,
+ equipment, equipped);
item->setInvIndex(index);
mItems[index] = item;
mUsed++;