]> granicus.if.org Git - nethack/commitdiff
permanent inventory window updates
authorcohrs <cohrs>
Tue, 19 Feb 2002 05:10:31 +0000 (05:10 +0000)
committercohrs <cohrs>
Tue, 19 Feb 2002 05:10:31 +0000 (05:10 +0000)
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

src/artifact.c
src/pray.c
src/quest.c
src/trap.c

index 1255362ccf2f0261eddc7e3fd3835905b7f21ee1..e8c666de929de96d22f41a8776475d434391e475 100644 (file)
@@ -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:
index df938135fc3ea017b36dd840f1fafc90caf8eed1..3c3124fa665eb2f482881d3bb118c946db80befd 100644 (file)
@@ -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: {
index 1228486f8fd5f36274bd160538d0250372b893d3..01d8bf7fd7bda5d4dd8d1f08a0a192cd2ee8e814 100644 (file)
@@ -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();
        }
 }
 
index 2522f2ed620e7ecc5a995fcfa4fd1d0a3b89e230..25cf6422a5f190d45b834896e3fc4d9221d85cb1 100644 (file)
@@ -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: