Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.stats.Stats Class Reference

This is the representation of all the statistics of a player, like its speed or its experience. More...

+ Collaboration diagram for com.realtime.crossfire.jxclient.stats.Stats:

Public Member Functions

void addCrossfireStatsListener (@NotNull final StatsListener statsListener)
 Adds a StatsListener to be notified about stat changes. More...
 
String getActiveSkill ()
 Returns the active skill name. More...
 
long getExperience ()
 Returns the amount of global experience. More...
 
long getExperienceNextLevel ()
 Returns the experience needed to reach the next level. More...
 
double getFloatStat (final int statNo)
 Returns the numerical value of the given statistic. More...
 
String getRange ()
 Returns the current content of the range stat. More...
 
int getStat (final int statNo)
 Returns the numerical value of the given statistic. More...
 
String getTitle ()
 Returns the current title. More...
 
double getWeaponSpeed ()
 Returns the weapon speed stat. More...
 
void removeCrossfireStatsListener (@NotNull final StatsListener statsListener)
 Removes a StatsListener to be notified about stat changes. More...
 
void setActiveSkill (@NotNull final String activeSkill)
 Sets the active skill name. More...
 
void setSimpleWeaponSpeed (final boolean simpleWeaponSpeed)
 Sets whether the CS_STAT_WEAP_SP value contains the weapon speed directly. More...
 
void setStat (final int statNo, final int value)
 Sets the given statistic numerical value. More...
 
void setStatInt2 (final int stat, final short param)
 Updates a stat value with a two-byte int value. More...
 
void setStatInt4 (final int stat, final int param)
 Updates a stat value with a four-byte int value. More...
 
void setStatInt8 (final int stat, final long param)
 Updates a stat value with an eight-byte int value. More...
 
void setStatSkill (final int stat, final int level, final long experience)
 Updates a stat value with a skill value. More...
 
void setStatString (final int stat, @NotNull final String param)
 Updates a stat value with a string value. More...
 
 Stats (@NotNull final ExperienceTable experienceTable, @NotNull final SkillSet skillSet, @NotNull final GuiStateManager guiStateManager)
 Creates a new instance. More...
 

Static Public Attributes

static final int C_STAT_EXP_NEXT_LEVEL = 0x10000
 The global experience needed to reach next level stat. More...
 
static final int C_STAT_LOWFOOD = 0x10003
 The Low Food indicator. More...
 
static final int C_STAT_POISONED = 256
 The "is poisoned" indicator. More...
 
static final int C_STAT_WEIGHT = 257
 The character's weight. More...
 
static final int CS_NUM_SKILLS = 50
 CS_NUM_SKILLS does not match how many skills there really are - instead, it is used as a range of values so that the client can have some idea how many skill categories there may be. More...
 
static final int CS_STAT_AC = 14
 The Armor Class stat. More...
 
static final int CS_STAT_APPLIED_CHA = 51
 The charisma primary stat changes due to gear or skills. More...
 
static final int CS_STAT_APPLIED_CON = 50
 The constitution primary stat changes due to gear or skills. More...
 
static final int CS_STAT_APPLIED_DEX = 49
 The dexterity primary stat changes due to gear or skills. More...
 
static final int CS_STAT_APPLIED_INT = 47
 The integer primary stat changes due to gear or skills. More...
 
static final int CS_STAT_APPLIED_POW = 52
 The power primary stat changes due to gear or skills. More...
 
static final int CS_STAT_APPLIED_STR = 46
 The strength primary stat changes due to gear or skills. More...
 
static final int CS_STAT_APPLIED_WIS = 48
 The wisdom primary stat changes due to gear or skills. More...
 
static final int CS_STAT_ARMOUR = 16
 The Armour stat. More...
 
static final int CS_STAT_BASE_CHA = 44
 The charisma primary stat without boosts or depletions. More...
 
static final int CS_STAT_BASE_CON = 43
 The constitution primary stat without boosts or depletions. More...
 
static final int CS_STAT_BASE_DEX = 42
 The dexterity primary stat without boosts or depletions. More...
 
