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

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.InfoMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemStatic
All Implemented Interfaces:
IWorldObject, IStaticWorldObject
Direct Known Subclasses:
ItemMessage.ItemStaticMessage, ItemStaticImpl

public abstract class ItemStatic
extends InfoMessage
implements IStaticWorldObject

Abstract definition of the static part of the GameBots2004 message INV.

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


Field Summary
protected  long SimTime
           
 
Constructor Summary
ItemStatic()
          Parameter-less contructor for the message.
 
Method Summary
abstract  ItemStatic clone()
           
abstract  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.
 java.lang.Class getCompositeClass()
           
abstract  ItemDescriptor getDescriptor()
          Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.
abstract  UnrealId getId()
          Unique Id of the item.
abstract  NavPoint getNavPoint()
          If the Item is not dropped then it's item that is laying at some navpoint and this is that NavPoint instance.
abstract  UnrealId getNavPointId()
          Id of the navpoint where the item is laying.
 long getSimTime()
          Returns world time when the object was seen/updated for the last time.
abstract  ItemType getType()
          Class of the item (e.g.
protected  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 java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SimTime

protected long SimTime
Constructor Detail

ItemStatic

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

Method Detail

getSimTime

public long getSimTime()
Description copied from interface: IWorldObject
Returns world time when the object was seen/updated for the last time.

The time suppose to be growing as the simulation carries on.

Always should be actual_timestamp >= any_prevously_recorded_timestamp,

object1.getLastSeenTime() > object2.getLastSeenTime() means that object1 last seen after object2

Specified by:
getSimTime in interface IWorldObject
Returns:

setSimTime

protected void setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.


clone

public abstract ItemStatic clone()
Overrides:
clone in class java.lang.Object

getCompositeClass

public java.lang.Class getCompositeClass()
Specified by:
getCompositeClass in interface IStaticWorldObject

getId

public abstract UnrealId getId()
Unique Id of the item. This Id represents just item on the map, not in our inventory.

Specified by:
getId in interface IWorldObject
Returns:

getNavPointId

public abstract UnrealId getNavPointId()
Id of the navpoint where the item is laying. If null - the item was dropped by the bot or another player.


getNavPoint

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


getAmount

public abstract 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.


getType

public abstract ItemType getType()
Class of the item (e.g. xWeapons.FlakCannonPickup).


getDescriptor

public abstract ItemDescriptor getDescriptor()
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.


toString

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

toHtmlString

public java.lang.String toHtmlString()