more dropping unpaid shop items inside engulfer

I thought that the earlier fix for #H2504 was too easy for anything
shop related.  It didn't deal sensibly with containers owned by hero
but holding unpaid shop goods.
This commit is contained in:
PatR
2018-12-17 00:45:00 -08:00
parent a47ad0b918
commit a3a676a6bd
4 changed files with 29 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 do.c $NHDT-Date: 1545005168 2018/12/17 00:06:08 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.179 $ */
/* NetHack 3.6 do.c $NHDT-Date: 1545036287 2018/12/17 08:44:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.180 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -588,8 +588,7 @@ register struct obj *obj;
/* doname can call s_suffix, reusing its buffer */
Strcpy(monbuf, s_suffix(mon_nam(u.ustuck)));
onam_p = obj->unpaid ? yobjnam(obj, (char *) 0) : doname(obj);
onam_p = ckunpaid(obj) ? yobjnam(obj, (char *) 0) : doname(obj);
You("drop %s into %s %s.", onam_p, monbuf,
mbodypart(u.ustuck, STOMACH));
}
@@ -684,7 +683,7 @@ boolean with_impact;
could_grow = (obj->corpsenm == PM_WRAITH);
could_heal = (obj->corpsenm == PM_NURSE);
}
if (obj->unpaid)
if (ckunpaid(obj))
(void) stolen_value(obj, u.ux, u.uy, TRUE, FALSE);
(void) mpickobj(u.ustuck, obj);
if (is_animal(u.ustuck->data)) {