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

Package class diagram package ItemMessage
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item
          extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemMessage
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.communication.translator.event.IWorldChangeEvent, cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.base.communication.worldview.event.IWorldEvent, cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject, cz.cuni.amis.pogamut.base3d.worldview.object.ILocated, cz.cuni.amis.pogamut.base3d.worldview.object.IViewable, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject, ItemTyped, IGBViewable, cz.cuni.amis.utils.listener.Event

public class ItemMessage
extends Item
implements cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent, cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

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

Complete message documentation: Synchronous/asynchronous message. An object on the ground that can be picked up.


Nested Class Summary
 class ItemMessage.ItemLocalMessage
          Implementation of the local part of the GameBots2004 message INV, used to facade INVMessage.
 class ItemMessage.ItemSharedMessage
          Implementation of the shared part of the GameBots2004 message INV, used to facade INVMessage.
 class ItemMessage.ItemStaticMessage
          Implementation of the static part of the GameBots2004 message INV, used to facade INVMessage.
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item
Item.ItemUpdate, Item.ObjectDisappeared
 
Field Summary
protected  int Amount
          If this item is some ammo or health pack, here we can find out how much of the attribute this item will add.
protected  boolean Amount_Set
          Whether property 'Amount' 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  boolean Dropped
          Whether it is regular item or one dropped by some bot (usually during dying).
protected  boolean Dropped_Set
          Whether property 'Dropped' was received from GB2004.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
          Unique Id of the item.
protected  boolean Id_Set
          Whether property 'Id' was received from GB2004.
protected  cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
          Location of the item.
protected  boolean Location_Set
          Whether property 'Location' was received from GB2004.
protected  NavPoint NavPoint
          If the Item is not dropped then it's item that is laying at some navpoint and this is that NavPoint instance.
protected  boolean NavPoint_Set
          Whether property 'NavPoint' was received from GB2004.
protected  cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId NavPointId
          Id of the navpoint where the item is laying.
protected  boolean NavPointId_Set
          Whether property 'NavPointId' was received from GB2004.
protected  cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId
           
protected  ItemType Type
          Class of the item (e.g.
protected  boolean Type_Set
          Whether property 'Type' was received from GB2004.
protected  boolean Visible
          If the item is in the field of view of the bot.
protected  boolean Visible_Set
          Whether property 'Visible' was received from GB2004.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item
PROTOTYPE, SimTime
 
Constructor Summary
ItemMessage()
          Parameter-less contructor for the message.
ItemMessage(ItemMessage original)
          Cloning constructor from the full message.
ItemMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id, cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId NavPointId, NavPoint NavPoint, boolean Visible, cz.cuni.amis.pogamut.base3d.worldview.object.Location Location, int Amount, ItemType Type, ItemDescriptor Descriptor, boolean Dropped)
          Creates new instance of the message Item.
 
Method Summary
 int getAmount()
          If this item is some ammo or health pack, here we can find out how much of the attribute this item will add.
 ItemDescriptor getDescriptor()
          Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
          Unique Id of the item.
 ItemLocal getLocal()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ILocalWorldObjectUpdatedEvent getLocalEvent()
           
 cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
          Location of the item.
 NavPoint getNavPoint()
          If the Item is not dropped then it's item that is laying at some navpoint and this is that NavPoint instance.
 cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getNavPointId()
          Id of the navpoint where the item is laying.
 ItemShared getShared()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
           
 ItemStatic getStatic()
           
 cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
           
 cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()
           
 ItemType getType()
          Class of the item (e.g.
 boolean isDropped()
          Whether it is regular item or one dropped by some bot (usually during dying).
 boolean isVisible()
          If the item is in the field of view of the bot.
 void setNavPoint(NavPoint navPoint)
          DO NOT USE THIS METHOD! Reserved for GaviaLib (Pogamut core)! It's used to set correct navpoint instance into the item.
protected  void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId)
          Used by Yylex to slip corretn TeamId.
 String toHtmlString()
           
 String toString()
           
 cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult<cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject> update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject object)
           
 
Methods inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Item
createDisappearEvent, getSimTime, setSimTime
 
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 cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId

Id

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id
Unique Id of the item. This Id represents just item on the map, not in our inventory.


Id_Set

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


NavPointId

protected cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId NavPointId
Id of the navpoint where the item is laying. If null - the item was dropped by the bot or another player.


NavPointId_Set

protected boolean NavPointId_Set
Whether property 'NavPointId' was received from GB2004.


NavPoint

protected NavPoint NavPoint
If the Item is not dropped then it's item that is laying at some navpoint and this is that NavPoint instance.


NavPoint_Set

protected boolean NavPoint_Set
Whether property 'NavPoint' was received from GB2004.


Visible

protected boolean Visible
If the item is in the field of view of the bot.


Visible_Set

protected boolean Visible_Set
Whether property 'Visible' was received from GB2004.


Location

protected cz.cuni.amis.pogamut.base3d.worldview.object.Location Location
Location of the item.


Location_Set

protected boolean Location_Set
Whether property 'Location' was received from GB2004.


Amount

protected int Amount
If this item is some ammo or health pack, here we can find out how much of the attribute this item will add.


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.


Dropped

protected boolean Dropped
Whether it is regular item or one dropped by some bot (usually during dying). Items that are not dropped usually respawns itself (depends on the game settings) while those that are dropped may be taken only once.


Dropped_Set

protected boolean Dropped_Set
Whether property 'Dropped' was received from GB2004.

Constructor Detail

ItemMessage

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


ItemMessage

public ItemMessage(cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId Id,
                   cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId NavPointId,
                   NavPoint NavPoint,
                   boolean Visible,
                   cz.cuni.amis.pogamut.base3d.worldview.object.Location Location,
                   int Amount,
                   ItemType Type,
                   ItemDescriptor Descriptor,
                   boolean Dropped)
Creates new instance of the message Item. Synchronous/asynchronous message. An object on the ground that can be picked up. Corresponding GameBots message is INV.

Parameters:
Id - Unique Id of the item. This Id represents just item on the map, not in our inventory.
NavPointId - Id of the navpoint where the item is laying. If null - the item was dropped by the bot or another player.
NavPoint - If the Item is not dropped then it's item that is laying at some navpoint and this is that NavPoint instance.
Visible - If the item is in the field of view of the bot.
Location - Location of the item.
Amount - If this item is some ammo or health pack, here we can find out how much of the attribute this item will add.
Type - Class of the item (e.g. xWeapons.FlakCannonPickup).
Descriptor - Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.
Dropped - Whether it is regular item or one dropped by some bot (usually during dying). Items that are not dropped usually respawns itself (depends on the game settings) while those that are dropped may be taken only once.

ItemMessage

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

Parameters:
original -
Method Detail

setTeamId

protected void setTeamId(cz.cuni.amis.pogamut.multi.agent.ITeamId TeamId)
Used by Yylex to slip corretn TeamId.


getTeamId

public cz.cuni.amis.pogamut.multi.agent.ITeamId getTeamId()

getId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getId()
Description copied from class: Item
Unique Id of the item. This Id represents just item on the map, not in our inventory.

Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent
Specified by:
getId in interface cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject
Specified by:
getId in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent
Specified by:
getId in class Item

getNavPointId

public cz.cuni.amis.pogamut.unreal.communication.messages.UnrealId getNavPointId()
Description copied from class: Item
Id of the navpoint where the item is laying. If null - the item was dropped by the bot or another player.

Specified by:
getNavPointId in class Item

getNavPoint

public NavPoint getNavPoint()
Description copied from class: Item
If the Item is not dropped then it's item that is laying at some navpoint and this is that NavPoint instance.

Specified by:
getNavPoint in class Item

isVisible

public boolean isVisible()
Description copied from class: Item
If the item is in the field of view of the bot.

Specified by:
isVisible in interface cz.cuni.amis.pogamut.base3d.worldview.object.IViewable
Specified by:
isVisible in class Item

getLocation

public cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation()
Description copied from class: Item
Location of the item.

Specified by:
getLocation in interface cz.cuni.amis.pogamut.base3d.worldview.object.ILocated
Specified by:
getLocation in class Item

getAmount

public int getAmount()
Description copied from class: Item
If this item is some ammo or health pack, here we can find out how much of the attribute this item will add.

Specified by:
getAmount in class Item

getType

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

Specified by:
getType in interface ItemTyped
Specified by:
getType in class Item
Returns:

getDescriptor

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

Specified by:
getDescriptor in class Item

isDropped

public boolean isDropped()
Description copied from class: Item
Whether it is regular item or one dropped by some bot (usually during dying). Items that are not dropped usually respawns itself (depends on the game settings) while those that are dropped may be taken only once.

Specified by:
isDropped in class Item

getLocal

public ItemLocal getLocal()
Specified by:
getLocal in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

getShared

public ItemShared getShared()
Specified by:
getShared in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

getStatic

public ItemStatic getStatic()
Specified by:
getStatic in interface cz.cuni.amis.pogamut.multi.communication.worldview.object.ICompositeWorldObject

update

public cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdateResult<cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject> update(cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObject object)
Specified by:
update in interface cz.cuni.amis.pogamut.base.communication.translator.event.IWorldObjectUpdatedEvent

getLocalEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.ILocalWorldObjectUpdatedEvent getLocalEvent()
Specified by:
getLocalEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

getSharedEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.ISharedWorldObjectUpdatedEvent getSharedEvent()
Specified by:
getSharedEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

getStaticEvent

public cz.cuni.amis.pogamut.multi.communication.translator.event.IStaticWorldObjectUpdatedEvent getStaticEvent()
Specified by:
getStaticEvent in interface cz.cuni.amis.pogamut.multi.communication.translator.event.ICompositeWorldObjectUpdatedEvent

toString

public String toString()
Overrides:
toString in class Item

toHtmlString

public String toHtmlString()
Overrides:
toHtmlString in class Item

setNavPoint

public void setNavPoint(NavPoint navPoint)
DO NOT USE THIS METHOD! Reserved for GaviaLib (Pogamut core)! It's used to set correct navpoint instance into the item.



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