Merge remote-tracking branch 'github/tung/shop-floor-nested-loot' into NetHack-3.6.0
This commit is contained in:
+6
-7
@@ -2024,15 +2024,14 @@ register struct obj *obj;
|
|||||||
(void) snuff_lit(obj);
|
(void) snuff_lit(obj);
|
||||||
|
|
||||||
if (floor_container && costly_spot(u.ux, u.uy)) {
|
if (floor_container && costly_spot(u.ux, u.uy)) {
|
||||||
if (obj->oclass == COIN_CLASS) {
|
/* defer gold until after put-in message */
|
||||||
; /* defer gold until after put-in message */
|
if (obj->oclass != COIN_CLASS) {
|
||||||
} else if (current_container->no_charge && !obj->unpaid) {
|
|
||||||
/* don't sell when putting the item into your own container */
|
|
||||||
obj->no_charge = 1;
|
|
||||||
} else {
|
|
||||||
/* sellobj() will take an unpaid item off the shop bill */
|
/* sellobj() will take an unpaid item off the shop bill */
|
||||||
was_unpaid = obj->unpaid ? TRUE : FALSE;
|
was_unpaid = obj->unpaid ? TRUE : FALSE;
|
||||||
sellobj_state(SELL_DELIBERATE);
|
/* don't sell when putting the item into your own container,
|
||||||
|
* but handle billing correctly */
|
||||||
|
sellobj_state(current_container->no_charge
|
||||||
|
? SELL_DONTSELL : SELL_DELIBERATE);
|
||||||
sellobj(obj, u.ux, u.uy);
|
sellobj(obj, u.ux, u.uy);
|
||||||
sellobj_state(SELL_NORMAL);
|
sellobj_state(SELL_NORMAL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2889,12 +2889,13 @@ xchar x, y;
|
|||||||
offer = ltmp + cltmp;
|
offer = ltmp + cltmp;
|
||||||
|
|
||||||
/* get one case out of the way: nothing to sell, and no gold */
|
/* get one case out of the way: nothing to sell, and no gold */
|
||||||
if (!isgold && ((offer + gltmp) == 0L || sell_how == SELL_DONTSELL)) {
|
if (!(isgold || cgold)
|
||||||
|
&& ((offer + gltmp) == 0L || sell_how == SELL_DONTSELL)) {
|
||||||
boolean unpaid = is_unpaid(obj);
|
boolean unpaid = is_unpaid(obj);
|
||||||
|
|
||||||
if (container) {
|
if (container) {
|
||||||
dropped_container(obj, shkp, FALSE);
|
dropped_container(obj, shkp, FALSE);
|
||||||
if (!obj->unpaid && !saleitem)
|
if (!obj->unpaid)
|
||||||
obj->no_charge = 1;
|
obj->no_charge = 1;
|
||||||
if (unpaid)
|
if (unpaid)
|
||||||
subfrombill(obj, shkp);
|
subfrombill(obj, shkp);
|
||||||
@@ -2965,11 +2966,11 @@ xchar x, y;
|
|||||||
currency(eshkp->credit));
|
currency(eshkp->credit));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!offer) {
|
if (!offer || sell_how == SELL_DONTSELL) {
|
||||||
if (!isgold) {
|
if (!isgold) {
|
||||||
if (container)
|
if (container)
|
||||||
dropped_container(obj, shkp, FALSE);
|
dropped_container(obj, shkp, FALSE);
|
||||||
if (!obj->unpaid && !saleitem)
|
if (!obj->unpaid)
|
||||||
obj->no_charge = 1;
|
obj->no_charge = 1;
|
||||||
subfrombill(obj, shkp);
|
subfrombill(obj, shkp);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user