Class Spell
- java.lang.Object
-
- com.realtime.crossfire.jxclient.spells.Spell
-
public class Spell extends java.lang.ObjectDescribes a Crossfire spell.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSpellListener(@NotNull SpellListener listener)Adds aSpellListenerto be notified of changes.intgetCastingTime()Returns the casting time.intgetDamage()Returns the damage done by the spell.intgetFaceNum()Returns 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 java.lang.StringgetMessage()Returns the description.@NotNull java.lang.StringgetName()Returns the spell name.intgetPath()Returns the spell path.intgetSkill()Returns the spell's skill.intgetTag()Returns the tag ID.@NotNull java.lang.StringgetTooltipText()Returns a description for this spell to be used in tooltips.booleanisUnknown()Returns whether this spell is unknown to the character.voidremoveSpellListener(@NotNull SpellListener listener)Removes aSpellListenerto be notified of changes.voidsetParameters(int faceNum, int tag, @NotNull java.lang.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 java.lang.StringtoString()voidupdateParameters(boolean updateMana, int mana, boolean updateGrace, int grace, boolean updateDamage, int damage)Updates the spell's parameters.
-
-
-
Method Detail
-
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
@NotNull public @NotNull java.lang.String getName()
Returns the spell name.- Returns:
- the spell name
-
getMessage
@NotNull public @NotNull java.lang.String 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 java.lang.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
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getTooltipText
@NotNull public @NotNull java.lang.String getTooltipText()
Returns a description for this spell to be used in tooltips.- Returns:
- the tooltip text
-
addSpellListener
public void addSpellListener(@NotNull @NotNull SpellListener listener)Adds aSpellListenerto be notified of changes.- Parameters:
listener- the listener to add
-
removeSpellListener
public void removeSpellListener(@NotNull @NotNull SpellListener listener)Removes aSpellListenerto be notified of changes.- Parameters:
listener- the listener to remove
-
-