fix #U1150 - burning armor with oil
Objects which were destroyed by dipping them into lit potions of oil didn't get unworn or unwielded in cases where that was needed. This left a stale pointer which could result in various strange things (user saw it be formatted as "glorkum" but that isn't guaranteed) and there was no update of any attributes or intrinsics conferred by the item, so persistent levitation or water walking or dexterity boost could occur.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)potion.c 3.4 2004/06/28 */
|
||||
/* SCCS Id: @(#)potion.c 3.4 2004/09/22 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1896,10 +1896,12 @@ dodip()
|
||||
} else {
|
||||
if ((omat == PLASTIC || omat == PAPER) && !obj->oartifact)
|
||||
obj->oeroded = MAX_ERODE;
|
||||
pline_The("burning oil %s %s.",
|
||||
pline_The("burning oil %s %s%c",
|
||||
obj->oeroded == MAX_ERODE ? "destroys" : "damages",
|
||||
yname(obj));
|
||||
yname(obj),
|
||||
obj->oeroded == MAX_ERODE ? '!' : '.');
|
||||
if (obj->oeroded == MAX_ERODE) {
|
||||
if (obj->owornmask) remove_worn_item(obj, TRUE);
|
||||
obj_extract_self(obj);
|
||||
obfree(obj, (struct obj *)0);
|
||||
obj = (struct obj *) 0;
|
||||
|
||||
Reference in New Issue
Block a user