summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r--src/actions/actions.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index c3b2faf9f..0b501bdbf 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -1408,4 +1408,17 @@ impHandler(invToStorage10)
return true;
}
+impHandler(invToStorageHalf)
+{
+ Item *const item = getItemByInvIndex(event);
+ if (!item)
+ return true;
+
+ inventoryHandler->moveItem2(Inventory::INVENTORY,
+ item->getInvIndex(),
+ item->getQuantity() / 2,
+ Inventory::STORAGE);
+ return true;
+}
+
} // namespace Actions