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

Package class diagram package MyInventoryMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventory
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventoryMessage
All Implemented Interfaces:
IWorldChangeEvent, IWorldObjectUpdatedEvent, IWorldEvent, IWorldObject, ICompositeWorldObjectUpdatedEvent, ICompositeWorldObject, cz.cuni.amis.utils.listener.Event

public class MyInventoryMessage
extends MyInventory
implements IWorldObjectUpdatedEvent, ICompositeWorldObjectUpdatedEvent

Implementation of the GameBots2004 message MYINV contains also its Local/Shared/Static subpart class definitions..

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


Nested Class Summary
 class MyInventoryMessage.MyInventoryLocalMessage
          Implementation of the local part of the GameBots2004 message MYINV, used to facade MYINVMessage.
 class MyInventoryMessage.MyInventorySharedMessage
          Implementation of the shared part of the GameBots2004 message MYINV, used to facade MYINVMessage.
 class MyInventoryMessage.MyInventoryStaticMessage
          Implementation of the static part of the GameBots2004 message MYINV, used to facade MYINVMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventory
MyInventory.MyInventoryUpdate
 
Nested classes/interfaces inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
IWorldObjectUpdatedEvent.DestroyWorldObject
 
Field Summary
protected  int Amount
          If this item is ammo or armor, this holds the amount of the item the player has.
protected  boolean Amount_Set
          Whether property 'Amount' was received from GB2004.
protected  int CurrentAltAmmo
          If this item is a weapon, this holds the amount of secondary ammo.
protected  boolean CurrentAltAmmo_Set
          Whether property 'CurrentAltAmmo' was received from GB2004.
protected  int CurrentAmmo
          If this item is a weapon, this holds the amount of primary ammo.
protected  boolean CurrentAmmo_Set
          Whether property 'CurrentAmmo' was received from GB2004.
protected  ItemDescriptor Descriptor
          Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.
protected  boolean Descriptor_Set
          Whether property 'Descriptor' was received from GB2004.
protected  UnrealId Id
          Unique Id of the item.
protected  boolean Id_Set
          Whether property 'Id' was received from GB2004.
protected  ITeamId TeamId
           
protected  ItemType Type
          Class of the item (e.g. xWeapons.FlakCannonPickup).
protected  boolean Type_Set
          Whether property 'Type' was received from GB2004.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventory
PROTOTYPE, SimTime
 
Constructor Summary
MyInventoryMessage()
          Parameter-less contructor for the message.
MyInventoryMessage(MyInventoryMessage original)
          Cloning constructor from the full message.
MyInventoryMessage(UnrealId Id, int CurrentAmmo, int CurrentAltAmmo, int Amount, ItemType Type, ItemDescriptor Descriptor)
          Creates new instance of the message MyInventory.
 
Method Summary
 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.
 ItemDescriptor getDescriptor()
          Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.
 UnrealId getId()
          Unique Id of the item.
 MyInventoryLocal getLocal()
           
 ILocalWorldObjectUpdatedEvent getLocalEvent()
           
 MyInventoryShared getShared()
           
 ISharedWorldObjectUpdatedEvent getSharedEvent()
           
 MyInventoryStatic getStatic()
           
 IStaticWorldObjectUpdatedEvent getStaticEvent()
           
 ITeamId getTeamId()
           
 ItemType getType()
          Class of the item (e.g. xWeapons.FlakCannonPickup).
protected  void setTeamId(ITeamId TeamId)
          Used by Yylex to slip corretn TeamId.
 String toHtmlString()
           
 String toString()
           
 IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.MyInventory
getSimTime, setSimTime, toJsonLiteral
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent
getSimTime
 

Field Detail

TeamId

protected ITeamId TeamId

Id

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


Id_Set

protected boolean Id_Set
Whether property 'Id' was received from GB2004.


CurrentAmmo

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


CurrentAmmo_Set

protected boolean CurrentAmmo_Set
Whether property 'CurrentAmmo' was received from GB2004.


CurrentAltAmmo

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


CurrentAltAmmo_Set

protected boolean CurrentAltAmmo_Set
Whether property 'CurrentAltAmmo' was received from GB2004.


Amount

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


Amount_Set

protected boolean Amount_Set
Whether property 'Amount' was received from GB2004.


Type

protected ItemType Type
Class of the item (e.g. xWeapons.FlakCannonPickup).


Type_Set

protected boolean Type_Set
Whether property 'Type' was received from GB2004.


Descriptor

protected ItemDescriptor Descriptor
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.


Descriptor_Set

protected boolean Descriptor_Set
Whether property 'Descriptor' was received from GB2004.

Constructor Detail

MyInventoryMessage

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


MyInventoryMessage

public MyInventoryMessage(UnrealId Id,
                          int CurrentAmmo,
                          int CurrentAltAmmo,
                          int Amount,
                          ItemType Type,
                          ItemDescriptor Descriptor)
Creates new instance of the message MyInventory. An object in the observed player's inventory. Corresponding GameBots message 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.
Type - Class of the item (e.g. xWeapons.FlakCannonPickup).
Descriptor - Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.

MyInventoryMessage

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

Parameters:
original -
Method Detail

setTeamId

protected void setTeamId(ITeamId TeamId)
Used by Yylex to slip corretn TeamId.


getTeamId

public ITeamId getTeamId()

getId

public UnrealId getId()
Description copied from class: MyInventory
Unique Id of the item. This Id represents the item in the inventory.

Specified by:
getId in interface IWorldObjectUpdatedEvent
Specified by:
getId in interface IWorldObject
Specified by:
getId in interface ICompositeWorldObjectUpdatedEvent
Specified by:
getId in class MyInventory

getCurrentAmmo

public int getCurrentAmmo()
Description copied from class: MyInventory
If this item is a weapon, this holds the amount of primary ammo.

Specified by:
getCurrentAmmo in class MyInventory

getCurrentAltAmmo

public int getCurrentAltAmmo()
Description copied from class: MyInventory
If this item is a weapon, this holds the amount of secondary ammo.

Specified by:
getCurrentAltAmmo in class MyInventory

getAmount

public int getAmount()
Description copied from class: MyInventory
If this item is ammo or armor, this holds the amount of the item the player has.

Specified by:
getAmount in class MyInventory

getType

public ItemType getType()
Description copied from class: MyInventory
Class of the item (e.g. xWeapons.FlakCannonPickup).

Specified by:
getType in class MyInventory

getDescriptor

public ItemDescriptor getDescriptor()
Description copied from class: MyInventory
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.

Specified by:
getDescriptor in class MyInventory

getLocal

public MyInventoryLocal getLocal()
Specified by:
getLocal in interface ICompositeWorldObject

getShared

public MyInventoryShared getShared()
Specified by:
getShared in interface ICompositeWorldObject

getStatic

public MyInventoryStatic getStatic()
Specified by:
getStatic in interface ICompositeWorldObject

update

public IWorldObjectUpdateResult<IWorldObject> update(IWorldObject object)
Specified by:
update in interface IWorldObjectUpdatedEvent

getLocalEvent

public ILocalWorldObjectUpdatedEvent getLocalEvent()
Specified by:
getLocalEvent in interface ICompositeWorldObjectUpdatedEvent

getSharedEvent

public ISharedWorldObjectUpdatedEvent getSharedEvent()
Specified by:
getSharedEvent in interface ICompositeWorldObjectUpdatedEvent

getStaticEvent

public IStaticWorldObjectUpdatedEvent getStaticEvent()
Specified by:
getStaticEvent in interface ICompositeWorldObjectUpdatedEvent

toString

public String toString()
Overrides:
toString in class MyInventory

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class MyInventory


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.