]> granicus.if.org Git - nethack/commitdiff
ensure dummy obj owornmask is clear (from Alex)
authornhmall <mjnh@persona.ca>
Fri, 5 Jun 2015 10:36:00 +0000 (06:36 -0400)
committernhmall <mjnh@persona.ca>
Fri, 5 Jun 2015 10:36:00 +0000 (06:36 -0400)
Another minor oddity (did not have time to trace it). Charges for damaged
weapon refer to it as "weapon in hand":

--
As you read the scroll, it disappears.  Being confused, you mispronounce
the magic words...  Demirci's long sword is covered by a mottled purple
glow!  "You degrade that long sword, you pay for it!"
Call a scroll labeled VERR YED HORRE:
What do you want to wield? [- ajrw or ?*] j
j - a rustproof athame named Magicbane (weapon in hand) (10 aum).
What do you want to drop? [$a-df-rtwxM or ?*] r
You drop a long sword (40 aum).
Demirci offers 8 gold pieces for your long sword.  Sell it? [ynaq] (y) y
You sold a long sword (40 aum) for 8 gold pieces.
You see here a scale mail (250 aum).
You see here a ring mail (250 aum).
A rustproof long sword (weapon in hand) (40 aum) for 15 zorkmids.  Pay?
[yn] (n)
You paid for a rustproof long sword (weapon in hand) (40 aum) at a cost of
15 gold pieces.  "Thank you for shopping in Demirci's used armor
dealership!"
--

src/mkobj.c

index 337d6d9febfca566e50f252a131a38a06098b4dc..16c839ffc9dbb365dd6c36e28406fe94d5f8d4ec 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 mkobj.c $NHDT-Date: 1432512771 2015/05/25 00:12:51 $  $NHDT-Branch: master $:$NHDT-Revision: 1.101 $ */
+/* NetHack 3.6 mkobj.c $NHDT-Date: 1433500549 2015/06/05 10:35:49 $  $NHDT-Branch: master $:$NHDT-Revision: 1.102 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -520,6 +520,7 @@ register struct obj *otmp;
         free_omid(dummy); /* only one association with m_id*/
     if (Is_candle(dummy))
         dummy->lamplit = 0;
+    dummy->owornmask = 0L; /* dummy object is not worn */
     addtobill(dummy, FALSE, TRUE, TRUE);
     if (cost)
         alter_cost(dummy, -cost);