wyvern.common.net
Interface RemoteInventory

All Known Subinterfaces:
RemoteClient

public interface RemoteInventory

Interface by which the server updates the client's inventory display.

Version:
1.0, Apr 20, 1998
Author:
Steve Yegge

Field Summary
static int GROUND
          This constant directs the output to the Ground display.
static int INVENTORY
          This constant directs the output to the Inventory display.
 
Method Summary
 void add(RPCDataSource sender, int display, java.lang.String name, java.lang.String commands, short pic, short index, short offset)
          Adds an object to the inventory list.
 void modify(RPCDataSource sender, int display, java.lang.String name, java.lang.String commands, short pic, short index, short offset)
          Modifies the nth object (name, picture or both).
 void remove(RPCDataSource sender, int display, short index)
          Removes the nth item from the inventory list.
 void resend(RPCDataSource sender, int display, java.lang.String[] names, java.lang.String[] commands, short[] pics, short[] offsets)
          Sends the inventory all at once.
 

Field Detail

INVENTORY

public static final int INVENTORY
This constant directs the output to the Inventory display.

See Also:
Constant Field Values

GROUND

public static final int GROUND
This constant directs the output to the Ground display.

See Also:
Constant Field Values
Method Detail

add

public void add(RPCDataSource sender,
                int display,
                java.lang.String name,
                java.lang.String commands,
                short pic,
                short index,
                short offset)
Adds an object to the inventory list.

Parameters:
sender - the RPCDataSource making this call, if any. Only appropriate for GroundCameras; pass null for inventory display.
display - the display (INVENTORY or GROUND) to update
name - the exact string to display for this inventory object
pic - the TileDatabase index of the object's picture, -1 if the object has no visible representation.
index - the position at which to add the item. -1 means add the item to the end of the list.
offset - the x & y offsets at which to draw the image. The user may be standing over part of a larger image, so we need to know how to clip it.

remove

public void remove(RPCDataSource sender,
                   int display,
                   short index)
Removes the nth item from the inventory list.

Parameters:
sender - the RPCDataSource making this call, if any. Only appropriate for GroundCameras; pass null for inventory display.
display - the display (INVENTORY or GROUND) to update
index - the index of the item to remove

modify

public void modify(RPCDataSource sender,
                   int display,
                   java.lang.String name,
                   java.lang.String commands,
                   short pic,
                   short index,
                   short offset)
Modifies the nth object (name, picture or both).

Parameters:
sender - the RPCDataSource making this call, if any. Only appropriate for GroundCameras; pass null for inventory display.
display - the display (INVENTORY or GROUND) to update
name - the new name
pic - the new picture
index - the index of the object to change
offset - the x & y offsets at which to draw the image. The user may be standing over part of a larger image, so we need to know how to clip it.

resend

public void resend(RPCDataSource sender,
                   int display,
                   java.lang.String[] names,
                   java.lang.String[] commands,
                   short[] pics,
                   short[] offsets)
Sends the inventory all at once. This instructs the client to dump all cached inventory items and recreate the list from the passed parameters.

Parameters:
sender - the RPCDataSource making this call, if any. Only appropriate for GroundCameras; pass null for inventory display.
display - the display (INVENTORY or GROUND) to update
names - a String array containing the item names
commands - a context-sensitive list of commands that can be used on the passed items.
pics - a short array containing the item picture numbers. The two arrays must be the same length.
offsets - the x & y offsets at which to draw the images. The user may be standing over part of a larger image, so we need to know how to clip it.