From 3e72fe4d8fe5f221fcf7146e7b06de5b65eaa825 Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 22 Jul 2009 17:26:00 +0000 Subject: 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 --- crawl-ref/source/misc.cc | 6 ++++-- 1 file 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) -- cgit v1.2.3-54-g00ecf