static final int CS_STAT_BASE_INT = 40
 The integer primary stat without boosts or depletions. More...
 
static final int CS_STAT_BASE_POW = 45
 The power primary stat without boosts or depletions. More...
 
static final int CS_STAT_BASE_STR = 39
 The strength primary stat without boosts or depletions. More...
 
static final int CS_STAT_BASE_WIS = 41
 The wisdom primary stat without boosts or depletions. More...
 
static final int CS_STAT_CHA = 10
 The Charisma Primary stat. More...
 
static final int CS_STAT_CON = 9
 The Constitution Primary stat. More...
 
static final int CS_STAT_DAM = 15
 The Damage stat. More...
 
static final int CS_STAT_DEX = 8
 The Dexterity Primary stat. More...
 
static final int CS_STAT_EXP = 11
 The Global Experience (32bit encoding) stat. More...
 
static final int CS_STAT_EXP64 = 28
 The Global Experience (64bit encoding) stat. More...
 
static final int CS_STAT_FLAGS = 25
 The various flags used in stats. More...
 
static final int CS_STAT_FOOD = 18
 The Food stat. More...
 
static final int CS_STAT_GOLEM_HP = 53
 The golem's hitpoints, 0 if no golem. More...
 
static final int CS_STAT_GOLEM_MAXHP = 54
 The golem's maximum hitpoints, 0 if no golem. More...
 
static final int CS_STAT_GRACE = 23
 The Grace stat. More...
 
static final int CS_STAT_HP = 1
 The Hit Points stat. More...
 
static final int CS_STAT_INT = 6
 The Intelligence Primary stat. More...
 
static final int CS_STAT_LEVEL = 12
 The Global Level stat. More...
 
static final int CS_STAT_MAXGRACE = 24
 The Maximum Grace stat. More...
 
static final int CS_STAT_MAXHP = 2
 The Maximum Hit Points stat. More...
 
static final int CS_STAT_MAXSP = 4
 The Maximum Spell Points stat. More...
 
static final int CS_STAT_POW = 22
 The Power Primary stat. More...
 
static final int CS_STAT_RACE_CHA = 37
 The race's maximum charisma primary stat. More...
 
static final int CS_STAT_RACE_CON = 36
 The race's maximum constitution primary stat. More...
 
static final int CS_STAT_RACE_DEX = 35
 The race's maximum dexterity primary stat. More...
 
static final int CS_STAT_RACE_INT = 33
 The race's maximum intelligence primary stat. More...
 
static final int CS_STAT_RACE_POW = 38
 The race's maximum power primary stat. More...
 
static final int CS_STAT_RACE_STR = 32
 The race's maximum strength primary stat. More...
 
static final int CS_STAT_RACE_WIS = 34
 The race's maximum wisdom primary stat. More...
 
static final int CS_STAT_RANGE = 20
 The Range stat - this is what is currently readied by the player to fire. More...
 
static final int CS_STAT_RES_ACID = 106
 Resistance to acid. More...
 
static final int CS_STAT_RES_BLIND = 117
 Resistance to blindness. More...
 
static final int CS_STAT_RES_COLD = 104
 Resistance to cold. More...
 
static final int CS_STAT_RES_CONF = 105
 Resistance to confusion. More...
 
static final int CS_STAT_RES_DEATH = 115
 Resistance to death. More...
 
static final int CS_STAT_RES_DEPLETE = 114
 Resistance to depletion. More...
 
static final int CS_STAT_RES_DRAIN = 107
 Resistance to drain life. More...
 
static final int CS_STAT_RES_ELEC = 103
 Resistance to electricity. More...
 
static final int CS_STAT_RES_FEAR = 113
 Resistance to fear. More...
 
static final int CS_STAT_RES_FIRE = 102
 Resistance to fire. More...
 
static final int CS_STAT_RES_GHOSTHIT = 108
 Resistance to ghost hit. More...
 
static final int CS_STAT_RES_HOLYWORD = 116
 Resistance to holy word. More...
 
