 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.skills;
27 import org.jetbrains.annotations.NotNull;
28 import org.jetbrains.annotations.Nullable;
89 final boolean oldKnown =
isKnown();
159 final StringBuilder sb =
new StringBuilder();
160 for (
final String line :
message.split(
"\n")) {
163 return sb.toString();
171 final boolean newKnown =
isKnown();
176 }
else if (!newKnown) {
188 listener.gainedSkill();
197 listener.lostSkill();
206 listener.changedSkill();
void fireDelSkill()
Notifies all listeners about a lost attribute.
Interface for listeners on skill related changes.
boolean isKnown()
Returns whether the skill is known.
A list of event listeners.
int level
The skill level.
void setFace(final int face)
Defines the skill's face.
long experience
The skill experience.
One skill of the character.
static String splitAsHtml(@NotNull final String message)
Splits the given string into lines and returns the lines separated by "<br>".
final String name
The skill name.
final EventListenerList2< SkillListener > listeners
The listeners to inform of changes.
int face
The skill's face number.
Utility class for splitting strings.
void fireEvents(final boolean oldKnown)
Notifies all listeners about changes.
long getExperience()
Returns the skill experience.
void fireAddSkill()
Notifies all listeners about a gained skill.
void setMessage(@Nullable final String message)
Defines the skill's message.
void addSkillListener(@NotNull final SkillListener listener)
Adds a listener to be notified of changes.
void removeSkillListener(@NotNull final SkillListener listener)
Removes a listener to be notified of changes.
String getTooltipText()
Returns a description for this spell to be used in tooltips.
Skill(@NotNull final String name)
Creates a new instance.
String message
The message associated to the skill (description), as given by the server.
int getLevel()
Returns the skill level.
void fireUpdSkill()
Notifies all listeners about an updated attribute.
int getFace()
Returns the skill's face.