From e6ed77f634955fcc0195dd7977f33de8ac9c847d Mon Sep 17 00:00:00 2001 From: cohrs Date: Wed, 21 May 2003 17:12:47 +0000 Subject: [PATCH] U464 - picking up items while swallowed in a shop The bug report referred to greased hands, but that doesn't affect the behavior. If you drop an object while swallowed or engulfed in a shop, and that object had previously been picked up from the shop floor, the object was treated as costly. In some cases, this could result in impossible errors later on. Perhaps object ox & oy should be modified when in player/monster inventory, but this fix addresses the specific problem by not doing the costly check while swallowed. --- doc/fixes34.2 | 1 + src/pickup.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/fixes34.2 b/doc/fixes34.2 index eabb25d5c..1e503d048 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -71,6 +71,7 @@ ensure proper message ordering for boulder trap messages clean up data set by join_map that is overlaid by MAPs on special levels clarify disclose option default in opthelp, and support "all" as old help said add more calls to update_inventory as the inventory changes +don't charge for items picked up from monster's interior while swallowed Platform- and/or Interface-Specific Fixes diff --git a/src/pickup.c b/src/pickup.c index af65ffbef..55414691e 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1302,8 +1302,8 @@ boolean telekinesis; /* not picking it up directly by hand */ } /* - * Do the actual work of picking otmp from the floor and putting - * it in the hero's inventory. Take care of billing. Return a + * Do the actual work of picking otmp from the floor or monster's interior + * and putting it in the hero's inventory. Take care of billing. Return a * pointer to the object where otmp ends up. This may be different * from otmp because of merging. * @@ -1314,7 +1314,7 @@ pick_obj(otmp) struct obj *otmp; { obj_extract_self(otmp); - if (otmp != uball && costly_spot(otmp->ox, otmp->oy)) { + if (!u.uswallow && otmp != uball && costly_spot(otmp->ox, otmp->oy)) { char saveushops[5], fakeshop[2]; /* addtobill cares about your location rather than the object's; -- 2.40.0