|
|||||||||
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.ut2004.communication.messages.gbinfomessages.ItemPickedUp
public class ItemPickedUp
Definition of the event IPK.
Complete message documentation: 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).
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 java.lang.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 java.lang.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 Summary | |
---|---|
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,
java.lang.Boolean Dropped)
Creates new instance of the message 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()
Returns the simulation time when the event has occurred. |
ItemType |
getType()
Class of the item (e.g. |
java.lang.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. |
java.lang.String |
toHtmlString()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.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 java.lang.Boolean Dropped
Constructor Detail |
---|
public ItemPickedUp()
public ItemPickedUp(UnrealId Id, UnrealId InventoryId, Location Location, int Amount, int AmountSec, ItemType Type, ItemDescriptor Descriptor, java.lang.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
- Method Detail |
---|
public long getSimTime()
IWorldEvent
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 java.lang.Boolean isDropped()
public java.lang.String toString()
toString
in class InfoMessage
public java.lang.String toHtmlString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |