cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages
Class MyInventoryLocalImpl

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventoryLocal
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventoryLocalImpl
All Implemented Interfaces:
IWorldObject, ILocalWorldObject, java.lang.Cloneable

public class MyInventoryLocalImpl
extends MyInventoryLocal

Implementation of the local part of the GameBots2004 message MYINV.

Complete message documentation: An object in the observed player's inventory.


Nested Class Summary
static class MyInventoryLocalImpl.MyInventoryLocalUpdate
           
 
Field Summary
protected  int Amount
          If this item is ammo or armor, this holds the amount of the item the player has.
protected  int CurrentAltAmmo
          If this item is a weapon, this holds the amount of secondary ammo.
protected  int CurrentAmmo
          If this item is a weapon, this holds the amount of primary ammo.
protected  UnrealId Id
          Unique Id of the item.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventoryLocal
SimTime
 
Constructor Summary
MyInventoryLocalImpl()
          Parameter-less contructor for the message.
MyInventoryLocalImpl(MyInventory original)
          Cloning constructor from the full message.
MyInventoryLocalImpl(MyInventoryLocal original)
          Cloning constructor from the message part.
MyInventoryLocalImpl(MyInventoryLocalImpl original)
          Cloning constructor from the full message.
MyInventoryLocalImpl(UnrealId Id, int CurrentAmmo, int CurrentAltAmmo, int Amount)
          Creates new instance of the message MyInventory.
 
Method Summary
 MyInventoryLocalImpl clone()
           
 int getAmount()
          If this item is ammo or armor, this holds the amount of the item the player has.
 int getCurrentAltAmmo()
          If this item is a weapon, this holds the amount of secondary ammo.
 int getCurrentAmmo()
          If this item is a weapon, this holds the amount of primary ammo.
 UnrealId getId()
          Unique Id of the item.
 MyInventoryLocalImpl getLocal()
           
 ISharedWorldObject getShared()
           
 IStaticWorldObject getStatic()
           
 void setSimTime(long SimTime)
          Used by Yylex to slip correct time of the object or programmatically.
 java.lang.String toHtmlString()
           
 java.lang.String toString()
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventoryLocal
getCompositeClass, getSimTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Id

protected UnrealId Id
Unique Id of the item. This Id represents the item in the inventory.


CurrentAmmo

protected int CurrentAmmo
If this item is a weapon, this holds the amount of primary ammo.


CurrentAltAmmo

protected int CurrentAltAmmo
If this item is a weapon, this holds the amount of secondary ammo.


Amount

protected int Amount
If this item is ammo or armor, this holds the amount of the item the player has.

Constructor Detail

MyInventoryLocalImpl

public MyInventoryLocalImpl()
Parameter-less contructor for the message.


MyInventoryLocalImpl

public MyInventoryLocalImpl(UnrealId Id,
                            int CurrentAmmo,
                            int CurrentAltAmmo,
                            int Amount)
Creates new instance of the message MyInventory. An object in the observed player's inventory. Corresponding GameBots message (local part) is MYINV.

Parameters:
Id - Unique Id of the item. This Id represents the item in the inventory.
CurrentAmmo - If this item is a weapon, this holds the amount of primary ammo.
CurrentAltAmmo - If this item is a weapon, this holds the amount of secondary ammo.
Amount - If this item is ammo or armor, this holds the amount of the item the player has.

MyInventoryLocalImpl

public MyInventoryLocalImpl(MyInventory original)
Cloning constructor from the full message.

Parameters:
original -

MyInventoryLocalImpl

public MyInventoryLocalImpl(MyInventoryLocalImpl original)
Cloning constructor from the full message.

Parameters:
original -

MyInventoryLocalImpl

public MyInventoryLocalImpl(MyInventoryLocal original)
Cloning constructor from the message part.

Parameters:
original -
Method Detail

setSimTime

public void setSimTime(long SimTime)
Description copied from class: MyInventoryLocal
Used by Yylex to slip correct time of the object or programmatically.

Overrides:
setSimTime in class MyInventoryLocal

clone

public MyInventoryLocalImpl clone()
Specified by:
clone in interface ILocalWorldObject
Specified by:
clone in class MyInventoryLocal

getId

public UnrealId getId()
Unique Id of the item. This Id represents the item in the inventory.

Specified by:
getId in interface IWorldObject
Specified by:
getId in class MyInventoryLocal
Returns:

getCurrentAmmo

public int getCurrentAmmo()
If this item is a weapon, this holds the amount of primary ammo.

Specified by:
getCurrentAmmo in class MyInventoryLocal

getCurrentAltAmmo

public int getCurrentAltAmmo()
If this item is a weapon, this holds the amount of secondary ammo.

Specified by:
getCurrentAltAmmo in class MyInventoryLocal

getAmount

public int getAmount()
If this item is ammo or armor, this holds the amount of the item the player has.

Specified by:
getAmount in class MyInventoryLocal

getLocal

public MyInventoryLocalImpl getLocal()
Overrides:
getLocal in class MyInventoryLocal

getShared

public ISharedWorldObject getShared()
Overrides:
getShared in class MyInventoryLocal

getStatic

public IStaticWorldObject getStatic()
Overrides:
getStatic in class MyInventoryLocal

toString

public java.lang.String toString()
Overrides:
toString in class MyInventoryLocal

toHtmlString

public java.lang.String toHtmlString()
Overrides:
toHtmlString in class MyInventoryLocal