]> granicus.if.org Git - nethack/commitdiff
WIZKIT gold items
authorcohrs <cohrs>
Sun, 3 Mar 2002 03:36:33 +0000 (03:36 +0000)
committercohrs <cohrs>
Sun, 3 Mar 2002 03:36:33 +0000 (03:36 +0000)
- if !GOLDOBJ, putting gold in the WIZKIT would add zerobj to the inventory.
  This shows up when you "Da" and get a message like "you drop 0 glorkum 0 0 0"

src/files.c

index 21da5835f8b51cbf1998cfd601919e61f8470923..615062a038d064674a403bf8b0cdf7380bae7bee 100644 (file)
@@ -1677,11 +1677,12 @@ read_wizkit()
                if ((ep = index(buf, '\n'))) *ep = '\0';
                if (buf[0]) {
                        otmp = readobjnam(buf, (struct obj *)0);
-                       if (otmp)
+                       if (otmp) {
+                           if (otmp != &zeroobj)
                                otmp = addinv(otmp);
-                       else {
-                               raw_printf("Bad wizkit item: \"%.50s\"", buf);
-                               wait_synch();
+                       else {
+                           raw_printf("Bad wizkit item: \"%.50s\"", buf);
+                           wait_synch();
                        }
                }
        }