diff options
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r-- | src/actions/actions.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 69c711e18..605a3ff06 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -50,6 +50,8 @@ #include "gui/windows/buyselldialog.h" #include "gui/windows/chatwindow.h" #include "gui/windows/helpwindow.h" +#include "gui/windows/inventorywindow.h" +#include "gui/windows/itemamountwindow.h" #include "gui/windows/npcdialog.h" #include "gui/windows/outfitwindow.h" #include "gui/windows/setupwindow.h" @@ -361,6 +363,23 @@ impHandler0(dropItem) return false; } +impHandler(dropItemId) +{ + const Inventory *const inv = PlayerInfo::getInventory(); + if (!inv) + return false; + + // +++ ignoring item color for now + Item *const item = inv->findItem(atoi(event.args.c_str()), 1); + + if (item && !PlayerInfo::isItemProtected(item->getId())) + { + ItemAmountWindow::showWindow(ItemAmountWindow::ItemDrop, + inventoryWindow, item); + } + return true; +} + impHandler(heal) { if (actorManager && localPlayer) |