public class ItemPickedUp extends InfoMessage implements IWorldEvent, IWorldChangeEvent, ILocated
Modifier and Type | Field and Description |
---|---|
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 long |
SimTime |
protected ItemType |
Type
Class of the item (e.g.
|
Constructor and Description |
---|
ItemPickedUp()
Parameter-less contructor for the message.
|
ItemPickedUp(ItemPickedUp original)
Cloning constructor from the full message.
|
ItemPickedUp(UnrealId Id,
UnrealId InventoryId,
Location Location,
int Amount,
int AmountSec,
ItemType Type,
ItemDescriptor Descriptor,
Boolean Dropped)
Creates new instance of the message ItemPickedUp.
|
Modifier and Type | Method and Description |
---|---|
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()
Simulation time in MILLI SECONDS !!!
|
ItemType |
getType()
Class of the item (e.g.
|
Boolean |
isDropped()
Whether it is a regular item or dropped by player or bot.
|
protected void |
setSimTime(long SimTime)
Used by Yylex to slip correct time of the object or programmatically.
|
String |
toHtmlString() |
String |
toJsonLiteral() |
String |
toString() |
public static final String PROTOTYPE
protected long SimTime
protected UnrealId Id
protected UnrealId InventoryId
protected Location Location
protected int Amount
protected int AmountSec
protected ItemType Type
protected ItemDescriptor Descriptor
protected Boolean Dropped
public ItemPickedUp()
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)
original
- public long getSimTime()
getSimTime
in interface IWorldChangeEvent
getSimTime
in interface IWorldEvent
protected void setSimTime(long SimTime)
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 String toString()
toString
in class InfoMessage
public String toHtmlString()
public String toJsonLiteral()
toJsonLiteral
in class InfoMessage
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.