Class SkillSet

java.lang.Object
com.realtime.crossfire.jxclient.skills.SkillSet

public class SkillSet extends Object
Maintain the set of skills as sent by the server.
  • Constructor Details

    • SkillSet

      public SkillSet(@NotNull @NotNull GuiStateManager guiStateManager)
      Creates a new instance.
      Parameters:
      guiStateManager - the gui state manager to watch
  • Method Details

    • clearSkills

      public void clearSkills()
      Clears all skills.
    • addSkill

      public void addSkill(int id, @NotNull @NotNull String skillName, int face)
      Adds a new skill to the list of known skills.
      Parameters:
      id - the numerical identifier for the new skill
      skillName - the skill name
      face - the skill's face
    • setSkillExtra

      public void setSkillExtra(int id, @NotNull @NotNull String message)
      Defines additional skill information, when the server supports it.
      Parameters:
      id - the numerical identifier for the skill
      message - skill's message
    • getNamedSkill

      @NotNull public @NotNull Skill getNamedSkill(@NotNull @NotNull String skillName, int face)
      Returns the skill instance for a given skill name.
      Parameters:
      skillName - the skill name to look up
      face - the skill face to set
      Returns:
      the skill instance
    • clearNumberedSkills

      public void clearNumberedSkills()
      Clears all stat info in numberedSkills.
    • 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 null for undefined skills
    • getSkillId

      public int getSkillId(String name)
      Get a skill identifier from the skill name. This identifier can be used through getSkill(int).
      Parameters:
      name - skill's name
      Returns:
      skill's identifier, -1 if invalid skill