|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.communication.messages.InfoMessage cz.cuni.amis.pogamut.udk.communication.messages.GBEvent cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.ItemPickedUp
public class ItemPickedUp
Asynchronous message. Comes when we have picked up an item. This does not mean the item will be added to our inventory (for example Adrenaline or Health pickup just raise our stats). Corresponding GameBots message is IPK.
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 int |
AmountSec
Only sent if this item is a weapon. |
protected ItemDescriptor |
Descriptor
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor. |
protected Boolean |
Dropped
Whether it is a regular item or dropped by player or bot. |
protected UnrealId |
Id
Unique Id of the item. |
protected UnrealId |
InventoryId
Unique Id of the item in our inventory - use this Id to do changeweapons etc. |
protected Location |
Location
Location of the item. |
static String |
PROTOTYPE
Example how the message looks like - used during parser tests. |
protected ItemType |
Type
Class of the item (e.g. xWeapons.FlakCannonPickup). |
Constructor Summary | |
---|---|
ItemPickedUp()
Used by Yylex to create empty message then to fill it's protected fields (Yylex is in the same package). |
|
ItemPickedUp(ItemPickedUp original)
Cloning constructor. |
|
ItemPickedUp(UnrealId Id,
UnrealId InventoryId,
Location Location,
int Amount,
int AmountSec,
ItemType Type,
ItemDescriptor Descriptor,
Boolean Dropped)
Creates new instance of command ItemPickedUp. |
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. |
int |
getAmountSec()
Only sent if this item is a weapon. |
ItemDescriptor |
getDescriptor()
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor. |
UnrealId |
getId()
Unique Id of the item. |
UnrealId |
getInventoryId()
Unique Id of the item in our inventory - use this Id to do changeweapons etc. |
Location |
getLocation()
Location of the item. |
long |
getSimTime()
|
ItemType |
getType()
Class of the item (e.g. xWeapons.FlakCannonPickup). |
Boolean |
isDropped()
Whether it is a regular item or dropped by player or bot. |
String |
toHtmlString()
|
String |
toString()
|
Methods inherited from class cz.cuni.amis.pogamut.udk.communication.messages.GBEvent |
---|
getWorldEvent |
Methods inherited from class cz.cuni.amis.pogamut.base.communication.messages.InfoMessage |
---|
toJsonLiteral |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String PROTOTYPE
protected UnrealId Id
protected UnrealId InventoryId
protected Location Location
protected int Amount
protected int AmountSec
protected ItemType Type
protected ItemDescriptor Descriptor
protected Boolean Dropped
Constructor Detail |
---|
public ItemPickedUp(UnrealId Id, UnrealId InventoryId, Location Location, int Amount, int AmountSec, ItemType Type, ItemDescriptor Descriptor, Boolean Dropped)
Id
- Unique Id of the item. This Id represents just item on the
map, not in our inventory.InventoryId
- Unique Id of the item in our inventory - use this Id to do changeweapons etc.
Unreal has different Ids for items in map and actual item in bot's inventory.
If the item does not go into our inventory nothing will be here (null).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. Works also for weapons - will hold primary ammo amount.AmountSec
- Only sent if this item is a weapon. Holds secondary ammo amount.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 a regular item or dropped by player or bot.public ItemPickedUp(ItemPickedUp original)
public ItemPickedUp()
Method Detail |
---|
public UnrealId getId()
public UnrealId getInventoryId()
public Location getLocation()
getLocation
in interface ILocated
public int getAmount()
public int getAmountSec()
public ItemType getType()
public ItemDescriptor getDescriptor()
public Boolean isDropped()
public long getSimTime()
getSimTime
in interface IWorldChangeEvent
getSimTime
in interface IWorldEvent
getSimTime
in class GBEvent
public String toString()
toString
in class InfoMessage
public String toHtmlString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |