Class ItemsManager


  • public class ItemsManager
    extends java.lang.Object
    Manages items known to the character. This includes items on the floor, in the character's inventory, the character object itself, and items within containers known to the character.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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)
      An "additem" has been received.
      void delinvReceived​(int tag)
      A "delinv" command has been received.
      void delitemReceived​(int @NotNull [] tags)
      A "delitem" command has been received.
      void playerReceived​(int tag, int weight, int faceNum, @NotNull java.lang.String name)
      A "player" command has been received.
      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)
      An "upditem" command has been received.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ItemsManager

        public ItemsManager​(@NotNull
                            @NotNull FacesManager facesManager,
                            @NotNull
                            @NotNull Stats stats,
                            @NotNull
                            @NotNull SkillSet skillSet,
                            @NotNull
                            @NotNull GuiStateManager guiStateManager,
                            @NotNull
                            @NotNull ItemSet itemSet)
        Creates a new instance.
        Parameters:
        facesManager - the faces manager for looking up faces
        stats - the instance to update
        skillSet - the skill set instance to update
        guiStateManager - the gui state manager to watch
        itemSet - the item set to use
    • Method Detail

      • delinvReceived

        public void delinvReceived​(int tag)
        A "delinv" command has been received.
        Parameters:
        tag - the item tag
      • delitemReceived

        public void delitemReceived​(int @NotNull [] tags)
        A "delitem" command has been received.
        Parameters:
        tags - the item tags
      • addItemReceived

        public void addItemReceived​(int location,
                                    int tag,
                                    int flags,
                                    int weight,
                                    int faceNum,
                                    @NotNull
                                    @NotNull java.lang.String name,
                                    @NotNull
                                    @NotNull java.lang.String namePl,
                                    int anim,
                                    int animSpeed,
                                    int nrof,
                                    int type)
        An "additem" has been received.
        Parameters:
        location - the item's location
        tag - the item tag
        flags - the item's flags
        weight - the item's weight
        faceNum - the item's face ID
        name - the item's singular name
        namePl - the item's plural name
        anim - the item's animation ID
        animSpeed - the item's animation speed
        nrof - the number of items
        type - the item's type
      • playerReceived

        public void playerReceived​(int tag,
                                   int weight,
                                   int faceNum,
                                   @NotNull
                                   @NotNull java.lang.String name)
        A "player" command has been received.
        Parameters:
        tag - the player's taq
        weight - the player's weight
        faceNum - the player's face ID
        name - the player's name
      • upditemReceived

        public void upditemReceived​(int flags,
                                    int tag,
                                    int valLocation,
                                    int valFlags,
                                    int valWeight,
                                    int valFaceNum,
                                    @NotNull
                                    @NotNull java.lang.String valName,
                                    @NotNull
                                    @NotNull java.lang.String valNamePl,
                                    int valAnim,
                                    int valAnimSpeed,
                                    int valNrof)
        An "upditem" command has been received.
        Parameters:
        flags - the changed values
        tag - the item's tag
        valLocation - the item's location
        valFlags - the item's flags
        valWeight - the item's weight
        valFaceNum - the item's face ID
        valName - the item's singular name
        valNamePl - the item's plural name
        valAnim - the item's animation ID
        valAnimSpeed - the item's animation speed
        valNrof - the number of items