Class SkillSet
- java.lang.Object
-
- com.realtime.crossfire.jxclient.skills.SkillSet
-
public class SkillSet extends java.lang.ObjectMaintain the set of skills as sent by the server.
-
-
Constructor Summary
Constructors Constructor Description SkillSet(@NotNull GuiStateManager guiStateManager)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSkill(int id, @NotNull java.lang.String skillName, int face)Adds a new skill to the list of known skills.voidclearNumberedSkills()Clears all stat info innumberedSkills.voidclearSkills()Clears all skills.@NotNull SkillgetNamedSkill(@NotNull java.lang.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(java.lang.String name)Get a skill identifier from the skill name.
-
-
-
Constructor Detail
-
SkillSet
public SkillSet(@NotNull @NotNull GuiStateManager guiStateManager)Creates a new instance.- Parameters:
guiStateManager- the gui state manager to watch
-
-
Method Detail
-
clearSkills
public void clearSkills()
Clears all skills.
-
addSkill
public void addSkill(int id, @NotNull @NotNull java.lang.String skillName, int face)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
-
getNamedSkill
@NotNull public @NotNull Skill getNamedSkill(@NotNull @NotNull java.lang.String skillName, int face)
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
@Nullable public @Nullable Skill getSkill(int id)
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
public int getSkillId(java.lang.String name)
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
-
-