From: nethack.allison Date: Tue, 19 Aug 2003 04:56:23 +0000 (+0000) Subject: talking to quest guardians from other class X-Git-Tag: MOVE2GIT~1844 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61c3188405ee009e72803cb10ba07da77f583d34;p=nethack talking to quest guardians from other class prevent quest guardians from other classes from talking to you as if they were your quest guardian --- 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.";