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 pickup.c $NHDT-Date: 1559130050 2019/05/29 11:40:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.226 $ */
/* NetHack 3.6 pickup.c $NHDT-Date: 1559670608 2019/06/04 17:50:08 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.227 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -408,8 +408,8 @@ struct obj *obj;
? TRUE : FALSE)
: TRUE; /* catchall: no filters specified, so accept */
if (Role_if(PM_PRIEST))
obj->bknown = TRUE;
if (Role_if(PM_PRIEST) && !obj->bknown)
set_bknown(obj, 1);
/*
* There are three types of filters possible and the first and
@@ -2113,7 +2113,7 @@ register struct obj *obj;
Icebox ? "refrigerate" : "stash", something);
return 0;
} else if ((obj->otyp == LOADSTONE) && obj->cursed) {
obj->bknown = 1;
set_bknown(obj, 1);
pline_The("stone%s won't leave your person.", plur(obj->quan));
return 0;
} else if (obj->otyp == AMULET_OF_YENDOR