diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-09 19:10:25 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-09 19:10:25 +0000 |
commit | 7dc7b1ec82bb235dcdc9172ef979c78e21744a2c (patch) | |
tree | ee9bb486381efda07e0f2697c1e9781c1b5d823b /crawl-ref/source/items.cc | |
parent | 1a2b6ba98ba8ffd482ac94c4e7fa76910c446ffb (diff) | |
download | crawl-ref-7dc7b1ec82bb235dcdc9172ef979c78e21744a2c.tar.gz crawl-ref-7dc7b1ec82bb235dcdc9172ef979c78e21744a2c.zip |
Fixed 1612023: !d was not respected. Now dropping items with !d will
ask for confirmation for each item and abort multidrop if it receives
a negative answer to anything.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@602 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 42d6506131..9b03065bcd 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1920,6 +1920,17 @@ void drop(void) std::sort( items_for_multidrop.begin(), items_for_multidrop.end(), drop_item_order ); + for ( unsigned int i = 0; i < items_for_multidrop.size(); ++i ) + { + if ( !check_warning_inscriptions( *(items_for_multidrop[i].item), + OPER_DROP)) + { + canned_msg( MSG_OK ); + items_for_multidrop.clear(); + return; + } + } + if ( items_for_multidrop.size() == 1 ) // only one item { drop_item( items_for_multidrop[0].slot, |