Class Spell
java.lang.Object
com.realtime.crossfire.jxclient.spells.Spell
Describes a Crossfire spell.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSpellListener(@NotNull SpellListener listener) Adds aSpellListenerto be notified of changes.intReturns the casting time.intReturns the damage done by the spell.intReturns the face number.intgetGrace()Returns the grace needed to cast the spell.intgetLevel()Returns the spell level.intgetMana()Returns the mana needed to cast the spell.@NotNull StringReturns the description.@NotNull StringgetName()Returns the spell name.intgetPath()Returns the spell path.intgetSkill()Returns the spell's skill.intgetTag()Returns the tag ID.@NotNull StringReturns a description for this spell to be used in tooltips.booleanReturns whether this spell is unknown to the character.voidremoveSpellListener(@NotNull SpellListener listener) Removes aSpellListenerto be notified of changes.voidsetParameters(int faceNum, int tag, @NotNull String message, int level, int castingTime, int mana, int grace, int damage, int skill, int path) Updates the spell's parameters.voidsetUnknown(boolean unknown) Marks this spell as known or unknown for the character.@NotNull StringtoString()voidupdateParameters(boolean updateMana, int mana, boolean updateGrace, int grace, boolean updateDamage, int damage) Updates the spell's parameters.
-
Constructor Details
-
Method Details
-
getTag
public int getTag()Returns the tag ID.- Returns:
- the tag ID
-
getLevel
public int getLevel()Returns the spell level.- Returns:
- the spell level
-
getCastingTime
public int getCastingTime()Returns the casting time.- Returns:
- the casting time
-
getMana
public int getMana()Returns the mana needed to cast the spell.- Returns:
- the mana
-
getGrace
public int getGrace()Returns the grace needed to cast the spell.- Returns:
- the grace
-
getDamage
public int getDamage()Returns the damage done by the spell.- Returns:
- the damage
-
getSkill
public int getSkill()Returns the spell's skill. SeeStats.CS_STAT_SKILLINFO.- Returns:
- the spell's skill
-
getPath
public int getPath()Returns the spell path.- Returns:
- the spell path
-
getName
Returns the spell name.- Returns:
- the spell name
-
getMessage
Returns the description.- Returns:
- the description
-
getFaceNum
public int getFaceNum()Returns the face number.- Returns:
- the face number
-
isUnknown
public boolean isUnknown()Returns whether this spell is unknown to the character.- Returns:
- whether this spell is unknown
-
setUnknown
public void setUnknown(boolean unknown) Marks this spell as known or unknown for the character.- Parameters:
unknown- whether this spell is unknown
-
setParameters
public void setParameters(int faceNum, int tag, @NotNull @NotNull String message, int level, int castingTime, int mana, int grace, int damage, int skill, int path) Updates the spell's parameters.- Parameters:
faceNum- the face numbertag- the tag IDmessage- the descriptionlevel- the spell levelcastingTime- the casting timemana- the mana needed to cast the spellgrace- the grace needed to cast the spelldamage- the damage done by the spellskill- the spell's skillpath- the spell path
-
updateParameters
public void updateParameters(boolean updateMana, int mana, boolean updateGrace, int grace, boolean updateDamage, int damage) Updates the spell's parameters.- Parameters:
updateMana- whether to update the manamana- the mana needed to cast the spellupdateGrace- whether to update the gracegrace- the grace needed to cast the spellupdateDamage- whether to update the damagedamage- the damage done by the spell
-
toString
-
getTooltipText
Returns a description for this spell to be used in tooltips.- Returns:
- the tooltip text
-
addSpellListener
Adds aSpellListenerto be notified of changes.- Parameters:
listener- the listener to add
-
removeSpellListener
Removes aSpellListenerto be notified of changes.- Parameters:
listener- the listener to remove
-