-$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.268 $ $NHDT-Date: 1551493951 2019/03/02 02:32:31 $
+$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.269 $ $NHDT-Date: 1551739190 2019/03/04 22:39:50 $
This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however,
using ':' to look at current location could cause a crash
when items were on the floor just inside a shop's door where the shopkeeper
doesn't buy and sell stuff, those items showed a 'for sale' price
+applying a container while inside a shop and initiating a put-in operation
+ would show non-empty containers in inventory--including the one being
+ applied--with "for sale" amounts for the prices of their contents
after 'when donning armor, enchanment becomes known even if interrupted' fix,
wearing a leather jacket, fedora, or dented pot (no multi-turn delay
worn in a slot which usually has one) didn't make +/- become known
+when persistent inventory window is enabled, wearing armor didn't immediately
+ update it with armor's newly observed +/- value
having an artifact wish be refused ("for a moment you feel <artifact> in
your hands, but it disappears") would immediately segfault
-when persistent inventory window is enabled, wearing armor doesn't immediately
- update it with armor's newly observed +/- value
tty: turn off an optimization that is the suspected cause of Windows reported
partial status lines following level changes
tty: ensure that current status fields are always copied to prior status
-/* NetHack 3.6 shk.c $NHDT-Date: 1549921170 2019/02/11 21:39:30 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.156 $ */
+/* NetHack 3.6 shk.c $NHDT-Date: 1551738135 2019/03/04 22:22:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.157 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
debugpline0("dopay: null shkp.");
return 0;
}
-proceed:
+ proceed:
eshkp = ESHK(shkp);
ltmp = eshkp->robbed;
}
}
}
- thanks:
+ thanks:
if (!itemize)
update_inventory(); /* Done in dopayobj() if itemize. */
}
eshkp->following = 0;
eshkp->robbed = 0L;
}
- skip:
+ skip:
/* in case we create bones */
rouse_shk(shkp, FALSE); /* wake up */
if (!inhishop(shkp))
if (carried(top) ? (int) obj->unpaid : !*nochrg)
cost = obj->quan * get_cost(obj, shkp);
if (Has_contents(obj) && !freespot)
- cost += contained_cost(obj, shkp, 0L, FALSE, FALSE);
+ cost += contained_cost(obj, shkp, 0L, FALSE, TRUE);
}
return cost;
}
boolean usell;
boolean unpaid_only;
{
- register struct obj *otmp;
+ register struct obj *otmp, *top;
+ xchar x, y;
+ boolean on_floor, freespot;
+
+ for (top = obj; top->where == OBJ_CONTAINED; top = top->ocontainer)
+ continue;
+ /* pick_obj() removes item from floor, adds it to shop bill, then
+ puts it in inventory; behave as if it is still on the floor
+ during the add-to-bill portion of that situation */
+ on_floor = (top->where == OBJ_FLOOR || top->where == OBJ_FREE);
+ if (top->where == OBJ_FREE || !get_obj_location(top, &x, &y, 0))
+ x = u.ux, y = u.uy;
+ freespot = (on_floor && x == ESHK(shkp)->shk.x && y == ESHK(shkp)->shk.y);
/* price of contained objects; "top" container handled by caller */
for (otmp = obj->cobj; otmp; otmp = otmp->nobj) {
&& !(Is_candle(otmp)
&& otmp->age < 20L * (long) objects[otmp->otyp].oc_cost))
price += set_cost(otmp, shkp);
- } else if (!otmp->no_charge && (otmp->unpaid || !unpaid_only)) {
- price += get_cost(otmp, shkp) * otmp->quan;
+ } else {
+ /* no_charge is only set for floor items (including
+ contents of floor containers) inside shop proper;
+ items on freespot are implicitly 'no charge' */
+ if (on_floor ? (!otmp->no_charge && !freespot)
+ : (otmp->unpaid || !unpaid_only))
+ price += get_cost(otmp, shkp) * otmp->quan;
}
if (Has_contents(otmp))
putstr(datawin, 0, "");
putstr(datawin, 0, buf_p);
display_nhwindow(datawin, FALSE);
-quit:
+ quit:
destroy_nhwindow(datawin);
return 0;
}
if ((um_dist(x, y, 1) && !uinshp) || cant_mollify
|| (money_cnt(invent) + ESHK(shkp)->credit) < cost_of_damage
|| !rn2(50)) {
- getcad:
+ getcad:
if (muteshk(shkp)) {
if (animal && shkp->mcanmove && !shkp->msleeping)
yelp(shkp);