summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-24 17:05:30 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-24 17:05:30 +0300
commite89fb908638196c9484a2038e3f3eb18db6ef4ee (patch)
treef4606418f80311d200cb6c74c486d399a2723c86 /src
parentc7e4e2770ad24370f0d9c146863d58681e150da2 (diff)
downloadmanaverse-e89fb908638196c9484a2038e3f3eb18db6ef4ee.tar.gz
manaverse-e89fb908638196c9484a2038e3f3eb18db6ef4ee.tar.bz2
manaverse-e89fb908638196c9484a2038e3f3eb18db6ef4ee.tar.xz
manaverse-e89fb908638196c9484a2038e3f3eb18db6ef4ee.zip
Not allow add equipped items to craft inventory.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index f274dcd11..65c5f24e5 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -869,6 +869,8 @@ void ItemContainer::mouseReleased(MouseEvent &event)
if (inventory)
{
Item *const item = inventory->getItem(dragDrop.getTag());
+ if (!item || item->isEquipped() == Equipped_true)
+ return;
const int slot = getSlotByXY(event.getX(), event.getY());
if (item->getQuantity() > 1)
{