Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.quests.Quest Class Reference

Describes an in-game quest. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.quests.Quest:

Public Member Functions

void addQuestListener (@NotNull final QuestListener listener)
 Adds a QuestListener to be notified of changes. More...
 
int getCode ()
 Get the quest's code. More...
 
int getFace ()
 Get the quest's face. More...
 
String getTitle ()
 Get the quest's title. More...
 
String getTooltipText ()
 Returns a description for this spell to be used in tooltips. More...
 
 Quest (final int code, @NotNull final String title, final int face, final boolean replay, final int parent, final boolean end, @NotNull final String step)
 Create a new quest. More...
 
void removeQuestListener (@NotNull final QuestListener listener)
 Removes a QuestListener to be notified of changes. More...
 
void setStep (final boolean end, @NotNull final String step)
 Update the quest's state. More...
 

Private Member Functions

void fireChanged ()
 Notifies all listeners. More...
 

Private Attributes

final int code
 Quest internal code. More...
 
boolean end
 If true, the quest is completed. More...
 
final int face
 Quest face. More...
 
final EventListenerList2< QuestListenerlisteners = new EventListenerList2<>()
 The QuestListeners to be notified of changes. More...
 
final int parent
 Quest internal code of this quest's parent, 0 if no parent. More...
 
final boolean replay
 If true, the quest can be replayed. More...
 
String step
 Description of the current step. More...
 
final String title
 Quest title. More...
 

Detailed Description

Describes an in-game quest.

Author
Nicolas Weeger

Definition at line 30 of file Quest.java.

Constructor & Destructor Documentation

◆ Quest()

com.realtime.crossfire.jxclient.quests.Quest.Quest ( final int  code,
@NotNull final String  title,
final int  face,
final boolean  replay,
final int  parent,
final boolean  end,
@NotNull final String  step 
)

Create a new quest.

Parameters
codethe quest internal code.
titlethe quest's title.
facethe quest's face.
replayif 1 the quest can be replayed.
parentquest internal code of this quest's parent, 0 if no parent.
endif 1 the quest is completed.
stepcurrent quest's step.

Definition at line 86 of file Quest.java.

References com.realtime.crossfire.jxclient.quests.Quest.code, com.realtime.crossfire.jxclient.quests.Quest.end, com.realtime.crossfire.jxclient.quests.Quest.face, com.realtime.crossfire.jxclient.quests.Quest.parent, com.realtime.crossfire.jxclient.quests.Quest.replay, com.realtime.crossfire.jxclient.quests.Quest.step, and com.realtime.crossfire.jxclient.quests.Quest.title.

Member Function Documentation

◆ addQuestListener()

void com.realtime.crossfire.jxclient.quests.Quest.addQuestListener ( @NotNull final QuestListener  listener)

Adds a QuestListener to be notified of changes.

Parameters
listenerthe listener to add

Definition at line 178 of file Quest.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.add().

Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fireChanged()

void com.realtime.crossfire.jxclient.quests.Quest.fireChanged ( )
private

Notifies all listeners.

Definition at line 168 of file Quest.java.

Referenced by com.realtime.crossfire.jxclient.quests.Quest.setStep().

+ Here is the caller graph for this function:

◆ getCode()

int com.realtime.crossfire.jxclient.quests.Quest.getCode ( )

Get the quest's code.

Returns
code.

Definition at line 100 of file Quest.java.

References com.realtime.crossfire.jxclient.quests.Quest.code.

Referenced by com.realtime.crossfire.jxclient.items.QuestsView.getItem().

+ Here is the caller graph for this function:

◆ getFace()

int com.realtime.crossfire.jxclient.quests.Quest.getFace ( )

Get the quest's face.

Returns
face index.

Definition at line 117 of file Quest.java.

References com.realtime.crossfire.jxclient.quests.Quest.face.

Referenced by com.realtime.crossfire.jxclient.items.QuestsView.getItem().

+ Here is the caller graph for this function:

◆ getTitle()

String com.realtime.crossfire.jxclient.quests.Quest.getTitle ( )

Get the quest's title.

Returns
title.

Definition at line 109 of file Quest.java.

References com.realtime.crossfire.jxclient.quests.Quest.title.

Referenced by com.realtime.crossfire.jxclient.items.QuestsView.getItem().

+ Here is the caller graph for this function:

◆ getTooltipText()

String com.realtime.crossfire.jxclient.quests.Quest.getTooltipText ( )

Returns a description for this spell to be used in tooltips.

Returns
the tooltip text

Definition at line 149 of file Quest.java.

Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest(), and com.realtime.crossfire.jxclient.gui.list.GUIQuestList.updateTooltip().

+ Here is the caller graph for this function:

◆ removeQuestListener()

void com.realtime.crossfire.jxclient.quests.Quest.removeQuestListener ( @NotNull final QuestListener  listener)

Removes a QuestListener to be notified of changes.

Parameters
listenerthe listener to remove

Definition at line 186 of file Quest.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.remove().

Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.setQuest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStep()

void com.realtime.crossfire.jxclient.quests.Quest.setStep ( final boolean  end,
@NotNull final String  step 
)

Update the quest's state.

Parameters
endif true the quest is completed.
stepstep description.

Definition at line 126 of file Quest.java.

References com.realtime.crossfire.jxclient.quests.Quest.end, com.realtime.crossfire.jxclient.quests.Quest.fireChanged(), and com.realtime.crossfire.jxclient.quests.Quest.step.

Referenced by com.realtime.crossfire.jxclient.quests.QuestsManager.addQuest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ code

final int com.realtime.crossfire.jxclient.quests.Quest.code
private

◆ end

boolean com.realtime.crossfire.jxclient.quests.Quest.end
private

If true, the quest is completed.

Definition at line 67 of file Quest.java.

Referenced by com.realtime.crossfire.jxclient.quests.Quest.Quest(), and com.realtime.crossfire.jxclient.quests.Quest.setStep().

◆ face

final int com.realtime.crossfire.jxclient.quests.Quest.face
private

◆ listeners

final EventListenerList2<QuestListener> com.realtime.crossfire.jxclient.quests.Quest.listeners = new EventListenerList2<>()
private

The QuestListeners to be notified of changes.

Definition at line 36 of file Quest.java.

◆ parent

final int com.realtime.crossfire.jxclient.quests.Quest.parent
private

Quest internal code of this quest's parent, 0 if no parent.

Definition at line 62 of file Quest.java.

Referenced by com.realtime.crossfire.jxclient.quests.Quest.Quest().

◆ replay

final boolean com.realtime.crossfire.jxclient.quests.Quest.replay
private

If true, the quest can be replayed.

Definition at line 57 of file Quest.java.

Referenced by com.realtime.crossfire.jxclient.quests.Quest.Quest().

◆ step

String com.realtime.crossfire.jxclient.quests.Quest.step
private

Description of the current step.

Definition at line 73 of file Quest.java.

Referenced by com.realtime.crossfire.jxclient.quests.Quest.Quest(), and com.realtime.crossfire.jxclient.quests.Quest.setStep().

◆ title

final String com.realtime.crossfire.jxclient.quests.Quest.title
private

The documentation for this class was generated from the following file: