diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-13 14:18:22 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-13 14:18:22 +0000 |
commit | 59ed12959885ad6abb1b8c3cbe31e66e74417136 (patch) | |
tree | af18e8db3b3d9fa6108752d05566a6b6c6928471 /crawl-ref/source/items.cc | |
parent | 8d97ef9f448666629bb9338f3641ee5404ecee66 (diff) | |
download | crawl-ref-59ed12959885ad6abb1b8c3cbe31e66e74417136.tar.gz crawl-ref-59ed12959885ad6abb1b8c3cbe31e66e74417136.zip |
Fix spurious encumberance messages when combining ammo in inventory.
Fixes 2354891.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7823 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 23d44aa227..1eb3693b81 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -212,7 +212,7 @@ bool is_valid_item( const item_def &item ) // Reduce quantity of an inventory item, do cleanup if item goes away. // // Returns true if stack of items no longer exists. -bool dec_inv_item_quantity( int obj, int amount ) +bool dec_inv_item_quantity( int obj, int amount, bool suppress_burden ) { bool ret = false; @@ -253,7 +253,8 @@ bool dec_inv_item_quantity( int obj, int amount ) you.inv[obj].quantity -= amount; } - burden_change(); + if ( !suppress_burden ) + burden_change(); return (ret); } @@ -285,14 +286,16 @@ bool dec_mitm_item_quantity( int obj, int amount ) return (false); } -void inc_inv_item_quantity( int obj, int amount ) +void inc_inv_item_quantity( int obj, int amount, bool suppress_burden ) { if (you.equip[EQ_WEAPON] == obj) you.wield_change = true; you.m_quiver->on_inv_quantity_changed(obj, amount); you.inv[obj].quantity += amount; - burden_change(); + + if ( !suppress_burden ) + burden_change(); } void inc_mitm_item_quantity( int obj, int amount ) @@ -2368,7 +2371,6 @@ bool can_autopickup() static void _do_autopickup() { - //David Loewenstern 6/99 int n_did_pickup = 0; int n_tried_pickup = 0; |