From: cohrs Date: Tue, 19 Feb 2002 05:10:31 +0000 (+0000) Subject: permanent inventory window updates X-Git-Tag: MOVE2GIT~3158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d645467f4067a24651cbcc7d62fa65f144387d37;p=nethack permanent inventory window updates Addresses the follwing missing updates: - Quest Artifact identification by Quest Leader. - Rust damage from a rust trap. - Remove curse as a result of prayer (both fixing TROUBLE_CURSED_* and the blessed-remove-curse boon.) - Charging via PYEC --- diff --git a/src/artifact.c b/src/artifact.c index 1255362cc..e8c666de9 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1166,8 +1166,10 @@ arti_invoke(obj) obj->age = 0; return 0; } - b_effect = obj->blessed && (Role_switch == oart->role || !oart->role); + b_effect = obj->blessed && + (Role_switch == oart->role || !oart->role); recharge(otmp, b_effect ? 1 : obj->cursed ? -1 : 0); + update_inventory(); break; } case LEV_TELE: diff --git a/src/pray.c b/src/pray.c index df938135f..3c3124fa6 100644 --- a/src/pray.c +++ b/src/pray.c @@ -338,6 +338,7 @@ decurse: what ? what : (const char *)aobjnam(otmp, "softly glow"), hcolor(amber)); + update_inventory(); break; case TROUBLE_POISONED: if (Hallucination) @@ -854,6 +855,7 @@ pleased(g_align) break; case 4: { register struct obj *otmp; + int any = 0; if (Blind) You_feel("the power of %s.", u_gname()); @@ -866,9 +868,11 @@ pleased(g_align) Your("%s %s.", aobjnam(otmp, "softly glow"), hcolor(amber)); otmp->bknown = TRUE; + ++any; } } } + if (any) update_inventory(); break; } case 5: { diff --git a/src/quest.c b/src/quest.c index 1228486f8..01d8bf7fd 100644 --- a/src/quest.c +++ b/src/quest.c @@ -195,6 +195,7 @@ struct obj *obj; /* quest artifact; possibly null if carrying Amulet */ /* behave as if leader imparts sufficient info about the quest artifact */ fully_identify_obj(obj); + update_inventory(); } } diff --git a/src/trap.c b/src/trap.c index 2522f2ed6..25cf6422a 100644 --- a/src/trap.c +++ b/src/trap.c @@ -734,6 +734,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); (void) rust_dmg(uarmu, "shirt", 1, TRUE, &youmonst); #endif } + update_inventory(); break; case FIRE_TRAP: