summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-13 15:18:05 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-13 15:18:05 +0300
commit753efae71d14bfcb3b36abb1a1455c1c4bd7e4a8 (patch)
treed3321a2cd80f0a89b7422ab6d71188f90608d3b9 /src/actions/actions.cpp
parentf473ddfdd2a576036d57b05640bd91dcced4bdbf (diff)
downloadmv-753efae71d14bfcb3b36abb1a1455c1c4bd7e4a8.tar.gz
mv-753efae71d14bfcb3b36abb1a1455c1c4bd7e4a8.tar.bz2
mv-753efae71d14bfcb3b36abb1a1455c1c4bd7e4a8.tar.xz
mv-753efae71d14bfcb3b36abb1a1455c1c4bd7e4a8.zip
Add chat command for move all items from inventory to storage.
New command: /invtostorageall INDEX Alias: /invstorageall INDEX
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 135fec27f..36a463da5 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -1434,4 +1434,17 @@ impHandler(invToStorageAll1)
return true;
}
+impHandler(invToStorageAll)
+{
+ Item *const item = getItemByInvIndex(event);
+ if (!item)
+ return true;
+
+ inventoryHandler->moveItem2(Inventory::INVENTORY,
+ item->getInvIndex(),
+ item->getQuantity(),
+ Inventory::STORAGE);
+ return true;
+}
+
} // namespace Actions