]> granicus.if.org Git - nethack/commitdiff
talking to quest guardians from other class
authornethack.allison <nethack.allison>
Tue, 19 Aug 2003 04:56:23 +0000 (04:56 +0000)
committernethack.allison <nethack.allison>
Tue, 19 Aug 2003 04:56:23 +0000 (04:56 +0000)
prevent quest guardians from other classes from talking to you as if they
were your quest guardian

doc/fixes34.2
src/sounds.c

index 0e2a194457d8d94cd73b3af56383a2a0fc64b7cf..41c40f33fc1d69d0d39bb6f3f8f2c29098f8cc05 100644 (file)
@@ -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
index fd10df1348f57e682a6efc5def6a7c933a289ebc..a50b1b17a073a560420c1446cc5e11752a4482f0 100644 (file)
@@ -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.";