Class BringListOfItemsQuestLogic
java.lang.Object
games.stendhal.server.maps.quests.logic.BringListOfItemsQuestLogic
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 Summary
Modifier and TypeFieldDescriptionprotected BringListOfItemsQuest
The concrete quest information (which items?, which npc?, what does it say?). -
Constructor Summary
ConstructorDescriptionBringListOfItemsQuestLogic(BringListOfItemsQuest concreteQuest)
Creates a new BringItems quest. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Player is willing to help.void
Adds the quest to the world.getHistory(Player player)
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.protected void
Player asks what exactly is missing.protected void
Player asks what exactly is missing.protected void
Player offers an item.protected void
player tries to offer an unwanted itemprotected void
Player says he doesn't have required items with him.protected void
Player says he has a required item with him.protected void
Player is not willing to help.protected void
player tries to say byeprotected void
Player asks about quest.protected void
Player returns while quest is still active.protected void
player says 'hi' before starting the quest.protected void
Player returns after finishing the quest.
-
Field Details
-
concreteQuest
The concrete quest information (which items?, which npc?, what does it say?).
-
-
Constructor Details
-
BringListOfItemsQuestLogic
Creates a new BringItems quest.- Parameters:
concreteQuest
- the real quest
-
-
Method Details
-
getHistory
-
getListOfStillMissingItems
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 questhash
- 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.
-