summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-22 17:26:00 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-22 17:26:00 +0000
commit3e72fe4d8fe5f221fcf7146e7b06de5b65eaa825 (patch)
tree9344575334a59e9bef78799355306563280d6f63 /crawl-ref
parent517b49cc7f25ea06a64a7f75e7f9c5d1154b54cf (diff)
downloadcrawl-ref-3e72fe4d8fe5f221fcf7146e7b06de5b65eaa825.tar.gz
crawl-ref-3e72fe4d8fe5f221fcf7146e7b06de5b65eaa825.zip
Apply trunk r10371 to 0.5.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10372 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/misc.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 9b0bc8cdf1..3c9da6d905 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -904,7 +904,9 @@ void turn_corpse_into_blood_potions(item_def &item)
ASSERT(item.base_type == OBJ_CORPSES);
ASSERT(!food_is_rotten(item));
- const int mons_class = item.plus;
+ item_def corpse = item;
+ const int mons_class = corpse.plus;
+
ASSERT(can_bottle_blood_from_corpse(mons_class));
item.base_type = OBJ_POTIONS;
@@ -921,7 +923,7 @@ void turn_corpse_into_blood_potions(item_def &item)
// Happens after the blood has been bottled.
if (monster_descriptor(mons_class, MDSC_LEAVES_HIDE) && !one_chance_in(3))
- _create_monster_hide(item);
+ _create_monster_hide(corpse);
}
void turn_corpse_into_skeleton_and_blood_potions(item_def &item)