Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-12-25 22:12:44 -05:00
5 changed files with 44 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 shk.c $NHDT-Date: 1545774524 2018/12/25 21:48:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.145 $ */
/* NetHack 3.6 shk.c $NHDT-Date: 1545786461 2018/12/26 01:07:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.147 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1969,7 +1969,7 @@ register struct obj *obj;
if (*u.ushops && obj->oclass != COIN_CLASS
&& obj != uball && obj != uchain
&& get_obj_location(obj, &x, &y, 0)
&& get_obj_location(obj, &x, &y, CONTAINED_TOO)
&& *in_rooms(u.ux, u.uy, SHOPBASE) == *in_rooms(x, y, SHOPBASE)
&& (shkp = shop_keeper(inside_shop(x, y))) != 0 && inhishop(shkp)) {
cost = obj->no_charge ? 0L : obj->quan * get_cost(obj, shkp);
@@ -2806,11 +2806,13 @@ boolean peaceful, silent;
if (!billable(&shkp, obj, roomno, FALSE)) {
/* things already on the bill yield a not-billable result, so
we need to check bill before deciding that shk doesn't care */
if ((bp = onbill(obj, shkp, FALSE)) == 0)
if ((bp = onbill(obj, shkp, FALSE)) != 0) {
/* shk does care; take obj off bill to avoid double billing */
billamt = bp->bquan * bp->price;
sub_one_frombill(obj, shkp);
}
if (!bp && !u_count)
return 0L;
/* shk does care; take obj off bill to avoid double billing */
billamt = bp->bquan * bp->price;
sub_one_frombill(obj, shkp);
}
if (obj->oclass == COIN_CLASS) {