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

Public Member Functions

void addSpellListener (@NotNull final SpellListener listener)
 
int getCastingTime ()
 
int getDamage ()
 
int getFaceNum ()
 
int getGrace ()
 
int getLevel ()
 
int getMana ()
 
String getMessage ()
 
String getName ()
 
int getPath ()
 
int getSkill ()
 
int getTag ()
 
String getTooltipText ()
 
boolean isUnknown ()
 
void removeSpellListener (@NotNull final SpellListener listener)
 
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)
 
void setUnknown (final boolean unknown)
 
 Spell (@NotNull final String name, @NotNull final SkillSet skillSet, @NotNull final Stats stats)
 
String toString ()
 
void updateParameters (final boolean updateMana, final int mana, final boolean updateGrace, final int grace, final boolean updateDamage, final int damage)
 

Private Member Functions

void fireChanged ()
 

Private Attributes

int castingTime
 
int damage
 
int faceNum
 
int grace
 
int level
 
final EventListenerList2< SpellListenerlisteners = new EventListenerList2<>()
 
int mana
 
String message = ""
 
final String name
 
int path
 
int skill
 
final SkillSet skillSet
 
final Stats stats
 
int tag
 
boolean unknown
 

Detailed Description

Describes a Crossfire spell.

Author
Lauwenmark

Definition at line 37 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 123 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 420 of file Spell.java.

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

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

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 149 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 173 of file Spell.java.

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

◆ getFaceNum()

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

◆ getGrace()

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

Returns the grace needed to cast the spell.

Returns
the grace

Definition at line 165 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 141 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 157 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 207 of file Spell.java.

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

◆ getName()

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

◆ getPath()

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

Returns the spell path.

Returns
the spell path

Definition at line 189 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 181 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 133 of file Spell.java.

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

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

Here is the caller graph for this function:

◆ getTooltipText()

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

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

Returns
the tooltip text

Definition at line 357 of file Spell.java.

References com.realtime.crossfire.jxclient.spells.SpellPaths.appendSpellPaths(), com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_SPELL_ATTUNE, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_SPELL_DENY, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_SPELL_REPEL, com.realtime.crossfire.jxclient.spells.Spell.damage, com.realtime.crossfire.jxclient.skills.Skill.getLevel(), com.realtime.crossfire.jxclient.skills.SkillSet.getSkill(), com.realtime.crossfire.jxclient.stats.Stats.getStat(), 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.name, com.realtime.crossfire.jxclient.spells.Spell.path, com.realtime.crossfire.jxclient.spells.Spell.skill, com.realtime.crossfire.jxclient.spells.Spell.skillSet, com.realtime.crossfire.jxclient.util.StringSplitter.splitAsHtml(), com.realtime.crossfire.jxclient.spells.Spell.stats, com.realtime.crossfire.jxclient.skills.Skill.toString(), and com.realtime.crossfire.jxclient.spells.Spell.unknown.

Referenced by com.realtime.crossfire.jxclient.gui.list.GUISpellList.getTooltip(), and com.realtime.crossfire.jxclient.shortcuts.Shortcut.getTooltipText().

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

◆ 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 223 of file Spell.java.

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

◆ 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 428 of file Spell.java.

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

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

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 251 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, com.realtime.crossfire.jxclient.spells.Spell.tag, and com.realtime.crossfire.jxclient.spells.Spell.unknown.

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 231 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().

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 ( )

◆ 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 323 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

◆ 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

◆ stats

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

Attuned, repelled or denied information.

Definition at line 115 of file Spell.java.

Referenced by com.realtime.crossfire.jxclient.spells.Spell.getTooltipText(), and 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: