public class AddInventoryMsg extends InfoMessage implements IWorldEvent, IWorldChangeEvent
| Modifier and Type | Field and Description |
|---|---|
protected ItemDescriptor |
Descriptor
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.
|
protected UnrealId |
Id
A unique Id for this inventory item, assigned by the game.
|
protected int |
MaxPrimaryAmmo
If the item is a weapon, contains information how much
primary ammo the weapon may have.
|
protected int |
MaxSecondaryAmmo
If the item is a weapon, contains information how much
secondary ammo the weapon may have.
|
protected Boolean |
Melee
If the item is a weapon, contains information whether
this weapon is a melee weapon.
|
protected ItemType |
PickupType
We get this item if we pick up this pickup class in the map.
|
protected int |
PrimaryInitialAmmo
If the item is a weapon, contains information how much
primary ammo the weapon initial has.
|
static String |
PROTOTYPE
Example how the message looks like - used during parser tests.
|
protected int |
SecondaryInitialAmmo
If the item is a weapon, contains information how much
secondary ammo the weapon initial has.
|
protected long |
SimTime |
protected Boolean |
Sniping
If the item is a weapon, contains information whether
this weapon is good for sniping.
|
protected String |
Type
A string representing type (inventory type) of the object.
|
| Constructor and Description |
|---|
AddInventoryMsg()
Parameter-less contructor for the message.
|
AddInventoryMsg(AddInventoryMsg original)
Cloning constructor from the full message.
|
AddInventoryMsg(UnrealId Id,
String Type,
ItemDescriptor Descriptor,
ItemType PickupType,
Boolean Sniping,
Boolean Melee,
int PrimaryInitialAmmo,
int MaxPrimaryAmmo,
int SecondaryInitialAmmo,
int MaxSecondaryAmmo)
Creates new instance of the message AddInventoryMsg.
|
| Modifier and Type | Method and Description |
|---|---|
ItemDescriptor |
getDescriptor()
Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.
|
UnrealId |
getId()
A unique Id for this inventory item, assigned by the game.
|
int |
getMaxPrimaryAmmo()
If the item is a weapon, contains information how much
primary ammo the weapon may have.
|
int |
getMaxSecondaryAmmo()
If the item is a weapon, contains information how much
secondary ammo the weapon may have.
|
ItemType |
getPickupType()
We get this item if we pick up this pickup class in the map.
|
int |
getPrimaryInitialAmmo()
If the item is a weapon, contains information how much
primary ammo the weapon initial has.
|
int |
getSecondaryInitialAmmo()
If the item is a weapon, contains information how much
secondary ammo the weapon initial has.
|
long |
getSimTime()
Simulation time in MILLI SECONDS !!!
|
String |
getType()
A string representing type (inventory type) of the object.
|
Boolean |
isMelee()
If the item is a weapon, contains information whether
this weapon is a melee weapon.
|
Boolean |
isSniping()
If the item is a weapon, contains information whether
this weapon is good for sniping.
|
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 String Type
protected ItemDescriptor Descriptor
protected ItemType PickupType
protected Boolean Sniping
protected Boolean Melee
protected int PrimaryInitialAmmo
protected int MaxPrimaryAmmo
protected int SecondaryInitialAmmo
protected int MaxSecondaryAmmo
public AddInventoryMsg()
public AddInventoryMsg(UnrealId Id, String Type, ItemDescriptor Descriptor, ItemType PickupType, Boolean Sniping, Boolean Melee, int PrimaryInitialAmmo, int MaxPrimaryAmmo, int SecondaryInitialAmmo, int MaxSecondaryAmmo)
Id - A unique Id for this inventory item, assigned by the game.
Unique, but based on a string describing the item type.Type - A string representing type (inventory type) of the object.Descriptor - Descriptor of the item - according the ItemType you may cast this to various XYZDescriptor.PickupType - We get this item if we pick up this pickup class in the map.Sniping - If the item is a weapon, contains information whether
this weapon is good for sniping.Melee - If the item is a weapon, contains information whether
this weapon is a melee weapon.PrimaryInitialAmmo - If the item is a weapon, contains information how much
primary ammo the weapon initial has.MaxPrimaryAmmo - If the item is a weapon, contains information how much
primary ammo the weapon may have.SecondaryInitialAmmo - If the item is a weapon, contains information how much
secondary ammo the weapon initial has.MaxSecondaryAmmo - If the item is a weapon, contains information how much
secondary ammo the weapon may have.public AddInventoryMsg(AddInventoryMsg original)
original - public long getSimTime()
getSimTime in interface IWorldChangeEventgetSimTime in interface IWorldEventprotected void setSimTime(long SimTime)
public UnrealId getId()
public String getType()
public ItemDescriptor getDescriptor()
public ItemType getPickupType()
public Boolean isSniping()
public Boolean isMelee()
public int getPrimaryInitialAmmo()
public int getMaxPrimaryAmmo()
public int getSecondaryInitialAmmo()
public int getMaxSecondaryAmmo()
public String toString()
toString in class InfoMessagepublic String toHtmlString()
public String toJsonLiteral()
toJsonLiteral in class InfoMessageCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.