Class Skill
java.lang.Object
com.realtime.crossfire.jxclient.skills.Skill
One skill of the character.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSkillListener(@NotNull SkillListener listener) Adds a listener to be notified of changes.longReturns the skill experience.intgetFace()Returns the skill's face.intgetLevel()Returns the skill level.@Nullable StringReturns a description for this spell to be used in tooltips.voidremoveSkillListener(@NotNull SkillListener listener) Removes a listener to be notified of changes.voidset(int level, long experience) Updates the skill attributes.voidsetFace(int face) Defines the skill's face.voidsetMessage(@Nullable String message) Defines the skill's message.@NotNull StringtoString()
-
Constructor Details
-
Skill
Creates a new instance.- Parameters:
name- the skill name
-
-
Method Details
-
set
public void set(int level, long experience) Updates the skill attributes.- Parameters:
level- the new skill levelexperience- the new skill experience
-
getExperience
public long getExperience()Returns the skill experience.- Returns:
- the skill experience
-
getLevel
public int getLevel()Returns the skill level.- Returns:
- the skill level
-
getFace
public int getFace()Returns the skill's face.- Returns:
- face number, -1 if no face defined.
-
setFace
public void setFace(int face) Defines the skill's face.- Parameters:
face- new face index
-
setMessage
Defines the skill's message.- Parameters:
message- new message, may be null
-
toString
-
getTooltipText
Returns a description for this spell to be used in tooltips.- Returns:
- the tooltip text or
nullif unknown
-
addSkillListener
Adds a listener to be notified of changes.- Parameters:
listener- the listener to add
-
removeSkillListener
Removes a listener to be notified of changes.- Parameters:
listener- the listener to remove
-