static final int CS_STAT_RES_MAG = 101
 Resistance to magical attacks. More...
 
static final int CS_STAT_RES_PARA = 111
 Resistance to paralysis. More...
 
static final int CS_STAT_RES_PHYS = 100
 Resistance to physical attacks. More...
 
static final int CS_STAT_RES_POISON = 109
 Resistance to poison. More...
 
static final int CS_STAT_RES_SLOW = 110
 Resistance to slowness. More...
 
static final int CS_STAT_RES_TURN_UNDEAD = 112
 Resistance to turn undead. More...
 
static final int CS_STAT_RESIST_END = 117
 End index of the resistances. More...
 
static final int CS_STAT_RESIST_START = 100
 Beginning index of the resistances. More...
 
static final int CS_STAT_SKILLINFO = 140
 CS_STAT_SKILLINFO is used as the starting index point. More...
 
static final int CS_STAT_SP = 3
 The Spell Points stat. More...
 
static final int CS_STAT_SPEED = 17
 The Speed stat. More...
 
static final int CS_STAT_SPELL_ATTUNE = 29
 Attuned spell paths of a spell. More...
 
static final int CS_STAT_SPELL_DENY = 31
 Denied spell paths of a spell. More...
 
static final int CS_STAT_SPELL_REPEL = 30
 Repelled spell paths of a spell. More...
 
static final int CS_STAT_STR = 5
 The Strength Primary stat. More...
 
static final int CS_STAT_TITLE = 21
 The Title stat. More...
 
static final int CS_STAT_WC = 13
 The Weapon Class stat. More...
 
static final int CS_STAT_WEAP_SP = 19
 The Weapon Speed stat. More...
 
static final int CS_STAT_WEIGHT_LIM = 26
 The Weight Limit stat. More...
 
static final int CS_STAT_WIS = 7
 The Wisdom Primary stat. More...
 
static final int FLOAT_MULTI = 100000
 Factor used to convert float to int values. More...
 
static final int RESIST_TYPES = 18
 The total number of resistances. More...
 

Private Member Functions

void calculateExperienceToNextLevel ()
 Calculates the experience needed to reach the next level. More...
 
void reportUnhandledStat (final int stat, @NotNull final String type)
 Report an unhandled stat value. More...
 
void reset ()
 Forgets about all stats. More...
 
void setExperience (final long exp)
 Sets the amount of global experience. More...
 
void setRange (@NotNull final String range)
 Sets the current value for the Range - this is basically the currently active skill for the player. More...
 
void setTitle (@NotNull final String title)
 Sets the current Title. More...
 

Private Attributes

String activeSkill = ""
 The active skill name. More...
 
long exp
 The total experience. More...
 
final ExperienceTable experienceTable
 The ExperienceTable instance to use. More...
 
long expNextLevel
 The experience needed to reach the next level. More...
 
final GuiStateListener guiStateListener
 The GuiStateListener for detecting established or dropped connections. More...
 
String range = ""
 The current value of the range stat. More...
 
boolean simpleWeaponSpeed
 Whether the CS_STAT_WEAP_SP value contains the weapon speed directly. More...
 
final SkillSet skillSet
 The SkillSet instance to use. More...
 
final int [] stats = new int[258]
 The current stat values. More...
 
final EventListenerList2< StatsListenerstatsListeners = new EventListenerList2<>()
 The listeners to inform of stat changes. More...
 
String title = ""
 The current value of the title stat. More...
 
final Collection< String > unhandledStats = new HashSet<>(0)
 All unhandled stat values for which an error has been printed. More...
 

Detailed Description

This is the representation of all the statistics of a player, like its speed or its experience.

Constants named

C_STAT_xxx

are client-sided; * constants named

CS_STAT_xxx

are stats as sent by the server.

Author
Lauwenmark
Andreas Kirschbaum

Definition at line 43 of file Stats.java.

Constructor & Destructor Documentation

◆ Stats()

