summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjak1 <mike.wollmann@gmail.com>2021-12-18 15:47:26 +0100
committerjak1 <mike.wollmann@gmail.com>2021-12-18 15:49:41 +0100
commit96f62b9e3f52302cbaec6c11eeb10e3e3b3b9fae (patch)
tree41ecfa85b394cb94c185eb72ee8974b84f44856a /src
parent8ccd482f2bbdf5ce1febbf2eb78fee491ba2fa0b (diff)
downloadmv-96f62b9e3f52302cbaec6c11eeb10e3e3b3b9fae.tar.gz
mv-96f62b9e3f52302cbaec6c11eeb10e3e3b3b9fae.tar.bz2
mv-96f62b9e3f52302cbaec6c11eeb10e3e3b3b9fae.tar.xz
mv-96f62b9e3f52302cbaec6c11eeb10e3e3b3b9fae.zip
added check for equiped items, and protected items. ignored by store all fixes #26
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/inventorywindow.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index f86410a8c..0ecc6940f 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -521,6 +521,9 @@ void InventoryWindow::action(const ActionEvent &event)
Item *const item = mInventory->getItem(i);
if (item == nullptr)
continue;
+ if (item->isEquipped() == Equipped_true ||
+ PlayerInfo::isItemProtected(item->getId()))
+ continue;
inventoryHandler->moveItem2(InventoryType::Inventory,
item->getInvIndex(),
item->getQuantity(),