fix #U782 - undead turning in a shop [trunk only]

Reported last December by <email deleted>.  Using
a wand or spell of undead turning inside a shop used up corpses without
checking whether they were owned by the shop.  Although the report didn't
mention it, using stone-to-flesh on statues had the same problem.

     I'm not completely satisfied by some aspects of this code, but if I
don't commit what I've got now I probably never would.  My original notes
are lost; I thought that there were some additional fixes present, but
looking at these diffs I don't see anything else significant enough to
warrant mention in the fixes file.
This commit is contained in:
nethack.rankin
2004-10-22 01:04:34 +00:00
parent 467d35d9e4
commit eaae10c837
6 changed files with 285 additions and 222 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)mkroom.c 3.4 2001/09/06 */
/* SCCS Id: @(#)mkroom.c 3.4 2004/06/10 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -403,7 +403,7 @@ int mm_flags;
if (enexto(&cc, mm->x, mm->y, mdat) &&
(!revive_corpses ||
!(otmp = sobj_at(CORPSE, cc.x, cc.y)) ||
!revive(otmp)))
!revive(otmp, FALSE)))
(void) makemon(mdat, cc.x, cc.y, mm_flags);
}
level.flags.graveyard = TRUE; /* reduced chance for undead corpse */