com.realtime.crossfire.jxclient.stats.Stats.Stats ( @NotNull final ExperienceTable  experienceTable,
@NotNull final SkillSet  skillSet,
@NotNull final GuiStateManager  guiStateManager 
)

Creates a new instance.

Parameters
experienceTablethe experience table instance to use
skillSetthe skill set instance to use
guiStateManagerthe gui state manager to watch

Definition at line 571 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.experienceTable, com.realtime.crossfire.jxclient.stats.Stats.guiStateListener, and com.realtime.crossfire.jxclient.stats.Stats.skillSet.

Member Function Documentation

◆ addCrossfireStatsListener()

void com.realtime.crossfire.jxclient.stats.Stats.addCrossfireStatsListener ( @NotNull final StatsListener  statsListener)

Adds a StatsListener to be notified about stat changes.

Parameters
statsListenerthe listener to add

Definition at line 770 of file Stats.java.

References com.realtime.crossfire.jxclient.util.EventListenerList2< T extends EventListener >.add().

Referenced by com.realtime.crossfire.jxclient.gui.gauge.ActiveSkillGaugeUpdater.ActiveSkillGaugeUpdater(), com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.ActiveSkillWatcher(), and com.realtime.crossfire.jxclient.gui.label.GUILabelStats2.GUILabelStats2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateExperienceToNextLevel()

void com.realtime.crossfire.jxclient.stats.Stats.calculateExperienceToNextLevel ( )
private

Calculates the experience needed to reach the next level.

Definition at line 754 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.ExperienceTable.getExperienceToNextLevel().

Referenced by com.realtime.crossfire.jxclient.stats.Stats.setExperience(), and com.realtime.crossfire.jxclient.stats.Stats.setStatInt2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActiveSkill()

String com.realtime.crossfire.jxclient.stats.Stats.getActiveSkill ( )

Returns the active skill name.

Returns
the active skill name

Definition at line 668 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.activeSkill.

◆ getExperience()

long com.realtime.crossfire.jxclient.stats.Stats.getExperience ( )

Returns the amount of global experience.

Returns
the amount of global experience

Definition at line 722 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.exp.

Referenced by com.realtime.crossfire.jxclient.scripts.DefaultScriptProcess.cmdRequest(), and com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.updateExperienceNextLevel().

+ Here is the caller graph for this function:

◆ getExperienceNextLevel()

long com.realtime.crossfire.jxclient.stats.Stats.getExperienceNextLevel ( )

Returns the experience needed to reach the next level.

Returns
the experience needed

Definition at line 747 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.expNextLevel.

◆ getFloatStat()

double com.realtime.crossfire.jxclient.stats.Stats.getFloatStat ( final int  statNo)

Returns the numerical value of the given statistic.

Parameters
statNothe stat identifier; see the CS_STAT constants
Returns
the statistic value

Definition at line 624 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.FLOAT_MULTI.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.getWeaponSpeed().

+ Here is the caller graph for this function:

◆ getRange()

String com.realtime.crossfire.jxclient.stats.Stats.getRange ( )

Returns the current content of the range stat.

This is basically the current active skill for the player.

Returns
a string representation of the range

Definition at line 659 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.range.

Referenced by com.realtime.crossfire.jxclient.scripts.DefaultScriptProcess.cmdRequest().

+ Here is the caller graph for this function:

◆ getStat()

int com.realtime.crossfire.jxclient.stats.Stats.getStat ( final int  statNo)

Returns the numerical value of the given statistic.

Parameters
statNothe stat identifier; see the CS_STAT constants
Returns
the statistic value (or "score")

Definition at line 615 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.scripts.DefaultScriptProcess.cmdRequest(), com.realtime.crossfire.jxclient.spells.Spell.getTooltipText(), com.realtime.crossfire.jxclient.gui.gauge.StatGaugeUpdater.updateExperienceNextLevel(), and com.realtime.crossfire.jxclient.gui.label.GUILabelStats2.updateStat().

+ Here is the caller graph for this function:

◆ getTitle()

String com.realtime.crossfire.jxclient.stats.Stats.getTitle ( )

Returns the current title.

