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 do.c $NHDT-Date: 1559299314 2019/05/31 10:41:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.191 $ */
/* NetHack 3.6 do.c $NHDT-Date: 1559670603 2019/06/04 17:50:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.192 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -286,11 +286,11 @@ register struct obj *obj;
an(hcolor(obj->blessed ? NH_AMBER : NH_BLACK)), doname(obj),
otense(obj, "hit"));
if (!Hallucination)
obj->bknown = 1;
obj->bknown = 1; /* ok to bypass set_bknown() */
} else {
pline("%s %s on the altar.", Doname2(obj), otense(obj, "land"));
if (obj->oclass != COIN_CLASS)
obj->bknown = 1;
obj->bknown = 1; /* ok to bypass set_bknown() */
}
}
@@ -575,7 +575,7 @@ const char *word;
obj->corpsenm ? " any of" : "", plur(obj->quan));
}
obj->corpsenm = 0; /* reset */
obj->bknown = 1;
set_bknown(obj, 1);
return FALSE;
}
if (obj->otyp == LEASH && obj->leashmon != 0) {