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.
This commit is contained in:
cohrs
2003-05-21 17:12:47 +00:00
parent bbaa40993b
commit e6ed77f634
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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;