Returns
a string representation of the title

Definition at line 649 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.title.

Referenced by com.realtime.crossfire.jxclient.scripts.DefaultScriptProcess.cmdRequest().

+ Here is the caller graph for this function:

◆ getWeaponSpeed()

double com.realtime.crossfire.jxclient.stats.Stats.getWeaponSpeed ( )

Returns the weapon speed stat.

Returns
the weapon speed stat

Definition at line 786 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.getFloatStat().

+ Here is the call graph for this function:

◆ removeCrossfireStatsListener()

void com.realtime.crossfire.jxclient.stats.Stats.removeCrossfireStatsListener ( @NotNull final StatsListener  statsListener)

◆ reportUnhandledStat()

void com.realtime.crossfire.jxclient.stats.Stats.reportUnhandledStat ( final int  stat,
@NotNull final String  type 
)
private

◆ reset()

◆ setActiveSkill()

void com.realtime.crossfire.jxclient.stats.Stats.setActiveSkill ( @NotNull final String  activeSkill)

Sets the active skill name.

Parameters
activeSkillthe active skill name

Definition at line 707 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.activeSkill.

Referenced by com.realtime.crossfire.jxclient.items.ItemsManager.playerReceived(), com.realtime.crossfire.jxclient.stats.Stats.reset(), and com.realtime.crossfire.jxclient.stats.ActiveSkillWatcher.setActive().

+ Here is the caller graph for this function:

◆ setExperience()

void com.realtime.crossfire.jxclient.stats.Stats.setExperience ( final long  exp)
private

Sets the amount of global experience.

Parameters
expthe new amount of global experience

Definition at line 730 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.calculateExperienceToNextLevel(), and com.realtime.crossfire.jxclient.stats.Stats.exp.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.reset(), com.realtime.crossfire.jxclient.stats.Stats.setStatInt4(), and com.realtime.crossfire.jxclient.stats.Stats.setStatInt8().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRange()

void com.realtime.crossfire.jxclient.stats.Stats.setRange ( @NotNull final String  range)
private

Sets the current value for the Range - this is basically the currently active skill for the player.

Parameters
rangethe new content of range

Definition at line 692 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.range.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.reset(), and com.realtime.crossfire.jxclient.stats.Stats.setStatString().

+ Here is the caller graph for this function:

◆ setSimpleWeaponSpeed()

void com.realtime.crossfire.jxclient.stats.Stats.setSimpleWeaponSpeed ( final boolean  simpleWeaponSpeed)

Sets whether the CS_STAT_WEAP_SP value contains the weapon speed directly.

Parameters
simpleWeaponSpeedwhether is the weapon speed value

Definition at line 583 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.simpleWeaponSpeed.

Referenced by com.realtime.crossfire.jxclient.server.crossfire.DefaultCrossfireServerConnection.processVersion().

+ Here is the caller graph for this function:

◆ setStat()

void com.realtime.crossfire.jxclient.stats.Stats.setStat ( final int  statNo,
final int  value 
)

Sets the given statistic numerical value.

Parameters
statNothe stat identifier; see the CS_STAT constants
valuethe value to assign to the chosen statistic

Definition at line 633 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.items.ItemsManager.playerReceived(), com.realtime.crossfire.jxclient.stats.Stats.reset(), com.realtime.crossfire.jxclient.stats.PoisonWatcher.setActive(), com.realtime.crossfire.jxclient.stats.Stats.setStatInt2(), com.realtime.crossfire.jxclient.stats.Stats.setStatInt4(), and com.realtime.crossfire.jxclient.items.ItemsManager.upditemReceived().

+ Here is the caller graph for this function:

◆ setStatInt2()

void com.realtime.crossfire.jxclient.stats.Stats.setStatInt2 ( final int  stat,
final short  param 
)

Updates a stat value with a two-byte int value.

Parameters
statthe stat
paramthe stat value

