fix #H8850 - bless/curse state in perm_invent

Changing an inventory item's bknown flag wasn't followed by a call to
update_inventory() in many circumstances, so information which should
have appeared wasn't showing up until some other event triggered an
update.
This commit is contained in:
PatR
2019-06-04 10:50:24 -07:00
parent ac79fedf60
commit 43afa91ff8
14 changed files with 75 additions and 54 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 objnam.c $NHDT-Date: 1558485650 2019/05/22 00:40:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.241 $ */
/* NetHack 3.6 objnam.c $NHDT-Date: 1559670607 2019/06/04 17:50:07 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.242 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
@@ -450,9 +450,12 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
if (!nn && ocl->oc_uses_known && ocl->oc_unique)
obj->known = 0;
if (!Blind && !distantname)
obj->dknown = TRUE;
obj->dknown = 1;
if (Role_if(PM_PRIEST))
obj->bknown = TRUE;
obj->bknown = 1; /* actively avoid set_bknown();
* we mustn't call update_inventory() now because
* it would call xname() (via doname()) recursively
* and could end up clobbering all the obufs... */
if (iflags.override_ID) {
known = dknown = bknown = TRUE;