 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.skills;
29 import java.util.Arrays;
30 import java.util.HashMap;
32 import org.jetbrains.annotations.NotNull;
33 import org.jetbrains.annotations.Nullable;
52 private final Map<String, Skill>
namedSkills =
new HashMap<>();
59 @SuppressWarnings(
"FieldCanBeLocal")
68 public void metaserver() {
73 public void preConnecting(@NotNull
final String serverInfo) {
78 public void connecting(@NotNull
final String serverInfo) {
83 public void connecting(@NotNull
final ClientSocketState clientSocketState, @NotNull
final String param) {
88 public void connected() {
93 public void connectFailed(@NotNull
final String reason) {
115 skill.setMessage(
null);
126 public void addSkill(
final int id, @NotNull
final String skillName,
final int face) {
130 if (oldSkill == newSkill) {
134 if (oldSkill !=
null) {
163 if (oldSkill !=
null) {
final Map< String, Skill > namedSkills
Maps skill name to skill instance.
final Skill[] numberedSkills
Maps stat number to skill instance.
void set(final int level, final long experience)
Updates the skill attributes.
void setSkillExtra(final int id, @NotNull final String message)
Defines additional skill information, when the server supports it.
static final int CS_NUM_SKILLS
CS_NUM_SKILLS does not match how many skills there really are - instead, it is used as a range of val...
SkillSet(@NotNull final GuiStateManager guiStateManager)
Creates a new instance.
static final int CS_STAT_SKILLINFO
CS_STAT_SKILLINFO is used as the starting index point.
Interface for listeners interested gui state changes.
void setFace(final int face)
Defines the skill's face.
One skill of the character.
Maintains the current GuiState.
final GuiStateListener guiStateListener
The GuiStateListener for detecting established or dropped connections.
void clearSkills()
Clears all skills.
Skill getSkill(final int id)
Returns the given skill as a Skill object.
This is the representation of all the statistics of a player, like its speed or its experience.
void clearNumberedSkills()
Clears all stat info in numberedSkills.
int getSkillId(final String name)
Get a skill identifier from the skill name.
void setMessage(@Nullable final String message)
Defines the skill's message.
Connection progress states of the Crossfire server connection.
Maintain the set of skills as sent by the server.
Skill getNamedSkill(@NotNull final String skillName, final int face)
Returns the skill instance for a given skill name.
void addSkill(final int id, @NotNull final String skillName, final int face)
Adds a new skill to the list of known skills.