Definition at line 804 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.calculateExperienceToNextLevel(), com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_AC, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_APPLIED_CHA, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_APPLIED_CON, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_APPLIED_DEX, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_APPLIED_INT, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_APPLIED_POW, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_APPLIED_STR, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_APPLIED_WIS, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_ARMOUR, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_BASE_CHA, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_BASE_CON, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_BASE_DEX, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_BASE_INT, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_BASE_POW, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_BASE_STR, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_BASE_WIS, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_CHA, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_CON, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_DAM, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_DEX, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_FLAGS, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_FOOD, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_GOLEM_HP, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_GOLEM_MAXHP, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_GRACE, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_HP, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_INT, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_LEVEL, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_MAXGRACE, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_MAXHP, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_MAXSP, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_POW, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RACE_CHA, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RACE_CON, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RACE_DEX, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RACE_INT, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RACE_POW, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RACE_STR, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RACE_WIS, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_SP, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_STR, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_WC, com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_WIS, com.realtime.crossfire.jxclient.stats.Stats.reportUnhandledStat(), and com.realtime.crossfire.jxclient.stats.Stats.setStat().

Referenced by com.realtime.crossfire.jxclient.server.crossfire.DefaultCrossfireServerConnection.processStats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStatInt4()

◆ setStatInt8()

void com.realtime.crossfire.jxclient.stats.Stats.setStatInt8 ( final int  stat,
final long  param 
)

Updates a stat value with an eight-byte int value.

Parameters
statthe stat
paramthe stat value

Definition at line 899 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_EXP64, com.realtime.crossfire.jxclient.stats.Stats.reportUnhandledStat(), and com.realtime.crossfire.jxclient.stats.Stats.setExperience().

Referenced by com.realtime.crossfire.jxclient.server.crossfire.DefaultCrossfireServerConnection.processStats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStatSkill()

void com.realtime.crossfire.jxclient.stats.Stats.setStatSkill ( final int  stat,
final int  level,
final long  experience 
)

Updates a stat value with a skill value.

Parameters
statthe stat
levelthe stat value
experiencethe stat value

Definition at line 938 of file Stats.java.

References com.realtime.crossfire.jxclient.skills.SkillSet.getSkill(), com.realtime.crossfire.jxclient.stats.Stats.reportUnhandledStat(), and com.realtime.crossfire.jxclient.skills.Skill.set().

Referenced by com.realtime.crossfire.jxclient.server.crossfire.DefaultCrossfireServerConnection.processStats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setStatString()

void com.realtime.crossfire.jxclient.stats.Stats.setStatString ( final int  stat,
@NotNull final String  param 
)

◆ setTitle()

void com.realtime.crossfire.jxclient.stats.Stats.setTitle ( @NotNull final String  title)
private

Sets the current Title.

Parameters
titlethe new Title content

Definition at line 676 of file Stats.java.

References com.realtime.crossfire.jxclient.stats.Stats.title.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.reset(), and com.realtime.crossfire.jxclient.stats.Stats.setStatString().

+ Here is the caller graph for this function:

Member Data Documentation

◆ activeSkill

String com.realtime.crossfire.jxclient.stats.Stats.activeSkill = ""
private

◆ C_STAT_EXP_NEXT_LEVEL

final int com.realtime.crossfire.jxclient.stats.Stats.C_STAT_EXP_NEXT_LEVEL = 0x10000
static

The global experience needed to reach next level stat.

Definition at line 103 of file Stats.java.

◆ C_STAT_LOWFOOD

final int com.realtime.crossfire.jxclient.stats.Stats.C_STAT_LOWFOOD = 0x10003
static

The Low Food indicator.

It ranges from 0 (ok) to 1 (low food).

Definition at line 143 of file Stats.java.

◆ C_STAT_POISONED

final int com.realtime.crossfire.jxclient.stats.Stats.C_STAT_POISONED = 256
static

◆ C_STAT_WEIGHT

final int com.realtime.crossfire.jxclient.stats.Stats.C_STAT_WEIGHT = 257
static

◆ CS_NUM_SKILLS

final int com.realtime.crossfire.jxclient.stats.Stats.CS_NUM_SKILLS = 50
static

