Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.spells.Spell Class Reference

Describes a Crossfire spell. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.spells.Spell:

Public Member Functions

void addSpellListener (@NotNull final SpellListener listener)
 Adds a SpellListener to be notified of changes. More...
 
int getCastingTime ()
 Returns the casting time. More...
 
int getDamage ()
 Returns the damage done by the spell. More...
 
int getFaceNum ()
 Returns the face number. More...
 
int getGrace ()
 Returns the grace needed to cast the spell. More...
 
int getLevel ()
 Returns the spell level. More...
 
int getMana ()
 Returns the mana needed to cast the spell. More...
 
String getMessage ()
 Returns the description. More...
 
String getName ()
 Returns the spell name. More...
 
int getPath ()
 Returns the spell path. More...
 
int getSkill ()
 Returns the spell's skill. More...
 
int getTag ()
 Returns the tag ID. More...
 
String getTooltipText ()
 Returns a description for this spell to be used in tooltips. More...
 
boolean isUnknown ()
 Returns whether this spell is unknown to the character. More...
 
void removeSpellListener (@NotNull final SpellListener listener)
 Removes a SpellListener to be notified of changes. More...
 
void setParameters (final int faceNum, final int tag, @NotNull final String message, final int level, final int castingTime, final int mana, final int grace, final int damage, final int skill, final int path)
 Updates the spell's parameters. More...
 
void setUnknown (final boolean unknown)
 Marks this spell as known or unknown for the character. More...
 
 Spell (@NotNull final String name, @NotNull final SkillSet skillSet, @NotNull final Stats stats)
 Creates a new instance. More...
 
String toString ()
 
void updateParameters (final boolean updateMana, final int mana, final boolean updateGrace, final int grace, final boolean updateDamage, final int damage)
 Updates the spell's parameters. More...
 

Private Member Functions

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

Private Attributes

int castingTime
 The casting time. More...
 
int damage
 The damage done by the spell. More...
 
int faceNum
 The face number. More...
 
int grace
 The grace needed to cast the spell. More...
 
int level
 The spell level. More...
 
final EventListenerList2< SpellListenerlisteners = new EventListenerList2<>()
 The SpellListeners to be notified of changes. More...
 
int mana
 The mana needed to cast the spell. More...
 
String message = ""
 The description. More...
 
final String name
 The spell name. More...
 
int path
 The spell path. More...
 
int skill
 The spell's skill. More...
 
final SkillSet skillSet
 To get the skill's name, see SkillSet. More...
 
final Stats stats
 Attuned, repelled or denied information. More...
 
int tag
 The tag ID. More...
 
boolean unknown
 Whether this spell is unknown to the character. More...
 

Detailed Description

Describes a Crossfire spell.

Author
Lauwenmark

Definition at line 36 of file Spell.java.

Constructor & Destructor Documentation

◆ Spell()

com.realtime.crossfire.jxclient.spells.Spell.Spell ( @NotNull final String  name,
@NotNull final SkillSet  skillSet,
@NotNull final Stats  stats 
)

Creates a new instance.

Parameters
namethe spell name
skillSetthe skills
statsthe stats instance

Definition at line 122 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.name, com.realtime.crossfire.jxclient.spells.Spell.skillSet, and com.realtime.crossfire.jxclient.spells.Spell.stats.

Member Function Documentation

◆ addSpellListener()

void com.realtime.crossfire.jxclient.spells.Spell.addSpellListener ( @NotNull final SpellListener  listener)

Adds a SpellListener to be notified of changes.

Parameters
listenerthe listener to add

Definition at line 425 of file Spell.java.

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

Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemSpell.setSpell(), and com.realtime.crossfire.jxclient.shortcuts.ShortcutSpell.ShortcutSpell().

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

◆ fireChanged()

void com.realtime.crossfire.jxclient.spells.Spell.fireChanged ( )
private

◆ getCastingTime()

int com.realtime.crossfire.jxclient.spells.Spell.getCastingTime ( )

Returns the casting time.

Returns
the casting time

Definition at line 148 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.castingTime.

◆ getDamage()

int com.realtime.crossfire.jxclient.spells.Spell.getDamage ( )

Returns the damage done by the spell.

Returns
the damage

Definition at line 172 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.damage.

◆ getFaceNum()

int com.realtime.crossfire.jxclient.spells.Spell.getFaceNum ( )

Returns the face number.

Returns
the face number

Definition at line 214 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.faceNum.

Referenced by com.realtime.crossfire.jxclient.shortcuts.ShortcutSpell.displaysFace(), and com.realtime.crossfire.jxclient.items.SpellsView.getItem().

+ Here is the caller graph for this function:

◆ getGrace()

int com.realtime.crossfire.jxclient.spells.Spell.getGrace ( )

Returns the grace needed to cast the spell.

Returns
the grace

Definition at line 164 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.grace.

◆ getLevel()

int com.realtime.crossfire.jxclient.spells.Spell.getLevel ( )

Returns the spell level.

Returns
the spell level

Definition at line 140 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.level.

◆ getMana()

int com.realtime.crossfire.jxclient.spells.Spell.getMana ( )

Returns the mana needed to cast the spell.

Returns
the mana

Definition at line 156 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.mana.

◆ getMessage()

String com.realtime.crossfire.jxclient.spells.Spell.getMessage ( )

Returns the description.

Returns
the description

Definition at line 206 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.message.

◆ getName()

◆ getPath()

int com.realtime.crossfire.jxclient.spells.Spell.getPath ( )

Returns the spell path.

Returns
the spell path

Definition at line 188 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.path.

◆ getSkill()

int com.realtime.crossfire.jxclient.spells.Spell.getSkill ( )

Returns the spell's skill.

See Stats#CS_STAT_SKILLINFO.

Returns
the spell's skill

Definition at line 180 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.skill.

◆ getTag()

int com.realtime.crossfire.jxclient.spells.Spell.getTag ( )

Returns the tag ID.

Returns
the tag ID

Definition at line 132 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.tag.

Referenced by com.realtime.crossfire.jxclient.shortcuts.ShortcutSpell.execute(), and com.realtime.crossfire.jxclient.items.SpellsView.getItem().

+ Here is the caller graph for this function:

◆ getTooltipText()

◆ isUnknown()

boolean com.realtime.crossfire.jxclient.spells.Spell.isUnknown ( )

Returns whether this spell is unknown to the character.

Returns
whether this spell is unknown

Definition at line 222 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.unknown.

Referenced by com.realtime.crossfire.jxclient.shortcuts.ShortcutSpell.execute().

+ Here is the caller graph for this function:

◆ removeSpellListener()

void com.realtime.crossfire.jxclient.spells.Spell.removeSpellListener ( @NotNull final SpellListener  listener)

Removes a SpellListener to be notified of changes.

Parameters
listenerthe listener to remove

Definition at line 433 of file Spell.java.

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

Referenced by com.realtime.crossfire.jxclient.shortcuts.ShortcutSpell.dispose(), com.realtime.crossfire.jxclient.gui.item.GUIItemSpell.dispose(), and com.realtime.crossfire.jxclient.gui.item.GUIItemSpell.setSpell().

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

◆ setParameters()

void com.realtime.crossfire.jxclient.spells.Spell.setParameters ( final int  faceNum,
final int  tag,
@NotNull final String  message,
final int  level,
final int  castingTime,
final int  mana,
final int  grace,
final int  damage,
final int  skill,
final int  path 
)

Updates the spell's parameters.

Parameters
faceNumthe face number
tagthe tag ID
messagethe description
levelthe spell level
castingTimethe casting time
manathe mana needed to cast the spell
gracethe grace needed to cast the spell
damagethe damage done by the spell
skillthe spell's skill
paththe spell path

Definition at line 250 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.castingTime, com.realtime.crossfire.jxclient.spells.Spell.damage, com.realtime.crossfire.jxclient.spells.Spell.faceNum, com.realtime.crossfire.jxclient.spells.Spell.fireChanged(), com.realtime.crossfire.jxclient.spells.Spell.grace, com.realtime.crossfire.jxclient.spells.Spell.level, com.realtime.crossfire.jxclient.spells.Spell.mana, com.realtime.crossfire.jxclient.spells.Spell.message, com.realtime.crossfire.jxclient.spells.Spell.path, com.realtime.crossfire.jxclient.spells.Spell.skill, and com.realtime.crossfire.jxclient.spells.Spell.tag.

Referenced by com.realtime.crossfire.jxclient.spells.SpellsManager.addSpell().

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

◆ setUnknown()

void com.realtime.crossfire.jxclient.spells.Spell.setUnknown ( final boolean  unknown)

Marks this spell as known or unknown for the character.

Parameters
unknownwhether this spell is unknown

Definition at line 230 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.fireChanged(), and com.realtime.crossfire.jxclient.spells.Spell.unknown.

Referenced by com.realtime.crossfire.jxclient.spells.SpellsManager.deleteSpellByIndex(), and com.realtime.crossfire.jxclient.spells.SpellsManager.getSpell().

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

◆ toString()

String com.realtime.crossfire.jxclient.spells.Spell.toString ( )

Definition at line 350 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.unknown.

◆ updateParameters()

void com.realtime.crossfire.jxclient.spells.Spell.updateParameters ( final boolean  updateMana,
final int  mana,
final boolean  updateGrace,
final int  grace,
final boolean  updateDamage,
final int  damage 
)

Updates the spell's parameters.

Parameters
updateManawhether to update the mana
manathe mana needed to cast the spell
updateGracewhether to update the grace
gracethe grace needed to cast the spell
updateDamagewhether to update the damage
damagethe damage done by the spell

Definition at line 322 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.Spell.damage, com.realtime.crossfire.jxclient.spells.Spell.fireChanged(), com.realtime.crossfire.jxclient.spells.Spell.grace, and com.realtime.crossfire.jxclient.spells.Spell.mana.

+ Here is the call graph for this function:

Member Data Documentation

◆ castingTime

int com.realtime.crossfire.jxclient.spells.Spell.castingTime
private

◆ damage

int com.realtime.crossfire.jxclient.spells.Spell.damage
private

◆ faceNum

int com.realtime.crossfire.jxclient.spells.Spell.faceNum
private

◆ grace

int com.realtime.crossfire.jxclient.spells.Spell.grace
private

◆ level

int com.realtime.crossfire.jxclient.spells.Spell.level
private

◆ listeners

final EventListenerList2<SpellListener> com.realtime.crossfire.jxclient.spells.Spell.listeners = new EventListenerList2<>()
private

The SpellListeners to be notified of changes.

Definition at line 48 of file Spell.java.

◆ mana

int com.realtime.crossfire.jxclient.spells.Spell.mana
private

◆ message

String com.realtime.crossfire.jxclient.spells.Spell.message = ""
private

◆ name

final String com.realtime.crossfire.jxclient.spells.Spell.name
private

◆ path

int com.realtime.crossfire.jxclient.spells.Spell.path
private

◆ skill

int com.realtime.crossfire.jxclient.spells.Spell.skill
private

◆ skillSet

final SkillSet com.realtime.crossfire.jxclient.spells.Spell.skillSet
private

To get the skill's name, see SkillSet.

Definition at line 109 of file Spell.java.

Referenced by com.realtime.crossfire.jxclient.spells.Spell.Spell().

◆ stats

final Stats com.realtime.crossfire.jxclient.spells.Spell.stats
private

Attuned, repelled or denied information.

Definition at line 114 of file Spell.java.

Referenced by com.realtime.crossfire.jxclient.spells.Spell.Spell().

◆ tag

int com.realtime.crossfire.jxclient.spells.Spell.tag
private

◆ unknown

boolean com.realtime.crossfire.jxclient.spells.Spell.unknown
private

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