]> granicus.if.org Git - nethack/commitdiff
bad "cad" message
authornethack.rankin <nethack.rankin>
Thu, 22 Aug 2002 01:23:31 +0000 (01:23 +0000)
committernethack.rankin <nethack.rankin>
Thu, 22 Aug 2002 01:23:31 +0000 (01:23 +0000)
     From the newsgroup:  taking a shop-owned pick-axe out of a
container inside a shop gave a misleading message telling the
player to take the pick-axe out of the shop.  It was caused by
using the object's `unpaid' field before addtobill() had set it.

doc/fixes34.1
src/pickup.c

index 1e018ac52a6fbe60e58d3f876c73c534caf9683f..bab8ca1edf5bb2c717c2f16dc7c80f98e3378f0c 100644 (file)
@@ -218,6 +218,7 @@ Shop walls wouldn't be restored if there were pits in the way.
 If there were a hole outside a shop, you could kick stuff out of the door
        into the hole without the shopkeeper noticing.
 curing hallucination while wielding Grayswandir should print a message
+removing unowned pick-axe from container in shop gave inappropriate message
 
 
 Platform- and/or Interface-Specific Fixes
index c6feb9599a94d80ca69918a52687998f7ca68780..1df2f4353eb934449b0c4507537fc4671be36d25 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)pickup.c   3.4     2002/05/15      */
+/*     SCCS Id: @(#)pickup.c   3.4     2002/08/21      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1871,15 +1871,14 @@ register struct obj *obj;
        }
        /* simulated point of time */
 
-       if (is_pick(obj) && !obj->unpaid && *u.ushops && shop_keeper(*u.ushops))
-               verbalize("You sneaky cad! Get out of here with that pick!");
        if(!obj->unpaid && !carried(current_container) &&
             costly_spot(current_container->ox, current_container->oy)) {
-
                obj->ox = current_container->ox;
                obj->oy = current_container->oy;
                addtobill(obj, FALSE, FALSE, FALSE);
        }
+       if (is_pick(obj) && !obj->unpaid && *u.ushops && shop_keeper(*u.ushops))
+               verbalize("You sneaky cad! Get out of here with that pick!");
 
        otmp = addinv(obj);
        loadlev = near_capacity();