fix pull request #541 - itemized shop billing

when perm_invent is displayed.  The persistent inventory window
showed unpaid items with their prices, but when using itemized
billing those prices went away when an item was purchased.

The prices and item-by-item prompting continued correctly with
remaining unpaid items; only the perm_invent display was affected.

Fixes #541
This commit is contained in:
PatR
2021-07-02 18:52:17 -07:00
parent 552431e966
commit 0ba7ff46b9
2 changed files with 10 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.578 $ $NHDT-Date: 1624656533 2021/06/25 21:28:53 $
NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.581 $ $NHDT-Date: 1625277130 2021/07/03 01:52:10 $
General Fixes and Modified Features
-----------------------------------
@@ -548,8 +548,11 @@ using a bullwhip to snatch a wielded cockatrice corpse from a monster when not
make fire-command autowield an appropriate launcher and add fireassist boolean
option to toggle the assistance off
Angels and priests were always described as "the {Angel,priest,high priest} of
<deity>" when first two should have been "{an Angel,a high priest}..."
<deity>" when first two should have been "{an Angel,a priest}..."
shopkeepers can remove pits and webs
perm_invent: when buying shop goods using itemized purchasing while persistent
inventory window was enabled, the prices of unpaid items went away as
soon as any item was bought (actual item-by-item purchase worked ok)
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 shk.c $NHDT-Date: 1620861209 2021/05/12 23:13:29 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.197 $ */
/* NetHack 3.7 shk.c $NHDT-Date: 1625277130 2021/07/03 01:52:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.202 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1621,6 +1621,8 @@ dopayobj(
ltmp, "");
obj->quan = save_quan; /* restore original count */
/* quan => amount just bought, save_quan => remaining unpaid count */
iflags.suppress_price--; /* before update_inventory() below */
if (consumed) {
if (quan != bp->bquan) {
/* eliminate used-up portion; remainder is still unpaid */
@@ -1634,9 +1636,9 @@ dopayobj(
dealloc_obj(obj);
*obj_p = 0; /* destroy pointer to freed object */
}
} else if (itemize)
} else if (itemize) {
update_inventory(); /* Done just once in dopay() if !itemize. */
iflags.suppress_price--;
}
return buy;
}