diff options
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/actions.cpp | 13 | ||||
-rw-r--r-- | src/actions/actions.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index da62c6549..d28edf826 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -410,6 +410,19 @@ impHandler(dropItemIdAll) return true; } +impHandler(dropItemInvAll) +{ + const Inventory *const inv = PlayerInfo::getInventory(); + if (!inv) + return false; + + Item *const item = inv->getItem(atoi(event.args.c_str())); + + if (item && !PlayerInfo::isItemProtected(item->getId())) + PlayerInfo::dropItem(item, item->getQuantity(), true); + return true; +} + impHandler(heal) { if (actorManager && localPlayer) diff --git a/src/actions/actions.h b/src/actions/actions.h index ab7f5b980..3ccd916d0 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -41,6 +41,7 @@ namespace Actions decHandler(dropItemId); decHandler(dropItemInv); decHandler(dropItemIdAll); + decHandler(dropItemInvAll); decHandler(heal); decHandler(itenplz); decHandler(setHome); |