summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 894377884..3ff40374a 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -78,10 +78,13 @@ Item *Inventory::findItem(int itemId, unsigned char color) const
{
for (unsigned i = 0; i < mSize; i++)
{
- if (mItems[i] && mItems[i]->getId() == itemId
- && (color == 0 || mItems[i]->getColor() == color))
+ if (mItems[i] && mItems[i]->getId() == itemId)
{
- return mItems[i];
+ if (color == 0 || mItems[i]->getColor() == color
+ || (color == 1 && mItems[i]->getColor() <= 1))
+ {
+ return mItems[i];
+ }
}
}