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:
4
src/do.c
4
src/do.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)do.c 3.4 2003/12/17 */
|
||||
/* SCCS Id: @(#)do.c 3.4 2004/09/10 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1511,7 +1511,7 @@ struct obj *corpse;
|
||||
/* container_where is the outermost container's location even if nested */
|
||||
if (container_where == OBJ_MINVENT && mtmp2) mcarry = mtmp2;
|
||||
}
|
||||
mtmp = revive(corpse); /* corpse is gone if successful */
|
||||
mtmp = revive(corpse, FALSE); /* corpse is gone if successful */
|
||||
|
||||
if (mtmp) {
|
||||
chewed = (mtmp->mhp < mtmp->mhpmax);
|
||||
|
||||
Reference in New Issue
Block a user