 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.item;
37 import org.jetbrains.annotations.NotNull;
76 @SuppressWarnings(
"FieldCanBeLocal")
85 public void metaserver() {
90 public void preConnecting(@NotNull
final String serverInfo) {
95 public void connecting(@NotNull
final String serverInfo) {
100 public void connecting(@NotNull
final ClientSocketState clientSocketState, @NotNull
final String param) {
105 public void connected() {
110 public void connectFailed(@NotNull
final String reason) {
120 @SuppressWarnings(
"FieldCanBeLocal")
124 public void delinvReceived(
final int tag) {
129 public void delitemReceived(
final int @NotNull [] tags) {
134 public void addItemReceived(
final int location,
final int tag,
final int flags,
final int weight,
final int faceNum, @NotNull
final String name, @NotNull
final String namePl,
final int anim,
final int animSpeed,
final int nrof,
final int type) {
135 itemSet.
addItem(
new CfItem(location, tag, flags, weight,
facesManager.
getFace(faceNum), name, namePl, anim, animSpeed, nrof, type));
139 public void playerReceived(
final int tag,
final int weight,
final int faceNum, @NotNull
final String name) {
147 public void upditemReceived(
final int flags,
final int tag,
final int valLocation,
final int valFlags,
final int valWeight,
final int valFaceNum, @NotNull
final String valName, @NotNull
final String valNamePl,
final int valAnim,
final int valAnimSpeed,
final int valNrof) {
148 itemSet.
updateItem(flags, tag, valLocation, valFlags, valWeight,
facesManager.
getFace(valFaceNum), valName, valNamePl, valAnim, valAnimSpeed, valNrof);
151 if (player !=
null && player.
getTag() == tag) {
Maintains a mapping of face numbers to face data.
void reset()
Resets the manager's state.
Model class maintaining the CfItems known to the player.
final FacesManager facesManager
The FacesManager instance for looking up faces.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
final Stats stats
The Stats instance to update.
void setPlayer(@Nullable final CfItem player)
Sets the player object this client controls.
Face getFace(int faceNum)
Returns the Face instance for a given face ID.
Interface defining constants for the "upditem" Crossfire protocol message.
Interface for listeners interested gui state changes.
Manages image information ("faces") needed to display the map view, items, and spell icons.
final SkillSet skillSet
The SkillSet instance to update.
ItemsManager(@NotNull final FacesManager facesManager, @NotNull final Stats stats, @NotNull final SkillSet skillSet, @NotNull final GuiStateManager guiStateManager, @NotNull final ItemSet itemSet, @NotNull final CrossfireServerConnection server)
Creates a new instance.
final CrossfireUpdateItemListener crossfireUpdateItemListener
The CrossfireUpdateItemListener for detecting changed items.
The representation of a Crossfire Item, client-side.
void setActiveSkill(@NotNull final String activeSkill)
Sets the active skill name.
int getTag()
Returns the tag.
Maintains the current GuiState.
void cleanInventory(final int tag)
Clears the inventory of an item.
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.
final GuiStateListener guiStateListener
The GuiStateListener for detecting established or dropped connections.
CfItem getPlayer()
Returns the player object this client controls.
Interface for listeners interested in item related commands.
void updateItem(final int flags, final int tag, final int valLocation, final int valFlags, final int valWeight, @NotNull final Face valFace, @NotNull final String valName, @NotNull final String valNamePl, final int valAnim, final int valAnimSpeed, final int valNrof)
Processes an "upditem" command.
Connection progress states of the Crossfire server connection.
Maintain the set of skills as sent by the server.
static final int C_STAT_WEIGHT
The character's weight.
int UPD_WEIGHT
The update flags value for weight updates.
void addItem(@NotNull final CfItem item)
Adds an item.
void setStat(final int statNo, final int value)
Sets the given statistic numerical value.
A CfItem that represents a character.
Manages items known to the character.
final ItemSet itemSet
The known CfItems.
void removeItems(final int @NotNull[] tags)
Deletes items by tag.