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.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 605a3ff06..8cd2600b4 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -380,6 +380,20 @@ impHandler(dropItemId)
return true;
}
+impHandler(dropItemIdAll)
+{
+ 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()))
+ PlayerInfo::dropItem(item, item->getQuantity(), true);
+ return true;
+}
+
impHandler(heal)
{
if (actorManager && localPlayer)