From 2daf71864128dafca124f049ad330c077321d075 Mon Sep 17 00:00:00 2001 From: Hendrik Brummermann Date: Sun, 17 Sep 2023 21:25:57 +0200 Subject: [PATCH] simulate ItemDeliveryQuest --- .../quest/DeliverItemQuestOfferBuilder.java | 25 +++++++++++++++++++ .../entity/npc/quest/DeliverItemTask.java | 4 +-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/games/stendhal/server/entity/npc/quest/DeliverItemQuestOfferBuilder.java b/src/games/stendhal/server/entity/npc/quest/DeliverItemQuestOfferBuilder.java index f4521562b27..0d6271c2d5f 100644 --- a/src/games/stendhal/server/entity/npc/quest/DeliverItemQuestOfferBuilder.java +++ b/src/games/stendhal/server/entity/npc/quest/DeliverItemQuestOfferBuilder.java @@ -158,7 +158,32 @@ public void build(SpeakerNPC npc, String questSlot, QuestTaskBuilder task, ChatC } ((DeliverItemTask) task).prepareBaker(); + } + @Override + void simulateFirst(String npc, QuestSimulator simulator) { + simulator.info("Player is in a non-human form."); + simulator.info(""); + simulator.playerSays("hi"); + simulator.playerSays("quest"); + simulator.npcSays(npc, respondIfUnableToWearUniform); + simulator.playerSays("bye"); + simulator.info(""); + simulator.info("Player becomes a human."); + simulator.info(""); + + super.simulateFirst(npc, simulator); + + simulator.info("Time passes."); + simulator.info(""); + + simulator.playerSays("hi"); + simulator.playerSays("quest"); + simulator.npcSays(npc, respondIfLastQuestFailed); + simulator.playerSays("yes"); + simulator.npcSays(npc, respondToAccept); + simulator.playerSays("bye"); + simulator.info(""); } } diff --git a/src/games/stendhal/server/entity/npc/quest/DeliverItemTask.java b/src/games/stendhal/server/entity/npc/quest/DeliverItemTask.java index cc4c95ecd1b..ef4a27c340b 100644 --- a/src/games/stendhal/server/entity/npc/quest/DeliverItemTask.java +++ b/src/games/stendhal/server/entity/npc/quest/DeliverItemTask.java @@ -136,8 +136,8 @@ void prepareBaker() { @Override void simulate(QuestSimulator simulator) { - // TODO Auto-generated method stub - + simulator.info("Player delivered [flavor] to [customerName] in time."); + simulator.info(""); } @Override