cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class Pick

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.Pick

public class Pick
extends CommandMessage

Representation of the GameBots2004 command PICK. When automatic pickup is disabled for bot (in ini bDisableAutoPickup=true) or if set by CONF {AutoPickupOff True}, use this command to pickup inventory the bot is currently at. Will fail if the bot can't pickup the item for some reason - weaponstay true and already had it before or etc.


Field Summary
protected  UnrealId Id
          Id of the pickup we want to pick up.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
 
Constructor Summary
Pick()
          Creates new instance of command Pick.
Pick(Pick original)
          Cloning constructor.
Pick(UnrealId Id)
          Creates new instance of command Pick.
 
Method Summary
 UnrealId getId()
          Id of the pickup we want to pick up.
 Pick setId(UnrealId Id)
          Id of the pickup we want to pick up.
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Id

protected UnrealId Id
Id of the pickup we want to pick up.

Constructor Detail

Pick

public Pick(UnrealId Id)
Creates new instance of command Pick. When automatic pickup is disabled for bot (in ini bDisableAutoPickup=true) or if set by CONF {AutoPickupOff True}, use this command to pickup inventory the bot is currently at. Will fail if the bot can't pickup the item for some reason - weaponstay true and already had it before or etc. Corresponding GameBots message for this command is PICK.

Parameters:
Id - Id of the pickup we want to pick up.

Pick

public Pick()
Creates new instance of command Pick. When automatic pickup is disabled for bot (in ini bDisableAutoPickup=true) or if set by CONF {AutoPickupOff True}, use this command to pickup inventory the bot is currently at. Will fail if the bot can't pickup the item for some reason - weaponstay true and already had it before or etc. Corresponding GameBots message for this command is PICK.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


Pick

public Pick(Pick original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public UnrealId getId()
Id of the pickup we want to pick up.


setId

public Pick setId(UnrealId Id)
Id of the pickup we want to pick up.


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()