|
||||||||||
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.ItemReceived
public class ItemReceived
Definition of the event IRC.
Complete message documentation: Asynchronous message. Other bot gave us an item. We receive normal IPK message and this message with information about the giver and the item.
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 Boolean |
Dropped
Whether it is a regular item or dropped by player or bot. |
protected UnrealId |
GiverId
Unique Id of the bot that gave us this item. |
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 String |
Type
Class of the item. |
Constructor Summary | |
---|---|
ItemReceived()
Parameter-less contructor for the message. |
|
ItemReceived(ItemReceived original)
Cloning constructor from the full message. |
|
ItemReceived(UnrealId Id,
UnrealId InventoryId,
UnrealId GiverId,
Location Location,
int Amount,
String Type,
Boolean Dropped)
Creates new instance of the message ItemReceived. |
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. |
UnrealId |
getGiverId()
Unique Id of the bot that gave us this item. |
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 !!! |
String |
getType()
Class of the item. |
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()
|
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 long SimTime
protected UnrealId Id
protected UnrealId InventoryId
protected UnrealId GiverId
protected Location Location
protected int Amount
protected String Type
protected Boolean Dropped
Constructor Detail |
---|
public ItemReceived()
public ItemReceived(UnrealId Id, UnrealId InventoryId, UnrealId GiverId, Location Location, int Amount, String Type, 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).GiverId
- Unique Id of the bot that gave us this item.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.Type
- Class of the item.Dropped
- Whether it is a regular item or dropped by player or bot.public ItemReceived(ItemReceived original)
original
- Method Detail |
---|
public long getSimTime()
getSimTime
in interface IWorldChangeEvent
getSimTime
in interface IWorldEvent
protected void setSimTime(long SimTime)
public UnrealId getId()
public UnrealId getInventoryId()
public UnrealId getGiverId()
public Location getLocation()
public int getAmount()
public String getType()
public Boolean isDropped()
public String toString()
toString
in class InfoMessage
public String toHtmlString()
public String toJsonLiteral()
toJsonLiteral
in class InfoMessage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |