From a31a16b269a9d2ab86152e8d37814792eb132820 Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 22 Jul 2009 17:25:25 +0000 Subject: Fix [2825414]: Leave the proper hide type when bottling blood from a corpse as a vampire. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10371 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/misc.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 2f56f29fb1..939912e6c4 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -905,7 +905,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; @@ -922,7 +924,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