Class QuestBuilder<T extends QuestTaskBuilder,O extends QuestOfferBuilder<O>,C extends QuestCompleteBuilder,H extends QuestHistoryBuilder>
java.lang.Object
games.stendhal.server.entity.npc.quest.QuestBuilder<T,O,C,H>
- Type Parameters:
T- QuestTaskBuilder
- Direct Known Subclasses:
BringItemQuestBuilder,DeliverItemQuestBuilder,KillCreaturesQuestBuilder
public class QuestBuilder<T extends QuestTaskBuilder,O extends QuestOfferBuilder<O>,C extends QuestCompleteBuilder,H extends QuestHistoryBuilder>
extends Object
builds a quest
- Author:
- hendrik
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomplete()defines how the NPC react after the player completes the questRetrieves quest slot indexes where completions count are stored.history()defines the "history" of player progress as shown in the travel loginfo()defines general information about this questoffer()defines how the NPC offers the player the quest when the player says "quest"voidsetCompletionsIndexes(Integer index) Sets quest slot indexes to check for completions count.voidsetCompletionsIndexes(Integer openIndex, Integer completeIndex) Sets quest slot indexes to check for completions count.protected voidsetupSimulator(games.stendhal.server.entity.npc.quest.QuestSimulator simulator) voidsimulate()simulates the questtask()defines the task, which the player has to complete
-
Field Details
-
offer
-
complete
-
history
-
-
Constructor Details
-
QuestBuilder
creates a QuestBuilder- Parameters:
task- QuestTaskBuilder
-
-
Method Details
-
info
defines general information about this quest- Returns:
- QuestInfoBuilder
-
history
defines the "history" of player progress as shown in the travel log- Returns:
- QuestHistoryBuilder
-
offer
defines how the NPC offers the player the quest when the player says "quest"- Returns:
- QuestOfferBuilder
-
task
defines the task, which the player has to complete- Returns:
- QuestTaskBuilder
-
complete
defines how the NPC react after the player completes the quest- Returns:
- QuestCompleteBuilder
-
simulate
public void simulate()simulates the quest -
setupSimulator
protected void setupSimulator(games.stendhal.server.entity.npc.quest.QuestSimulator simulator) -
setCompletionsIndexes
Sets quest slot indexes to check for completions count.- Parameters:
openIndex- Index where count is stored while quest is in open state.completeIndex- Index where count is stored while quest is in complete state.
-
setCompletionsIndexes
Sets quest slot indexes to check for completions count.- Parameters:
index- Index where count is stored while quest in open or complete state.
-
getCompletionsIndexes
Retrieves quest slot indexes where completions count are stored.- Returns:
- A `marauroa.common.Pair` where `first` attribute represents slot index while quest is in open state and `second` represents slot index while quest is in complete state.
-