java.lang.Object
com.realtime.crossfire.jxclient.quests.Quest

public class Quest extends Object
Describes an in-game quest.
  • 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 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 Details

    • getCode

      public int getCode()
      Get the quest's code.
      Returns:
      code.
    • getTitle

      @NotNull public @NotNull 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 String step)
      Update the quest's state.
      Parameters:
      end - if true the quest is completed
      step - step description
    • getTooltipText

      @NotNull public @NotNull 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 a QuestListener to be notified of changes.
      Parameters:
      listener - the listener to add
    • removeQuestListener

      public void removeQuestListener(@NotNull @NotNull QuestListener listener)
      Removes a QuestListener to be notified of changes.
      Parameters:
      listener - the listener to remove