bad "cad" message
From the newsgroup: taking a shop-owned pick-axe out of a container inside a shop gave a misleading message telling the player to take the pick-axe out of the shop. It was caused by using the object's `unpaid' field before addtobill() had set it.
This commit is contained in:
@@ -218,6 +218,7 @@ Shop walls wouldn't be restored if there were pits in the way.
|
|||||||
If there were a hole outside a shop, you could kick stuff out of the door
|
If there were a hole outside a shop, you could kick stuff out of the door
|
||||||
into the hole without the shopkeeper noticing.
|
into the hole without the shopkeeper noticing.
|
||||||
curing hallucination while wielding Grayswandir should print a message
|
curing hallucination while wielding Grayswandir should print a message
|
||||||
|
removing unowned pick-axe from container in shop gave inappropriate message
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+3
-4
@@ -1,4 +1,4 @@
|
|||||||
/* SCCS Id: @(#)pickup.c 3.4 2002/05/15 */
|
/* SCCS Id: @(#)pickup.c 3.4 2002/08/21 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1871,15 +1871,14 @@ register struct obj *obj;
|
|||||||
}
|
}
|
||||||
/* simulated point of time */
|
/* simulated point of time */
|
||||||
|
|
||||||
if (is_pick(obj) && !obj->unpaid && *u.ushops && shop_keeper(*u.ushops))
|
|
||||||
verbalize("You sneaky cad! Get out of here with that pick!");
|
|
||||||
if(!obj->unpaid && !carried(current_container) &&
|
if(!obj->unpaid && !carried(current_container) &&
|
||||||
costly_spot(current_container->ox, current_container->oy)) {
|
costly_spot(current_container->ox, current_container->oy)) {
|
||||||
|
|
||||||
obj->ox = current_container->ox;
|
obj->ox = current_container->ox;
|
||||||
obj->oy = current_container->oy;
|
obj->oy = current_container->oy;
|
||||||
addtobill(obj, FALSE, FALSE, FALSE);
|
addtobill(obj, FALSE, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
|
if (is_pick(obj) && !obj->unpaid && *u.ushops && shop_keeper(*u.ushops))
|
||||||
|
verbalize("You sneaky cad! Get out of here with that pick!");
|
||||||
|
|
||||||
otmp = addinv(obj);
|
otmp = addinv(obj);
|
||||||
loadlev = near_capacity();
|
loadlev = near_capacity();
|
||||||
|
|||||||
Reference in New Issue
Block a user