From 61c3188405ee009e72803cb10ba07da77f583d34 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Tue, 19 Aug 2003 04:56:23 +0000 Subject: [PATCH] talking to quest guardians from other class prevent quest guardians from other classes from talking to you as if they were your quest guardian --- doc/fixes34.2 | 2 ++ src/sounds.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 0e2a19445..41c40f33f 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -133,6 +133,8 @@ digging a pit while stuck in the floor should always free the player quest guardians can no longer be created via stone-to-flesh on their statue stone-to-flesh no longer silently ignored by a statue of a unique monster wishing for quest guardian corpse now gives a generic corpse of the species +prevent quest guardians from other classes from talking to you as if they + were your quest guardian Platform- and/or Interface-Specific Fixes diff --git a/src/sounds.c b/src/sounds.c index fd10df134..a50b1b17a 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -435,6 +435,12 @@ register struct monst *mtmp; if (!flags.soundok) return(0); if (is_silent(ptr)) return(0); + /* Make sure its your role's quest quardian; adjust if not */ + if (ptr->msound == MS_GUARDIAN && ptr != &mons[urole.guardnum]) { + int mndx = monsndx(ptr); + ptr = &mons[genus(mndx)]; + } + /* be sure to do this before talking; the monster might teleport away, in * which case we want to check its pre-teleport position */ @@ -578,7 +584,7 @@ register struct monst *mtmp; pline_msg = "squeaks."; break; case MS_SQAWK: - if (mtmp->data == &mons[PM_RAVEN] && !mtmp->mpeaceful) + if (ptr == &mons[PM_RAVEN] && !mtmp->mpeaceful) verbl_msg = "Nevermore!"; else pline_msg = "squawks."; -- 2.40.0