summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-22 17:25:25 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-22 17:25:25 +0000
commita31a16b269a9d2ab86152e8d37814792eb132820 (patch)
treebdc29939b21791fb343bda9eb5a1de62705f8bbf /crawl-ref/source/misc.cc
parentecb59b4de1ae34862f133d4b98dd8270d2ec4cf1 (diff)
downloadcrawl-ref-a31a16b269a9d2ab86152e8d37814792eb132820.tar.gz
crawl-ref-a31a16b269a9d2ab86152e8d37814792eb132820.zip
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
Diffstat (limited to 'crawl-ref/source/misc.cc')
-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 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)