Class Quest
java.lang.Object
com.realtime.crossfire.jxclient.quests.Quest
Describes an in-game quest.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddQuestListener(@NotNull QuestListener listener) Adds aQuestListenerto be notified of changes.intgetCode()Get the quest's code.intgetFace()Get the quest's face.@NotNull StringgetTitle()Get the quest's title.@NotNull StringReturns a description for this spell to be used in tooltips.booleanvoidremoveQuestListener(@NotNull QuestListener listener) Removes aQuestListenerto be notified of changes.booleanvoidUpdate the quest's state.
-
Constructor Details
-
Quest
public Quest(int code, @NotNull @NotNull String title, int face, boolean replay, int parent, boolean end, @NotNull @NotNull String step) Create a new quest.- Parameters:
code- the quest internal codetitle- the quest's titleface- the quest's facereplay- if 1 the quest can be replayedparent- quest internal code of this quest's parent, 0 if no parent.end- if 1 the quest is completedstep- current quest's step
-
-
Method Details
-
getCode
public int getCode()Get the quest's code.- Returns:
- code.
-
getTitle
Get the quest's title.- Returns:
- title.
-
getFace
public int getFace()Get the quest's face.- Returns:
- face index.
-
isCompleted
public boolean isCompleted() -
replayable
public boolean replayable() -
setStep
Update the quest's state.- Parameters:
end- if true the quest is completedstep- step description
-
getTooltipText
Returns a description for this spell to be used in tooltips.- Returns:
- the tooltip text
-
addQuestListener
Adds aQuestListenerto be notified of changes.- Parameters:
listener- the listener to add
-
removeQuestListener
Removes aQuestListenerto be notified of changes.- Parameters:
listener- the listener to remove
-