Class Skill
- java.lang.Object
-
- com.realtime.crossfire.jxclient.skills.Skill
-
public class Skill extends java.lang.ObjectOne skill of the character.
-
-
Constructor Summary
Constructors Constructor Description Skill(@NotNull java.lang.String name)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSkillListener(@NotNull SkillListener listener)Adds a listener to be notified of changes.longgetExperience()Returns the skill experience.intgetFace()Returns the skill's face.intgetLevel()Returns the skill level.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.@NotNull java.lang.StringtoString()
-
-
-
Method Detail
-
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.
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
addSkillListener
public void addSkillListener(@NotNull @NotNull SkillListener listener)Adds a listener to be notified of changes.- Parameters:
listener- the listener to add
-
removeSkillListener
public void removeSkillListener(@NotNull @NotNull SkillListener listener)Removes a listener to be notified of changes.- Parameters:
listener- the listener to remove
-
-