◆ CS_STAT_AC

◆ CS_STAT_APPLIED_CHA

◆ CS_STAT_APPLIED_CON

◆ CS_STAT_APPLIED_DEX

◆ CS_STAT_APPLIED_INT

◆ CS_STAT_APPLIED_POW

◆ CS_STAT_APPLIED_STR

◆ CS_STAT_APPLIED_WIS

◆ CS_STAT_ARMOUR

◆ CS_STAT_BASE_CHA

◆ CS_STAT_BASE_CON

◆ CS_STAT_BASE_DEX

◆ CS_STAT_BASE_INT

◆ CS_STAT_BASE_POW

◆ CS_STAT_BASE_STR

◆ CS_STAT_BASE_WIS

◆ CS_STAT_CHA

◆ CS_STAT_CON

◆ CS_STAT_DAM

◆ CS_STAT_DEX

◆ CS_STAT_EXP

◆ CS_STAT_EXP64

◆ CS_STAT_FLAGS

◆ CS_STAT_FOOD

◆ CS_STAT_GOLEM_HP

◆ CS_STAT_GOLEM_MAXHP

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_GOLEM_MAXHP = 54
static

◆ CS_STAT_GRACE

◆ CS_STAT_HP

◆ CS_STAT_INT

◆ CS_STAT_LEVEL

◆ CS_STAT_MAXGRACE

◆ CS_STAT_MAXHP

◆ CS_STAT_MAXSP

◆ CS_STAT_POW

◆ CS_STAT_RACE_CHA

◆ CS_STAT_RACE_CON

◆ CS_STAT_RACE_DEX

◆ CS_STAT_RACE_INT

◆ CS_STAT_RACE_POW

◆ CS_STAT_RACE_STR

◆ CS_STAT_RACE_WIS

◆ CS_STAT_RANGE

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RANGE = 20
static

◆ CS_STAT_RES_ACID

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_ACID = 106
static

Resistance to acid.

Definition at line 369 of file Stats.java.

◆ CS_STAT_RES_BLIND

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_BLIND = 117
static

Resistance to blindness.

Definition at line 424 of file Stats.java.

◆ CS_STAT_RES_COLD

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_COLD = 104
static

Resistance to cold.

Definition at line 359 of file Stats.java.

◆ CS_STAT_RES_CONF

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_CONF = 105
static

Resistance to confusion.

Definition at line 364 of file Stats.java.

◆ CS_STAT_RES_DEATH

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_DEATH = 115
static

Resistance to death.

Definition at line 414 of file Stats.java.

◆ CS_STAT_RES_DEPLETE

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_DEPLETE = 114
static

Resistance to depletion.

Definition at line 409 of file Stats.java.

◆ CS_STAT_RES_DRAIN

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_DRAIN = 107
static

Resistance to drain life.

Definition at line 374 of file Stats.java.

◆ CS_STAT_RES_ELEC

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_ELEC = 103
static

Resistance to electricity.

Definition at line 354 of file Stats.java.

◆ CS_STAT_RES_FEAR

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_FEAR = 113
static

Resistance to fear.

Definition at line 404 of file Stats.java.

◆ CS_STAT_RES_FIRE

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_FIRE = 102
static

Resistance to fire.

Definition at line 349 of file Stats.java.

◆ CS_STAT_RES_GHOSTHIT

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_GHOSTHIT = 108
static

Resistance to ghost hit.

Definition at line 379 of file Stats.java.

◆ CS_STAT_RES_HOLYWORD

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_HOLYWORD = 116
static

Resistance to holy word.

Definition at line 419 of file Stats.java.

◆ CS_STAT_RES_MAG

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_MAG = 101
static

Resistance to magical attacks.

Definition at line 344 of file Stats.java.

◆ CS_STAT_RES_PARA

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_PARA = 111
static

Resistance to paralysis.

Definition at line 394 of file Stats.java.

◆ CS_STAT_RES_PHYS

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_PHYS = 100
static

Resistance to physical attacks.

Definition at line 339 of file Stats.java.

