public class ItemsManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private FacesManager |
facesManager
The
FacesManager instance for looking up faces. |
private GuiStateListener |
guiStateListener
The
GuiStateListener for detecting established or dropped
connections. |
private ItemSet |
itemSet
The known
CfItems . |
private SkillSet |
skillSet
The
SkillSet instance to update. |
private Stats |
stats
The
Stats instance to update. |
Constructor and Description |
---|
ItemsManager(FacesManager facesManager,
Stats stats,
SkillSet skillSet,
GuiStateManager guiStateManager,
ItemSet itemSet)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addItemReceived(int location,
int tag,
int flags,
int weight,
int faceNum,
java.lang.String name,
java.lang.String namePl,
int anim,
int animSpeed,
int nrof,
int type)
An "additem" has been received.
|
void |
delinvReceived(int tag)
A "delinv" command has been received.
|
void |
delitemReceived(int[] tags)
A "delitem" command has been received.
|
void |
playerReceived(int tag,
int weight,
int faceNum,
java.lang.String name)
A "player" command has been received.
|
void |
upditemReceived(int flags,
int tag,
int valLocation,
int valFlags,
int valWeight,
int valFaceNum,
java.lang.String valName,
java.lang.String valNamePl,
int valAnim,
int valAnimSpeed,
int valNrof)
An "upditem" command has been received.
|
@NotNull private final FacesManager facesManager
FacesManager
instance for looking up faces.@NotNull private final GuiStateListener guiStateListener
GuiStateListener
for detecting established or dropped
connections.public ItemsManager(@NotNull FacesManager facesManager, @NotNull Stats stats, @NotNull SkillSet skillSet, @NotNull GuiStateManager guiStateManager, @NotNull ItemSet itemSet)
facesManager
- the faces manager for looking up facesstats
- the instance to updateskillSet
- the skill set instance to updateguiStateManager
- the gui state manager to watchitemSet
- the item set to usepublic void addItemReceived(int location, int tag, int flags, int weight, int faceNum, @NotNull java.lang.String name, @NotNull java.lang.String namePl, int anim, int animSpeed, int nrof, int type)
location
- the item's locationtag
- the item tagflags
- the item's flagsweight
- the item's weightfaceNum
- the item's face IDname
- the item's singular namenamePl
- the item's plural nameanim
- the item's animation IDanimSpeed
- the item's animation speednrof
- the number of itemstype
- the item's typepublic void delinvReceived(int tag)
tag
- the item tagpublic void delitemReceived(@NotNull int[] tags)
tags
- the item tagspublic void playerReceived(int tag, int weight, int faceNum, @NotNull java.lang.String name)
tag
- the player's taqweight
- the player's weightfaceNum
- the player's face IDname
- the player's namepublic void upditemReceived(int flags, int tag, int valLocation, int valFlags, int valWeight, int valFaceNum, @NotNull java.lang.String valName, @NotNull java.lang.String valNamePl, int valAnim, int valAnimSpeed, int valNrof)
flags
- the changed valuestag
- the item's tagvalLocation
- the item's locationvalFlags
- the item's flagsvalWeight
- the item's weightvalFaceNum
- the item's face IDvalName
- the item's singular namevalNamePl
- the item's plural namevalAnim
- the item's animation IDvalAnimSpeed
- the item's animation speedvalNrof
- the number of items