summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index a6038c85..3c556f01 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -36,7 +36,7 @@ struct SlotUsed : public std::unary_function<Item*, bool>
}
};
-Inventory::Inventory(int type, int size):
+Inventory::Inventory(Type type, int size):
mType(type),
mSize(size == -1 ? Net::getInventoryHandler()->getSize(type) : size),
mUsed(0)
@@ -70,12 +70,12 @@ Item *Inventory::findItem(int itemId) const
return NULL;
}
-void Inventory::addItem(int id, int quantity, bool equipment)
+void Inventory::addItem(int id, int quantity)
{
- setItem(getFreeSlot(), id, quantity, equipment);
+ setItem(getFreeSlot(), id, quantity);
}
-void Inventory::setItem(int index, int id, int quantity, bool equipment)
+void Inventory::setItem(int index, int id, int quantity)
{
if (index < 0 || index >= mSize)
{
@@ -85,7 +85,7 @@ void Inventory::setItem(int index, int id, int quantity, bool equipment)
if (!mItems[index] && id > 0)
{
- Item *item = new Item(id, quantity, equipment);
+ Item *item = new Item(id, quantity);
item->setInvIndex(index);
mItems[index] = item;
mUsed++;
@@ -95,7 +95,6 @@ void Inventory::setItem(int index, int id, int quantity, bool equipment)
{
mItems[index]->setId(id);
mItems[index]->setQuantity(quantity);
- mItems[index]->setEquipment(equipment);
}
else if (mItems[index])
{