]> granicus.if.org Git - nethack/commitdiff
B20001 - shopkeeper angry at unnamed customer
authorcohrs <cohrs>
Tue, 18 Feb 2003 17:08:04 +0000 (17:08 +0000)
committercohrs <cohrs>
Tue, 18 Feb 2003 17:08:04 +0000 (17:08 +0000)
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
src/shk.c

index ef35cbb05d6bf652656ca82765065a181c3d3e8f..dfcb17e09963b339d6a5b3171a783acb5c825b2a 100644 (file)
@@ -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
index 971bd58cc63b21d730b5f24425ce9ce95e00257b..83de9671168a5c0c5094cb5efd4a00cb0896743d 100644 (file)
--- 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!\"");