fix #Q227 - cancelling items in shop entrance (trunk only)
From a bug report: cancelling objects in a shop doorway or one step inside would cause the shopkeeper to brand you a thief. The relevant code is trying to handle the case where you're inside one shop and zap a wand or spell from there into another one; it didn't cope with being in the neutral area of a single shop.
This commit is contained in:
@@ -155,6 +155,7 @@ avoid inappropriate "the corridor disappears" when vault guard gets killed
|
||||
avoid inappropriate "the guard calms down" if vault guard's magic corridor
|
||||
reaches a spot where gold is embedded in the rock
|
||||
adjust message for gas effect from chest trap if hero resists hallucination
|
||||
cancelling non-shop objects in a shop's entrance would upset the shopkeeper
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)mkobj.c 3.5 2005/09/03 */
|
||||
/* SCCS Id: @(#)mkobj.c 3.5 2005/11/16 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -392,6 +392,7 @@ int alter_type;
|
||||
use hero's location */
|
||||
if (!get_obj_location(obj, &ox, &oy, CONTAINED_TOO))
|
||||
ox = u.ux, oy = u.uy;
|
||||
if (!costly_spot(ox, oy)) return;
|
||||
objroom = *in_rooms(ox, oy, SHOPBASE);
|
||||
/* if no shop cares about it, we're done */
|
||||
if (!billable(&shkp, obj, objroom, FALSE)) return;
|
||||
|
||||
Reference in New Issue
Block a user