Crossfire JXClient, Trunk
Public Member Functions | Private Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.quests.Quest Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.quests.Quest:
Collaboration graph

Public Member Functions

void addQuestListener (@NotNull final QuestListener listener)
 
int getCode ()
 
int getFace ()
 
String getTitle ()
 
String getTooltipText ()
 
boolean isCompleted ()
 
 Quest (final int code, @NotNull final String title, final int face, final boolean replay, final int parent, final boolean end, @NotNull final String step)
 
void removeQuestListener (@NotNull final QuestListener listener)
 
boolean replayable ()
 
void setStep (final boolean end, @NotNull final String step)
 

Private Member Functions

void fireChanged ()
 

Private Attributes

final int code
 
boolean end
 
final int face
 
final EventListenerList2< QuestListenerlisteners = new EventListenerList2<>()
 
final int parent
 
final boolean replay
 
String step
 
final String title
 

Detailed Description

Describes an in-game quest.

Author
Nicolas Weeger

Definition at line 32 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 88 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 188 of file Quest.java.

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

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

Here is the caller graph for this function:

◆ fireChanged()

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

Notifies all listeners.

Definition at line 178 of file Quest.java.

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

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 102 of file Quest.java.

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

Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemQuest.button1Clicked(), and com.realtime.crossfire.jxclient.quests.QuestsManager.updateQuest().

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 119 of file Quest.java.

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

◆ getTitle()

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

Get the quest's title.

Returns
title.

Definition at line 111 of file Quest.java.

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

◆ getTooltipText()

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

◆ isCompleted()

boolean com.realtime.crossfire.jxclient.quests.Quest.isCompleted ( )

Definition at line 123 of file Quest.java.

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

◆ 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 196 of file Quest.java.

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

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

Here is the caller graph for this function:

◆ replayable()

boolean com.realtime.crossfire.jxclient.quests.Quest.replayable ( )

Definition at line 127 of file Quest.java.

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

◆ 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 136 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(), and com.realtime.crossfire.jxclient.quests.QuestsManager.updateQuest().

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

◆ 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

◆ 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 64 of file Quest.java.

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

◆ replay

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

◆ step

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

◆ title

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

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