summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp13
-rw-r--r--src/actions/actions.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index bc641d331..165a9add0 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -1390,4 +1390,17 @@ impHandler(useItemInv)
return true;
}
+impHandler(invToStorage)
+{
+ const int index = atoi(event.args.c_str());
+ const Inventory *const inv = PlayerInfo::getInventory();
+ if (inv)
+ {
+ Item *const item = inv->getItem(index);
+ ItemAmountWindow::showWindow(ItemAmountWindow::StoreAdd,
+ inventoryWindow, item);
+ }
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index 5d7482642..eaf900fbe 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -98,6 +98,7 @@ namespace Actions
decHandler(mercenaryFire);
decHandler(useItem);
decHandler(useItemInv);
+ decHandler(invToStorage);
} // namespace Actions
#undef decHandler