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.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 4b527d008..c3b2faf9f 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -71,6 +71,7 @@
#include "net/chathandler.h"
#include "net/download.h"
#include "net/gamehandler.h"
+#include "net/inventoryhandler.h"
#include "net/ipc.h"
#include "net/mercenaryhandler.h"
#include "net/npchandler.h"
@@ -1392,4 +1393,19 @@ impHandler(invToStorage)
return true;
}
+impHandler(invToStorage10)
+{
+ Item *const item = getItemByInvIndex(event);
+ if (!item)
+ return true;
+
+ int cnt = 10;
+ if (cnt > item->getQuantity())
+ cnt = item->getQuantity();
+ inventoryHandler->moveItem2(Inventory::INVENTORY,
+ item->getInvIndex(), cnt,
+ Inventory::STORAGE);
+ return true;
+}
+
} // namespace Actions