diff options
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 07377e47b6..767e1eebba 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -821,6 +821,7 @@ static void _pickup_menu(int item_link) item_link = mitm[j].link; int num_to_take = selected[i].quantity; + const bool take_all = (num_to_take == mitm[j].quantity); unsigned long oldflags = mitm[j].flags; mitm[j].flags &= ~(ISFLAG_THROWN | ISFLAG_DROPPED); int result = move_item_to_player( j, num_to_take ); @@ -840,7 +841,14 @@ static void _pickup_menu(int item_link) mitm[j].flags = oldflags; } else + { n_did_pickup++; + // If we deliberately chose to take only part of a + // pile, we consider the rest to have been + // "dropped." + if (!take_all && is_valid_item(mitm[j])) + mitm[j].flags |= ISFLAG_DROPPED; + } } } |