Crossfire JXClient, Trunk
|
Public Member Functions | |
ActiveSkillWatcher (@NotNull final Stats stats, @NotNull final CrossfireServerConnection crossfireServerConnection) | |
Private Member Functions | |
void | checkMessage (@NotNull final String message) |
void | checkRange (@NotNull final String range) |
void | setActive (@NotNull final String activeSkill) |
Private Attributes | |
String | activeSkill = "" |
final CrossfireDrawextinfoListener | drawextinfoListener |
final CrossfireDrawinfoListener | drawinfoListener = (text, type) -> checkMessage(text) |
final Stats | stats |
final StatsListener | statsListener |
final Object | sync = new Object() |
Static Private Attributes | |
static final String | READIED_SKILLS = "Readied skill: " |
Helper class to synthesize an "active skill" stat value. The Crossfire server currently does not send this information, therefore range stat messages are tracked.
Definition at line 36 of file ActiveSkillWatcher.java.
com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.ActiveSkillWatcher | ( | @NotNull final Stats | stats, |
@NotNull final CrossfireServerConnection | crossfireServerConnection | ||
) |
Creates a new instance.
stats | the stats instance to notify/watch |
crossfireServerConnection | the connection to watch |
Definition at line 152 of file ActiveSkillWatcher.java.
References com.realtime.crossfire.jxclient.stats.Stats.addCrossfireStatsListener(), com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.drawextinfoListener, com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.drawinfoListener, com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.setActive(), com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.stats, and com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.statsListener.
|
private |
Checks whether a drawinfo message is skill related.
message | the message |
Definition at line 174 of file ActiveSkillWatcher.java.
References com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.READIED_SKILLS, and com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.setActive().
|
private |
Checks whether the range attribute has changed.
range | the new range attribute |
Definition at line 164 of file ActiveSkillWatcher.java.
References com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.setActive().
|
private |
Sets the active skill name.
activeSkill | the active skill name |
Definition at line 185 of file ActiveSkillWatcher.java.
References com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.activeSkill, com.realtime.crossfire.jxclient.stats.Stats.setActiveSkill(), com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.stats, and com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.sync.
Referenced by com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.ActiveSkillWatcher(), com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.checkMessage(), and com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.checkRange().
|
private |
The last known active skill name.
Definition at line 60 of file ActiveSkillWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.setActive().
|
private |
The drawextinfo listener to receive drawextinfo messages.
Definition at line 133 of file ActiveSkillWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.ActiveSkillWatcher().
|
private |
The drawinfo listener to receive drawinfo messages.
Definition at line 126 of file ActiveSkillWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.ActiveSkillWatcher().
|
staticprivate |
Prefix string when searching for the currently active skill.
Definition at line 42 of file ActiveSkillWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.checkMessage().
|
private |
The stats instance to notify.
Definition at line 54 of file ActiveSkillWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.ActiveSkillWatcher(), and com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.setActive().
|
private |
The stats listener to detect the range stat.
Definition at line 67 of file ActiveSkillWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.ActiveSkillWatcher().
|
private |
The object used for synchronization.
Definition at line 48 of file ActiveSkillWatcher.java.
Referenced by com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.setActive().