From 7c937d21867d4c9e98f2c7218f36b1b13bd06899 Mon Sep 17 00:00:00 2001 From: cohrs Date: Tue, 18 Feb 2003 17:08:04 +0000 Subject: [PATCH] B20001 - shopkeeper angry at unnamed customer The "following" flag could get set in several places where it was not obvious that the customer name would be remembered. Since the shopkeeper should always get angry at the current player, set the name at the same place that the flag is set. --- doc/fixes34.1 | 1 + src/shk.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index ef35cbb05..dfcb17e09 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -390,6 +390,7 @@ wielding Werebane prevents catching lycanthropy via monster attack (but not via eating, nor does it cure an existing case) character inflicted with lycanthropy is vulnerable to Werebane when in human/elf/&c form as well as when in beast form +shopkeeper could get angry without remembering the customer name Platform- and/or Interface-Specific Fixes diff --git a/src/shk.c b/src/shk.c index 971bd58cc..83de96711 100644 --- a/src/shk.c +++ b/src/shk.c @@ -999,6 +999,7 @@ register struct monst *shkp; if(!shkp->isshk) return; rile_shk(shkp); + (void) strncpy(ESHK(shkp)->customer, plname, PL_NSIZ); ESHK(shkp)->following = 1; } @@ -2469,8 +2470,6 @@ register boolean peaceful, silent; if(!silent) { if(cansee(shkp->mx, shkp->my)) { - if(ESHK(shkp)->customer[0] == 0) - (void) strncpy(ESHK(shkp)->customer,plname,PL_NSIZ); Norep("%s booms: \"%s, you are a thief!\"", Monnam(shkp), plname); } else Norep("You hear a scream, \"Thief!\""); -- 2.40.0