From: nethack.rankin Date: Thu, 22 Aug 2002 01:23:31 +0000 (+0000) Subject: bad "cad" message X-Git-Tag: MOVE2GIT~2477 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5c24386526d45f2c019ea0ee6c3194b64782117;p=nethack bad "cad" message 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. --- diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 1e018ac52..bab8ca1ed 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/src/pickup.c b/src/pickup.c index c6feb9599..1df2f4353 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -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();