Atavism Version 2018.1AGIS API

atavism.agis.objects
Class NonCombatPet

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.NonCombatPet
All Implemented Interfaces:
MessageCallback, java.io.Serializable

public class NonCombatPet
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
isSpawned, mobName, mobObj, mobTemplateID, ownerOid
 
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
NonCombatPet()
           
NonCombatPet(int mobTemplateID, OID mobObj, boolean isSpawned, java.lang.Long duration, OID ownerOid)
           
 
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()
           
 java.lang.Long getDespawnTime()
           
 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 setDespawnTime(java.lang.Long despawnTime)
           
 void summonPet()
           
 
Methods inherited from class atavism.agis.objects.Pet
getMobName, getMobObj, getMobTemplateID, getOwnerOid, getSpawned, setMobName, setMobObj, setMobTemplateID, setOwnerOid, setSpawned
 
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

NonCombatPet

public NonCombatPet()

NonCombatPet

public NonCombatPet(int mobTemplateID,
                    OID mobObj,
                    boolean isSpawned,
                    java.lang.Long duration,
                    OID ownerOid)
Method Detail

summonPet

public void summonPet()

despawnPet

public boolean despawnPet()
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 -

getDespawnTime

public java.lang.Long getDespawnTime()

setDespawnTime

public void setDespawnTime(java.lang.Long despawnTime)


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