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

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

public class ItemStaticImpl
extends ItemStatic

Implementation 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.


Nested Class Summary
static class ItemStaticImpl.ItemStaticUpdate
           
 
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  ItemDescriptor Descriptor
          Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.
protected  UnrealId Id
          Unique Id of the item.
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  UnrealId NavPointId
          Id of the navpoint where the item is laying.
protected  ItemType Type
          Class of the item (e.g.
 
Fields inherited from class cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ItemStatic
SimTime
 
Constructor Summary
ItemStaticImpl()
          Parameter-less contructor for the message.
ItemStaticImpl(Item original)
          Cloning constructor from the full message.
ItemStaticImpl(ItemStatic original)
          Cloning constructor from the message part.
ItemStaticImpl(ItemStaticImpl original)
          Cloning constructor from the full message.
ItemStaticImpl(UnrealId Id, UnrealId NavPointId, NavPoint NavPoint, int Amount, ItemType Type, ItemDescriptor Descriptor)
          Creates new instance of the message Item.
 
Method Summary
 ItemStaticImpl clone()
           
 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.
 UnrealId getId()
          Unique Id 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.
 UnrealId getNavPointId()
          Id of the navpoint where the item is laying.
 ItemType getType()
          Class of the item (e.g.
 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.
 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.ItemStatic
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 just item on the map, not in our inventory.


NavPointId

protected UnrealId NavPointId
Id of the navpoint where the item is laying. If null - the item was dropped by the bot or another player.


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.


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.


Type

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


Descriptor

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

Constructor Detail

ItemStaticImpl

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


ItemStaticImpl

public ItemStaticImpl(UnrealId Id,
                      UnrealId NavPointId,
                      NavPoint NavPoint,
                      int Amount,
                      ItemType Type,
                      ItemDescriptor Descriptor)
Creates new instance of the message Item. Synchronous/asynchronous message. An object on the ground that can be picked up. Corresponding GameBots message (static part) 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.
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.

ItemStaticImpl

public ItemStaticImpl(Item original)
Cloning constructor from the full message.

Parameters:
original -

ItemStaticImpl

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

Parameters:
original -

ItemStaticImpl

public ItemStaticImpl(ItemStatic original)
Cloning constructor from the message part.

Parameters:
original -
Method Detail

setSimTime

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

Overrides:
setSimTime in class ItemStatic

clone

public ItemStaticImpl clone()
Specified by:
clone in class ItemStatic

getId

public 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
Specified by:
getId in class ItemStatic
Returns:

getNavPointId

public UnrealId getNavPointId()
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 ItemStatic

getNavPoint

public NavPoint getNavPoint()
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 ItemStatic

getAmount

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

Specified by:
getAmount in class ItemStatic

getType

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

Specified by:
getType in class ItemStatic

getDescriptor

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

Specified by:
getDescriptor in class ItemStatic

toString

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

toHtmlString

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

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.