From 753efae71d14bfcb3b36abb1a1455c1c4bd7e4a8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 13 Dec 2014 15:18:05 +0300 Subject: Add chat command for move all items from inventory to storage. New command: /invtostorageall INDEX Alias: /invstorageall INDEX --- src/actions/actions.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/actions/actions.cpp') 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 -- cgit v1.2.3-70-g09d2