Atavism Version 2018.1AGIS API

atavism.agis.objects
Class CombatPet

java.lang.Object
  extended by atavism.server.objects.NamedPropertyClass
      extended by atavism.server.objects.Entity
          extended by atavism.agis.objects.Pet
              extended by atavism.agis.objects.CombatPet
All Implemented Interfaces:
MessageCallback, java.io.Serializable

public class CombatPet
extends Pet
implements java.io.Serializable, MessageCallback

See Also:
Serialized Form

Field Summary
protected  java.util.concurrent.ScheduledFuture<?> scheduledExecutioner
           
 
Fields inherited from class atavism.agis.objects.Pet
mobTemplateID
 
Fields inherited from class atavism.server.objects.Entity
staticLock, subObjectNamespacesInt, transientPropertyKeys, type
 
Fields inherited from class atavism.server.objects.NamedPropertyClass
lock, name
 
Fields inherited from interface atavism.msgsys.MessageCallback
NO_FLAGS, RESPONSE_EXPECTED
 
Constructor Summary
CombatPet()
           
CombatPet(int mobTemplateID, OID ownerOid, java.lang.Long duration, int passiveEffect)
           
 
Method Summary
 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.
 
Methods inherited from class atavism.agis.objects.Pet
getMobTemplateID, setMobTemplateID
 
Methods inherited from class atavism.server.objects.Entity
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
 
Methods inherited from class atavism.server.objects.NamedPropertyClass
getBooleanProperty, getIntProperty, getName, getPropertyMap, getPropertyMapRef, getStringProperty, lock, modifyIntProperty, setName, setPropertyMap, setupTransient, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

scheduledExecutioner

protected java.util.concurrent.ScheduledFuture<?> scheduledExecutioner
Constructor Detail

CombatPet

public CombatPet()

CombatPet

public CombatPet(int mobTemplateID,
                 OID ownerOid,
                 java.lang.Long duration,
                 int passiveEffect)
Method Detail

summonPet

public void summonPet()
Spawns a copy of the pet at the owners location.


despawnPet

public boolean despawnPet()
Despawns the pet.

Overrides:
despawnPet in class Pet

activate

public boolean activate()
Activates the message subscriptions so this pet object can pick up relevant messages.

Returns:

deactivate

public boolean deactivate()
Deactivates the message subscriptions so this pet object will no longer pick up any messages.

Returns:

handleMessage

public void handleMessage(Message msg,
                          int flags)
process network messages

Specified by:
handleMessage in interface MessageCallback
Parameters:
msg - Message sent from other agent.
flags - Bitwise OR of MessageCallback.NO_FLAGS, MessageCallback.RESPONSE_EXPECTED.

handleCommand

public 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.

Parameters:
command -

handlePetPropertyUpdate

protected void handlePetPropertyUpdate(PropertyMessage propMsg)
Deals with the different property updates that have occurred for the pet.

Parameters:
propMsg -

handleOwnerPropertyUpdate

protected void handleOwnerPropertyUpdate(PropertyMessage propMsg)
Deals with the different property updates that have occurred for the owner of the pet.

Parameters:
propMsg -

updateAttitude

public void updateAttitude(int attitude)
Sends out a command update message so the behavior for this pet will act in the specified manner.

Parameters:
attitude -

updateCommand

public void updateCommand(int command,
                          OID target)
Sends out a command update message so the behavior for this pet will perform the requested command.

Parameters:
attitude -

getMobName

public java.lang.String getMobName()
Overrides:
getMobName in class Pet

setMobName

public void setMobName(java.lang.String mobName)
Overrides:
setMobName in class Pet

getMobObj

public OID getMobObj()
Overrides:
getMobObj in class Pet

setMobObj

public void setMobObj(OID mobObj)
Overrides:
setMobObj in class Pet

getSpawned

public boolean getSpawned()
Overrides:
getSpawned in class Pet

setSpawned

public void setSpawned(boolean isSpawned)
Overrides:
setSpawned in class Pet

getOwnerOid

public OID getOwnerOid()
Overrides:
getOwnerOid in class Pet

setOwnerOid

public void setOwnerOid(OID ownerOid)
Overrides:
setOwnerOid in class Pet

getAttitude

public int getAttitude()

setAttitude

public void setAttitude(int attitude)

getCurrentCommand

public int getCurrentCommand()

setCurrentCommand

public void setCurrentCommand(int currentCommand)

getCurrentLevel

public int getCurrentLevel()

setCurrentLevel

public void setCurrentLevel(int currentLevel)

getDespawnTime

public java.lang.Long getDespawnTime()

setDespawnTime

public void setDespawnTime(java.lang.Long despawnTime)

getPassiveEffect

public int getPassiveEffect()

setPassiveEffect

public void setPassiveEffect(int passiveEffect)

getSub

public java.lang.Long getSub()

setSub

public void setSub(java.lang.Long sub)

getSub2

public java.lang.Long getSub2()

setSub2

public void setSub2(java.lang.Long sub2)


Copyright © 2018 Dragonsan Studios Sp. z o.o.