From 4e4fa1aecac9198bd5b9aa650aadc63dac3b86d8 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Thu, 13 Jun 2024 13:27:53 -0700 Subject: [PATCH] Call learnWordsInCurrentConversation in overloaded SpeakerNPC.say... ...method --- .../stendhal/server/entity/npc/SpeakerNPC.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/games/stendhal/server/entity/npc/SpeakerNPC.java b/src/games/stendhal/server/entity/npc/SpeakerNPC.java index 06b6b87880..9401e69568 100644 --- a/src/games/stendhal/server/entity/npc/SpeakerNPC.java +++ b/src/games/stendhal/server/entity/npc/SpeakerNPC.java @@ -504,6 +504,14 @@ public boolean isTalking() { public void say(final String text) { // turn towards player if necessary, then say it. say(text, true); + } + + protected void say(final String text, final boolean turnToPlayer) { + // be polite and face the player we are talking to + if (turnToPlayer && (attending != null)) { + faceToward(attending); + } + super.say(text); learnWordsInCurrentConversation(text); } @@ -546,15 +554,6 @@ private void learnWordsInCurrentConversation(String text) { } } - protected void say(final String text, final boolean turnToPlayer) { - // be polite and face the player we are talking to - if (turnToPlayer && (attending != null)) { - faceToward(attending); - } - - super.say(text); - } - /** Message when NPC is attending another player. * @param text to say to bothering player * @param action to perform