diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-13 14:16:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-13 14:16:17 +0300 |
commit | 4729d390af864d7f4614ca76ab74dc2cd7e7c1ae (patch) | |
tree | c165aacdf9eb15ea2156d1ccd1b2572f38a3f9b3 /src/actions/actions.cpp | |
parent | d4c3c93c3829c26860841eaf169ba9801bf3760b (diff) | |
download | manaplus-4729d390af864d7f4614ca76ab74dc2cd7e7c1ae.tar.gz manaplus-4729d390af864d7f4614ca76ab74dc2cd7e7c1ae.tar.bz2 manaplus-4729d390af864d7f4614ca76ab74dc2cd7e7c1ae.tar.xz manaplus-4729d390af864d7f4614ca76ab74dc2cd7e7c1ae.zip |
Add chat command for move item from inventory to storage.
New command: /invtostorage INDEX
Alias: /invstorage INDEX
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r-- | src/actions/actions.cpp | 13 |
1 files changed, 13 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 |