From 5679be13f14166141a554f68de4eef4f62cf7cfa Mon Sep 17 00:00:00 2001 From: Tomek Wiernik Date: Wed, 15 Nov 2023 08:50:17 +0100 Subject: [PATCH] Update FishermansLicenseQuiz.java There was an option to reset Collector progress by triggering Quest2 offer by saying exam --- .../server/maps/quests/FishermansLicenseQuiz.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/games/stendhal/server/maps/quests/FishermansLicenseQuiz.java b/src/games/stendhal/server/maps/quests/FishermansLicenseQuiz.java index 92ddf95f61b..3beaa9d67e3 100644 --- a/src/games/stendhal/server/maps/quests/FishermansLicenseQuiz.java +++ b/src/games/stendhal/server/maps/quests/FishermansLicenseQuiz.java @@ -29,6 +29,7 @@ import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.EventRaiser; import games.stendhal.server.entity.npc.SpeakerNPC; +import games.stendhal.server.entity.npc.action.SetQuestAction; import games.stendhal.server.entity.npc.condition.NotCondition; import games.stendhal.server.entity.npc.condition.TriggerInListCondition; import games.stendhal.server.entity.player.Player; @@ -136,7 +137,7 @@ private void putNextFishOnTable() { .getItem(getCurrentSpecies()); fishOnTable.setDescription("You see a fish."); - fishOnTable.setPosition(7, 4); + fishOnTable.setPosition(7, 4); zone.add(fishOnTable); } @@ -177,7 +178,9 @@ public void fire(final Player player, final Sentence sentence, final EventRaiser @Override public void fire(final Player player, final Sentence sentence, final EventRaiser npc) { if (player.isQuestCompleted(FishermansLicenseCollector.QUEST_SLOT)) { - npc.say("You have already got your fisherman's license."); + npc.say("You have already got your fisherman's license."); + } else if(player.hasQuest(FishermansLicenseCollector.QUEST_SLOT)) { + npc.say("I hope you were not lazy and that you brought me some other fish #species."); } else if (player.isQuestCompleted(QUEST_SLOT)) { npc.say("Are you ready for the second part of your exam?"); npc.setCurrentState(ConversationStates.QUEST_2_OFFERED); @@ -198,7 +201,7 @@ public void fire(final Player player, final Sentence sentence, final EventRaiser fisherman.add(ConversationStates.QUEST_OFFERED, ConversationPhrases.NO_MESSAGES, null, ConversationStates.ATTENDING, "Come back when you're ready.", - null); + new SetQuestAction(QUEST_SLOT, "rejected")); fisherman.add(ConversationStates.QUEST_OFFERED, ConversationPhrases.YES_MESSAGES, null,