java.lang.Object com.realtime.crossfire.jxclient.spells.Spell
public class Spell
Describes a Crossfire spell.
Field Summary | |
---|---|
private int |
castingTime
|
private int |
damage
|
private int |
faceNum
|
private int |
grace
|
private int |
level
|
private java.util.Collection<SpellListener> |
listeners
|
private int |
mana
|
private java.lang.String |
message
|
private java.lang.String |
name
|
private int |
path
|
private int |
skill
|
private int |
tag
|
private boolean |
unknown
|
Constructor Summary | |
---|---|
Spell(java.lang.String name)
|
Method Summary | |
---|---|
void |
addSpellListener(SpellListener listener)
Adds a SpellListener to be notified of changes. |
private void |
fireChanged()
Notifies all listeners. |
int |
getCastingTime()
|
int |
getDamage()
|
int |
getFaceNum()
|
int |
getGrace()
|
int |
getLevel()
|
int |
getMana()
|
java.lang.String |
getMessage()
|
java.lang.String |
getName()
|
int |
getPath()
|
int |
getSkill()
|
int |
getTag()
|
java.lang.String |
getTooltipText()
Return a description for this spell to be used in tooltips. |
boolean |
isUnknown()
Returns whether this spell is unknown to the character. |
void |
removeSpellListener(SpellListener listener)
Removes a SpellListener to be notified of changes. |
void |
setParameters(int faceNum,
int tag,
java.lang.String message,
int level,
int castingTime,
int mana,
int grace,
int damage,
int skill,
int path)
|
void |
setParameters(Spell spell)
Updates the spell's parameters from another Spell instance. |
void |
setUnknown(boolean unknown)
Marks this spell as known or unknown for the character. |
java.lang.String |
toString()
|
void |
updateParameters(boolean updateMana,
int mana,
boolean updateGrace,
int grace,
boolean updateDamage,
int damage)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int castingTime
private int damage
private int faceNum
private int grace
private int level
@NotNull private final java.util.Collection<SpellListener> listeners
private int mana
@NotNull private java.lang.String message
@NotNull private final java.lang.String name
private int path
private int skill
private int tag
private boolean unknown
Constructor Detail |
---|
public Spell(@NotNull java.lang.String name)
Method Detail |
---|
public void addSpellListener(@NotNull SpellListener listener)
SpellListener
to be notified of changes.
listener
- the listener to addprivate void fireChanged()
public int getCastingTime()
public int getDamage()
public int getFaceNum()
public int getGrace()
public int getLevel()
public int getMana()
@NotNull public java.lang.String getMessage()
@NotNull public java.lang.String getName()
public int getPath()
public int getSkill()
public int getTag()
@NotNull public java.lang.String getTooltipText()
public boolean isUnknown()
public void removeSpellListener(@NotNull SpellListener listener)
SpellListener
to be notified of changes.
listener
- the listener to removepublic void setParameters(int faceNum, int tag, @NotNull java.lang.String message, int level, int castingTime, int mana, int grace, int damage, int skill, int path)
public void setParameters(@NotNull Spell spell)
Spell
instance. The
name and unknown flag values are not copied.
spell
- the spell instance to copy frompublic void setUnknown(boolean unknown)
unknown
- whether this spell is unknown@NotNull public java.lang.String toString()
toString
in class java.lang.Object
public void updateParameters(boolean updateMana, int mana, boolean updateGrace, int grace, boolean updateDamage, int damage)