Class Quest
- java.lang.Object
-
- com.realtime.crossfire.jxclient.quests.Quest
-
public class Quest extends java.lang.ObjectDescribes an in-game quest.
-
-
Constructor Summary
Constructors Constructor Description Quest(int code, @NotNull java.lang.String title, int face, boolean replay, int parent, boolean end, @NotNull java.lang.String step)Create a new quest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddQuestListener(@NotNull QuestListener listener)Adds aQuestListenerto be notified of changes.intgetCode()Get the quest's code.intgetFace()Get the quest's face.@NotNull java.lang.StringgetTitle()Get the quest's title.@NotNull java.lang.StringgetTooltipText()Returns a description for this spell to be used in tooltips.booleanisCompleted()voidremoveQuestListener(@NotNull QuestListener listener)Removes aQuestListenerto be notified of changes.booleanreplayable()voidsetStep(boolean end, @NotNull java.lang.String step)Update the quest's state.
-
-
-
Constructor Detail
-
Quest
public Quest(int code, @NotNull @NotNull java.lang.String title, int face, boolean replay, int parent, boolean end, @NotNull @NotNull java.lang.String step)Create a new quest.- Parameters:
code- the quest internal code.title- the quest's title.face- the quest's face.replay- if 1 the quest can be replayed.parent- quest internal code of this quest's parent, 0 if no parent.end- if 1 the quest is completed.step- current quest's step.
-
-
Method Detail
-
getCode
public int getCode()
Get the quest's code.- Returns:
- code.
-
getTitle
@NotNull public @NotNull java.lang.String 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
public void setStep(boolean end, @NotNull @NotNull java.lang.String step)Update the quest's state.- Parameters:
end- if true the quest is completed.step- step description.
-
getTooltipText
@NotNull public @NotNull java.lang.String getTooltipText()
Returns a description for this spell to be used in tooltips.- Returns:
- the tooltip text
-
addQuestListener
public void addQuestListener(@NotNull @NotNull QuestListener listener)Adds aQuestListenerto be notified of changes.- Parameters:
listener- the listener to add
-
removeQuestListener
public void removeQuestListener(@NotNull @NotNull QuestListener listener)Removes aQuestListenerto be notified of changes.- Parameters:
listener- the listener to remove
-
-