public class CombatPet extends Pet implements java.io.Serializable, MessageCallback
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.ScheduledFuture<?> |
scheduledDistanceExecutioner |
protected java.util.concurrent.ScheduledFuture<?> |
scheduledExecutioner |
mobTemplateID
staticLock, subObjectNamespacesInt, transientPropertyKeys, type
lock, name
NO_FLAGS, RESPONSE_EXPECTED
Constructor and Description |
---|
CombatPet() |
CombatPet(int mobTemplateID,
OID ownerOid,
java.lang.Long duration,
int passiveEffect) |
Modifier and Type | Method and Description |
---|---|
boolean |
activate()
Activates the message subscriptions so this pet object can pick up relevant messages.
|
boolean |
deactivate()
Deactivates the message subscriptions so this pet object will no longer pick up any messages.
|
boolean |
despawnPet()
Despawns the pet.
|
int |
getAttitude() |
int |
getCurrentCommand() |
int |
getCurrentLevel() |
java.lang.Long |
getDespawnTime() |
java.lang.String |
getMobName() |
OID |
getMobObj() |
OID |
getOwnerOid() |
int |
getPassiveEffect() |
boolean |
getSpawned() |
java.lang.Long |
getSub() |
java.lang.Long |
getSub2() |
void |
handleCommand(java.lang.String command,
OID targetOid)
Processes commands, which will either update the pets attitude, the current command, or activate
an ability that the pet has.
|
void |
handleMessage(Message msg,
int flags)
process network messages
|
protected void |
handleOwnerPropertyUpdate(PropertyMessage propMsg)
Deals with the different property updates that have occurred for the owner of the pet.
|
protected void |
handlePetPropertyUpdate(PropertyMessage propMsg)
Deals with the different property updates that have occurred for the pet.
|
void |
setAttitude(int attitude) |
void |
setCurrentCommand(int currentCommand) |
void |
setCurrentLevel(int currentLevel) |
void |
setDespawnTime(java.lang.Long despawnTime) |
void |
setMobName(java.lang.String mobName) |
void |
setMobObj(OID mobObj) |
void |
setOwnerOid(OID ownerOid) |
void |
setPassiveEffect(int passiveEffect) |
void |
setSpawned(boolean isSpawned) |
void |
setSub(java.lang.Long sub) |
void |
setSub2(java.lang.Long sub2) |
void |
summonPet()
Spawns a copy of the pet at the owners location.
|
void |
updateAttitude(int attitude)
Sends out a command update message so the behavior for this pet will act in the specified manner.
|
void |
updateCommand(int command,
OID target)
Sends out a command update message so the behavior for this pet will perform the requested command.
|
getMobTemplateID, setMobTemplateID
addSubObjectNamespace, equals, equals, getLock, getNamespace, getOid, getPersistenceFlag, getProperty, getSubObjectNamespaces, getSubObjectNamespacesInt, getTransientDataRef, getType, hashCode, hasSubObjectNamespace, isDeleted, registerTransientPropertyKey, removeProperty, removeSubObjectNamespace, setDeleted, setNamespace, setOid, setPersistenceFlag, setProperty, setSubObjectNamespaces, setSubObjectNamespacesInt, setType, toBytes, toString, unregisterTransientPropertyKey
getBooleanProperty, getIntProperty, getName, getPropertyMap, getPropertyMapRef, getStringProperty, lock, modifyIntProperty, setName, setPropertyMap, setupTransient, unlock
protected java.util.concurrent.ScheduledFuture<?> scheduledExecutioner
protected java.util.concurrent.ScheduledFuture<?> scheduledDistanceExecutioner
public CombatPet()
public CombatPet(int mobTemplateID, OID ownerOid, java.lang.Long duration, int passiveEffect)
public void summonPet()
public boolean despawnPet()
despawnPet
in class Pet
public boolean activate()
public boolean deactivate()
public void handleMessage(Message msg, int flags)
handleMessage
in interface MessageCallback
msg
- Message sent from other agent.flags
- Bitwise OR of MessageCallback.NO_FLAGS
, MessageCallback.RESPONSE_EXPECTED
.public void handleCommand(java.lang.String command, OID targetOid)
command
- protected void handlePetPropertyUpdate(PropertyMessage propMsg)
propMsg
- protected void handleOwnerPropertyUpdate(PropertyMessage propMsg)
propMsg
- public void updateAttitude(int attitude)
attitude
- public void updateCommand(int command, OID target)
attitude
- public java.lang.String getMobName()
getMobName
in class Pet
public void setMobName(java.lang.String mobName)
setMobName
in class Pet
public boolean getSpawned()
getSpawned
in class Pet
public void setSpawned(boolean isSpawned)
setSpawned
in class Pet
public OID getOwnerOid()
getOwnerOid
in class Pet
public void setOwnerOid(OID ownerOid)
setOwnerOid
in class Pet
public int getAttitude()
public void setAttitude(int attitude)
public int getCurrentCommand()
public void setCurrentCommand(int currentCommand)
public int getCurrentLevel()
public void setCurrentLevel(int currentLevel)
public java.lang.Long getDespawnTime()
public void setDespawnTime(java.lang.Long despawnTime)
public int getPassiveEffect()
public void setPassiveEffect(int passiveEffect)
public java.lang.Long getSub()
public void setSub(java.lang.Long sub)
public java.lang.Long getSub2()
public void setSub2(java.lang.Long sub2)