Class BringListOfItemsQuestLogic

java.lang.Object
games.stendhal.server.maps.quests.logic.BringListOfItemsQuestLogic

public class BringListOfItemsQuestLogic extends Object
An abstract quest which is based on bringing a list of items to an NPC. The NPC keeps track of the items already brought to him.
  • Field Details

    • concreteQuest

      protected BringListOfItemsQuest concreteQuest
      The concrete quest information (which items?, which npc?, what does it say?).
  • Constructor Details

    • BringListOfItemsQuestLogic

      public BringListOfItemsQuestLogic(BringListOfItemsQuest concreteQuest)
      Creates a new BringItems quest.
      Parameters:
      concreteQuest - the real quest
  • Method Details

    • getHistory

      public List<String> getHistory(Player player)
    • getListOfStillMissingItems

      protected List<String> getListOfStillMissingItems(Player player, boolean hash)
      Returns a list of the names of all items that the given player still has to bring to fulfil the quest.
      Parameters:
      player - The player doing the quest
      hash - If true, sets a # character in front of every name and puts it in quotes
      Returns:
      A list of item names
    • welcomeNewPlayer

      protected void welcomeNewPlayer()
      player says 'hi' before starting the quest.
    • tellAboutQuest

      protected void tellAboutQuest()
      Player asks about quest.
    • acceptQuest

      protected void acceptQuest()
      Player is willing to help.
    • rejectQuest

      protected void rejectQuest()
      Player is not willing to help.
    • listMissingItemsDuringQuestOffer

      protected void listMissingItemsDuringQuestOffer()
      Player asks what exactly is missing.
    • listMissingItems

      protected void listMissingItems()
      Player asks what exactly is missing.
    • playerDoesNotWantToGiveItems

      protected void playerDoesNotWantToGiveItems()
      Player says he doesn't have required items with him.
    • playerWantsToGiveItems

      protected void playerWantsToGiveItems()
      Player says he has a required item with him.
    • offerItem

      protected void offerItem()
      Player offers an item.
    • offerNotNeededItem

      protected void offerNotNeededItem()
      player tries to offer an unwanted item
    • sayByeWhileInQuestion1

      protected void sayByeWhileInQuestion1()
      player tries to say bye
    • welcomeKnownPlayer

      protected void welcomeKnownPlayer()
      Player returns while quest is still active.
    • welcomePlayerAfterQuest

      protected void welcomePlayerAfterQuest()
      Player returns after finishing the quest.
    • addToWorld

      public void addToWorld()
      Adds the quest to the world.