itemized billing vs persistent inventory, round II
Reported by entrez: buying an unpaid item using itemized billing used to result in the price information for unpaid items disappearing when they get shown by perm_invent. (Their status as unpaid didn't change; persistent inventory just got redrawn without cost information.) The fix for that didn't handle buying a used-up item. There's no invent update for the gone-item item but there is one for moving gold out of hero's inventory to add to shopkeeper's inventory. The vanishing price phenomenon applied to that situation too. I can't think of any situation where persistent inventory would want to hide unpaid status and/or cost, so always prevent those from being excluded during perm_invent update.
This commit is contained in:
@@ -1250,6 +1250,10 @@ after the fix for zombie reviving near hero (which now interrupts hero's
|
|||||||
it revived on the same turn that eating the corpse would finish
|
it revived on the same turn that eating the corpse would finish
|
||||||
a wizard's starting equipment was supposed to include a random spellbook of
|
a wizard's starting equipment was supposed to include a random spellbook of
|
||||||
spell level 1 through 3 but it was being foced to be level 1
|
spell level 1 through 3 but it was being foced to be level 1
|
||||||
|
earlier fix for prices of unpaid objects going away in persistent inventory
|
||||||
|
display when hero bought something during itemized billing didn't work
|
||||||
|
if paying for a used-up shop item--prices of any unpaid items vanished
|
||||||
|
when inventory got updated to reflect transfer of hero's gold to shk
|
||||||
|
|
||||||
curses: 'msg_window' option wasn't functional for curses unless the binary
|
curses: 'msg_window' option wasn't functional for curses unless the binary
|
||||||
also included tty support
|
also included tty support
|
||||||
|
|||||||
15
src/invent.c
15
src/invent.c
@@ -2405,6 +2405,8 @@ learn_unseen_invent(void)
|
|||||||
void
|
void
|
||||||
update_inventory(void)
|
update_inventory(void)
|
||||||
{
|
{
|
||||||
|
boolean save_suppress_price;
|
||||||
|
|
||||||
if (suppress_map_output()) /* despite name, used for perm_invent too */
|
if (suppress_map_output()) /* despite name, used for perm_invent too */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -2414,8 +2416,21 @@ update_inventory(void)
|
|||||||
* We currently don't skip this call when iflags.perm_invent is False
|
* We currently don't skip this call when iflags.perm_invent is False
|
||||||
* because curses uses that to disable a previous perm_invent window
|
* because curses uses that to disable a previous perm_invent window
|
||||||
* (after toggle via 'O'; perhaps the options code should handle that).
|
* (after toggle via 'O'; perhaps the options code should handle that).
|
||||||
|
*
|
||||||
|
* perm_invent might get updated while some code is avoiding price
|
||||||
|
* feedback during obj name formatting for messages. Temporarily
|
||||||
|
* force 'normal' formatting during the perm_invent update. (Cited
|
||||||
|
* example was an update triggered by change in invent gold when
|
||||||
|
* transferring some to shk during itemized billing. A previous fix
|
||||||
|
* attempt in the shop code handled it for unpaid items but not for
|
||||||
|
* paying for used-up shop items; that follows a different code path.)
|
||||||
*/
|
*/
|
||||||
|
save_suppress_price = iflags.suppress_price;
|
||||||
|
iflags.suppress_price = FALSE;
|
||||||
|
|
||||||
(*windowprocs.win_update_inventory)(0);
|
(*windowprocs.win_update_inventory)(0);
|
||||||
|
|
||||||
|
iflags.suppress_price = save_suppress_price;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* the #perminv command - call interface's persistent inventory routine */
|
/* the #perminv command - call interface's persistent inventory routine */
|
||||||
|
|||||||
Reference in New Issue
Block a user