summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-13 15:11:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-13 15:11:52 +0300
commitdff25ba3ef8724b4f26f978df27dec1e337ce23c (patch)
tree551e6347567274685513076252f2eb8ca8bdd923 /src/actions/actions.cpp
parentf5d2d18e9d965e8341ee806293c4d5eb4963a019 (diff)
downloadmanaverse-dff25ba3ef8724b4f26f978df27dec1e337ce23c.tar.gz
manaverse-dff25ba3ef8724b4f26f978df27dec1e337ce23c.tar.bz2
manaverse-dff25ba3ef8724b4f26f978df27dec1e337ce23c.tar.xz
manaverse-dff25ba3ef8724b4f26f978df27dec1e337ce23c.zip
Add chat command for move all except 1 items from inventory to storage.
New command: /invtostorageall1 INDEX Alias: /invstorageall1 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 0b501bdbf..135fec27f 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -1421,4 +1421,17 @@ impHandler(invToStorageHalf)
return true;
}
+impHandler(invToStorageAll1)
+{
+ Item *const item = getItemByInvIndex(event);
+ if (!item)
+ return true;
+
+ inventoryHandler->moveItem2(Inventory::INVENTORY,
+ item->getInvIndex(),
+ item->getQuantity() - 1,
+ Inventory::STORAGE);
+ return true;
+}
+
} // namespace Actions