diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-11 11:12:18 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-11 11:12:18 +0000 |
commit | a9ac64d3b972306982b27c81632182864022f939 (patch) | |
tree | 137e07e43b0d975949d817e257645a0aa9053c23 /crawl-ref/source/items.cc | |
parent | dec341f5c123fcaab27d036d70dbef1456ad10fb (diff) | |
download | crawl-ref-a9ac64d3b972306982b27c81632182864022f939.tar.gz crawl-ref-a9ac64d3b972306982b27c81632182864022f939.zip |
Generalize swapping two pieces of terrain in function swap_terrain().
Encapsulate filling out a corpse object for a particular monster in
fill_out_corpse().
Started work on "swap chaos weapon with weapon of victim" chaos effect, but am
putting that off until there's some actor class virtual methods for changing
inventory and equipment.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7807 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 0e79a1af7b..3cef8022c0 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1521,7 +1521,8 @@ static void _got_item(item_def& item, int quant) // Returns quantity of items moved into player's inventory and -1 if // the player's inventory is full. -int move_item_to_player( int obj, int quant_got, bool quiet ) +int move_item_to_player( int obj, int quant_got, bool quiet, + bool ignore_burden ) { if (item_is_stationary(mitm[obj])) { @@ -1561,7 +1562,7 @@ int move_item_to_player( int obj, int quant_got, bool quiet ) bool partial_pickup = false; - if (you.burden + imass > carrying_capacity()) + if (!ignore_burden && (you.burden + imass > carrying_capacity())) { // calculate quantity we can actually pick up int part = (carrying_capacity() - you.burden) / unit_mass; |