atavism.agis.objects
Class TamedPet
java.lang.Object
atavism.server.objects.NamedPropertyClass
atavism.server.objects.Entity
atavism.agis.objects.Pet
atavism.agis.objects.TamedPet
- All Implemented Interfaces:
- MessageCallback, java.io.Serializable
public class TamedPet
- extends Pet
- implements java.io.Serializable, MessageCallback
- See Also:
- Serialized Form
Constructor Summary |
TamedPet()
|
TamedPet(java.lang.String entityName,
int mobTemplateID,
java.lang.String mobName,
OID ownerOid,
int skillType)
|
Method Summary |
boolean |
activate()
|
boolean |
deactivate()
|
boolean |
despawnPet()
Despawns the pet. |
int |
getAttitude()
|
int |
getCurrentCommand()
|
int |
getCurrentLevel()
|
java.lang.String |
getMobName()
|
OID |
getMobObj()
|
OID |
getOwnerOid()
|
java.util.Map<java.lang.String,java.io.Serializable> |
getPropMapC()
|
java.util.Map<java.lang.String,java.io.Serializable> |
getPropMapWM()
|
int |
getSkillType()
|
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 |
loadPetData()
Creates the factory for the pet |
void |
saveObject()
|
void |
setAttitude(int attitude)
|
void |
setCurrentCommand(int currentCommand)
|
void |
setCurrentLevel(int currentLevel)
|
void |
setMobName(java.lang.String mobName)
|
void |
setMobObj(OID mobObj)
|
void |
setOwnerOid(OID ownerOid)
|
void |
setPropMapC(java.util.Map<java.lang.String,java.io.Serializable> propMapC)
|
void |
setPropMapWM(java.util.Map<java.lang.String,java.io.Serializable> propMapWM)
|
void |
setSkillType(int skillType)
|
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)
|
void |
updateCommand(int command,
OID target)
|
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 |
TamedPet
public TamedPet()
TamedPet
public TamedPet(java.lang.String entityName,
int mobTemplateID,
java.lang.String mobName,
OID ownerOid,
int skillType)
loadPetData
public void loadPetData()
- Creates the factory for the pet
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
saveObject
public void saveObject()
activate
public boolean activate()
deactivate
public boolean deactivate()
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)
updateCommand
public void updateCommand(int command,
OID target)
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)
getSkillType
public int getSkillType()
setSkillType
public void setSkillType(int skillType)
getCurrentLevel
public int getCurrentLevel()
setCurrentLevel
public void setCurrentLevel(int currentLevel)
getPropMapWM
public java.util.Map<java.lang.String,java.io.Serializable> getPropMapWM()
setPropMapWM
public void setPropMapWM(java.util.Map<java.lang.String,java.io.Serializable> propMapWM)
getPropMapC
public java.util.Map<java.lang.String,java.io.Serializable> getPropMapC()
setPropMapC
public void setPropMapC(java.util.Map<java.lang.String,java.io.Serializable> propMapC)
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)