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
FieldsModifier and TypeFieldDescriptionprotected BringListOfItemsQuestThe concrete quest information (which items?, which npc?, what does it say?). -
Constructor Summary
ConstructorsConstructorDescriptionBringListOfItemsQuestLogic(BringListOfItemsQuest concreteQuest)Creates a new BringItems quest. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidPlayer is willing to help.voidAdds 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 voidPlayer asks what exactly is missing.protected voidPlayer asks what exactly is missing.protected voidPlayer offers an item.protected voidplayer tries to offer an unwanted itemprotected voidPlayer says he doesn't have required items with him.protected voidPlayer says he has a required item with him.protected voidPlayer is not willing to help.protected voidplayer tries to say byeprotected voidPlayer asks about quest.protected voidPlayer returns while quest is still active.protected voidplayer says 'hi' before starting the quest.protected voidPlayer 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.
-