sleeping shopkeeper

Fix the reported problem of a sleeping shopkeeper advising you
to be careful about digging.
This commit is contained in:
nethack.rankin
2002-10-01 08:51:28 +00:00
parent c3a9637ba7
commit b541bbef1d
2 changed files with 9 additions and 5 deletions

View File

@@ -263,6 +263,7 @@ likewise for currently quivered ammo among choices for 'Q'
only include unknown gems as likely choices when applying known touchstone only include unknown gems as likely choices when applying known touchstone
prevent mbodypart() from returning animal parts for lights prevent mbodypart() from returning animal parts for lights
removing a ring might relearn what it is after amnesia removing a ring might relearn what it is after amnesia
sleeping shopkeeper shouldn't talk to digging player
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)shk.c 3.4 2002/04/12 */ /* SCCS Id: @(#)shk.c 3.4 2002/09/28 */
/* 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. */
@@ -3303,14 +3303,17 @@ shopdig(fall)
register int fall; register int fall;
{ {
register struct monst *shkp = shop_keeper(*u.ushops); register struct monst *shkp = shop_keeper(*u.ushops);
int lang = 0; int lang;
char *grabs = "grabs"; const char *grabs = "grabs";
if(!shkp) return; if(!shkp) return;
/* 0 == can't speak, 1 == makes animal noises, 2 == speaks */ /* 0 == can't speak, 1 == makes animal noises, 2 == speaks */
if (!is_silent(shkp->data) && shkp->data->msound <= MS_ANIMAL) lang = 0;
lang = 1; if (shkp->msleeping || !shkp->mcanmove || is_silent(shkp->data))
; /* lang stays 0 */
else if (shkp->data->msound <= MS_ANIMAL)
lang = 1;
else if (shkp->data->msound >= MS_HUMANOID) else if (shkp->data->msound >= MS_HUMANOID)
lang = 2; lang = 2;