Class SkillSet
java.lang.Object
com.realtime.crossfire.jxclient.skills.SkillSet
Maintain the set of skills as sent by the server.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new skill to the list of known skills.voidClears all stat info innumberedSkills.voidClears all skills.@NotNull SkillgetNamedSkill(@NotNull String skillName, int face) Returns the skill instance for a given skill name.@Nullable SkillgetSkill(int id) Returns the given skill as a Skill object.intgetSkillId(String name) Get a skill identifier from the skill name.voidsetSkillExtra(int id, @NotNull String message) Defines additional skill information, when the server supports it.
-
Constructor Details
-
SkillSet
Creates a new instance.- Parameters:
guiStateManager- the gui state manager to watch
-
-
Method Details
-
clearSkills
public void clearSkills()Clears all skills. -
addSkill
Adds a new skill to the list of known skills.- Parameters:
id- the numerical identifier for the new skillskillName- the skill nameface- the skill's face
-
setSkillExtra
Defines additional skill information, when the server supports it.- Parameters:
id- the numerical identifier for the skillmessage- skill's message
-
getNamedSkill
Returns the skill instance for a given skill name.- Parameters:
skillName- the skill name to look upface- the skill face to set- Returns:
- the skill instance
-
clearNumberedSkills
public void clearNumberedSkills()Clears all stat info innumberedSkills. -
getSkill
Returns the given skill as a Skill object.- Parameters:
id- the numerical skill identifier- Returns:
- the skill object matching the given identifier; may be
nullfor undefined skills
-
getSkillId
Get a skill identifier from the skill name. This identifier can be used throughgetSkill(int).- Parameters:
name- skill's name- Returns:
- skill's identifier, -1 if invalid skill
-