◆ CS_STAT_RES_POISON

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_POISON = 109
static

Resistance to poison.

Definition at line 384 of file Stats.java.

◆ CS_STAT_RES_SLOW

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_SLOW = 110
static

Resistance to slowness.

Definition at line 389 of file Stats.java.

◆ CS_STAT_RES_TURN_UNDEAD

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RES_TURN_UNDEAD = 112
static

Resistance to turn undead.

Definition at line 399 of file Stats.java.

◆ CS_STAT_RESIST_END

final int com.realtime.crossfire.jxclient.stats.Stats.CS_STAT_RESIST_END = 117
static

End index of the resistances.

Definition at line 334 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.scripts.DefaultScriptProcess.cmdRequest().

◆ CS_STAT_RESIST_START

◆ CS_STAT_SKILLINFO

◆ CS_STAT_SP

◆ CS_STAT_SPEED

◆ CS_STAT_SPELL_ATTUNE

◆ CS_STAT_SPELL_DENY

◆ CS_STAT_SPELL_REPEL

◆ CS_STAT_STR

◆ CS_STAT_TITLE

◆ CS_STAT_WC

◆ CS_STAT_WEAP_SP

◆ CS_STAT_WEIGHT_LIM

◆ CS_STAT_WIS

◆ exp

long com.realtime.crossfire.jxclient.stats.Stats.exp
private

◆ experienceTable

final ExperienceTable com.realtime.crossfire.jxclient.stats.Stats.experienceTable
private

The ExperienceTable instance to use.

Definition at line 472 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.Stats().

◆ expNextLevel

long com.realtime.crossfire.jxclient.stats.Stats.expNextLevel
private

The experience needed to reach the next level.

Definition at line 494 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.getExperienceNextLevel().

◆ FLOAT_MULTI

final int com.realtime.crossfire.jxclient.stats.Stats.FLOAT_MULTI = 100000
static

Factor used to convert float to int values.

Definition at line 429 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.getFloatStat().

◆ guiStateListener

final GuiStateListener com.realtime.crossfire.jxclient.stats.Stats.guiStateListener
private

The GuiStateListener for detecting established or dropped connections.

Definition at line 526 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.Stats().

◆ range

String com.realtime.crossfire.jxclient.stats.Stats.range = ""
private

The current value of the range stat.

Definition at line 500 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.getRange(), and com.realtime.crossfire.jxclient.stats.Stats.setRange().

◆ RESIST_TYPES

final int com.realtime.crossfire.jxclient.stats.Stats.RESIST_TYPES = 18
static

◆ simpleWeaponSpeed

boolean com.realtime.crossfire.jxclient.stats.Stats.simpleWeaponSpeed
private

Whether the CS_STAT_WEAP_SP value contains the weapon speed directly.

Definition at line 460 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.setSimpleWeaponSpeed().

◆ skillSet

final SkillSet com.realtime.crossfire.jxclient.stats.Stats.skillSet
private

The SkillSet instance to use.

Definition at line 478 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.Stats().

◆ stats

final int [] com.realtime.crossfire.jxclient.stats.Stats.stats = new int[258]
private

The current stat values.

Definition at line 484 of file Stats.java.

◆ statsListeners

final EventListenerList2<StatsListener> com.realtime.crossfire.jxclient.stats.Stats.statsListeners = new EventListenerList2<>()
private

The listeners to inform of stat changes.

Definition at line 466 of file Stats.java.

◆ title

String com.realtime.crossfire.jxclient.stats.Stats.title = ""
private

The current value of the title stat.

Definition at line 506 of file Stats.java.

Referenced by com.realtime.crossfire.jxclient.stats.Stats.getTitle(), and com.realtime.crossfire.jxclient.stats.Stats.setTitle().

◆ unhandledStats

final Collection<String> com.realtime.crossfire.jxclient.stats.Stats.unhandledStats = new HashSet<>(0)
private

All unhandled stat values for which an error has been printed.

Definition at line 518 of file Stats.java.


The documentation for this class was generated from the following file: