Atavism Version 2018.1AGIS API

atavism.server.plugins
Class InstanceClient

java.lang.Object
  extended by atavism.server.plugins.InstanceClient

public class InstanceClient
extends java.lang.Object

API for instance management. An instance is created from an instance template and optional override template. The instance template specifies the instance world file, initialization script, and load script. Instances may be persistent or non-persistent. Persistent instances can be unloaded and later loaded. Persistent instances will have the same oid when reloaded.

Note: Instance names may not be unique.

The initial instances should be created by a "post" script passed to the InstancePlugin process. If you're using the supplied 'atavism.sh' or 'start-atavism.bat', then the script is named $AO_HOME/config/myworld/startup_instance.py.

Instance objects are searchable using ObjectTypes.instance and PropertySearch. The search result is a collection of java.util.Map objects containing the selected properties. Select properties by name in the SearchSelection. If the selection mode is SearchSelection.RESULT_KEY_ONLY, then the result is a collection of instance oids. If the selection mode is SearchSelection.RESULT_KEYED, the result is a collection of SearchEntry where the key is the instance oid and the value is a java.util.Map.

See Also:
SearchManager.searchObjects(atavism.server.objects.ObjectType, atavism.server.engine.SearchClause, atavism.server.engine.SearchSelection)

Nested Class Summary
static class InstanceClient.CreateInstanceMessage
           
static class InstanceClient.GetInstanceInfoMessage
           
static class InstanceClient.GetMatchingEntityOidsMessage
          Request the oids of the entities that match the given name.
static class InstanceClient.GetNavMeshPathMessage
           
static class InstanceClient.GetRegionMessage
           
static class InstanceClient.InstanceEntryReqMessage
          Request object instance entry.
static class InstanceClient.InstanceInfo
          Instance information.
static class InstanceClient.RegisterInstanceTemplateMessage
           
static class InstanceClient.SetInstanceGroupMessage
           
 
Field Summary
static java.lang.String COLLECTION_MARKER_OBJECTS
          Name of a property of entity objects that contain world collection information.
static java.lang.String COLLECTION_STATIC_OBJECTS
          Name of a property of entity objects that contain world collection information.
static int FLAG_ALL_INFO
          Get all available instance information.
static int FLAG_AMBIENT_LIGHT
          Get instance ambient light.
static int FLAG_DIR_LIGHT
          Get instance directional light.
static int FLAG_FOG
          Get instance fog.
static int FLAG_GROUP_OID
          Get current instance group oid.
static int FLAG_GUILD_OID
          Get current instance guild oid.
static int FLAG_MULTIPLE
          Get list of InstanceInfo.
static int FLAG_NAME
          Get instance name.
static int FLAG_OCEAN
          Get instance ocean data.
static int FLAG_OID
          Get instance oid.
static int FLAG_PLAYER_OID
          Get current instance player oid.
static int FLAG_PLAYER_POPULATION
          Get current instance player population.
static int FLAG_POPULATION_LIMIT
          Get current instance population limit.
static int FLAG_REGION_CONFIG
          Get instance regions.
static int FLAG_SKYBOX
          Get instance skybox.
static int FLAG_TEMPLATE_ID
          Get instance template name.
static int FLAG_TEMPLATE_NAME
          Get instance template name.
static int FLAG_TERRAIN
          Get instance terrain data.
static int FLAG_WORLDFILE
          Get instance terrain data.
static MessageType MSG_TYPE_CREATE_INSTANCE
           
static MessageType MSG_TYPE_DELETE_INSTANCE
           
static MessageType MSG_TYPE_GET_ENTITY_OIDS
           
static MessageType MSG_TYPE_GET_INSTANCE_INFO
           
static MessageType MSG_TYPE_GET_MARKER
           
static MessageType MSG_TYPE_GET_NAVMESH_PATH
           
static MessageType MSG_TYPE_GET_REGION
           
static MessageType MSG_TYPE_INSTANCE_DELETED
           
static MessageType MSG_TYPE_INSTANCE_ENTRY_REQ
           
static MessageType MSG_TYPE_INSTANCE_LOADED
           
static MessageType MSG_TYPE_INSTANCE_UNLOADED
           
static MessageType MSG_TYPE_LOAD_INSTANCE
           
static MessageType MSG_TYPE_LOAD_INSTANCE_BY_ID
           
static MessageType MSG_TYPE_LOAD_INSTANCE_CONTENT
           
static MessageType MSG_TYPE_REGISTER_INSTANCE_TEMPLATE
           
static MessageType MSG_TYPE_SET_INSTANCE_GROUP
           
static MessageType MSG_TYPE_UNLOAD_INSTANCE
           
static Namespace NAMESPACE
          Instance sub-object namespace.
static long REGION_ALL
          Get all region information (search selection flag).
static long REGION_BOUNDARY
          Get the region boundary (search selection flag).
static long REGION_PROPERTIES
          Get the region properties (search selection flag).
static int RESULT_ERROR_INTERNAL
           
static int RESULT_ERROR_NO_WORLD_MANAGER
           
static int RESULT_ERROR_RETRY
           
static int RESULT_ERROR_UNKNOWN_OBJECT
           
static int RESULT_OK
           
static java.lang.String TEMPL_ASSET_INFO
          Map associated with an instance with an entry for each of the various flash assets required to display an instance.
static java.lang.String TEMPL_COLLISION_POINTS
          Instance collision points.
static java.lang.String TEMPL_INIT_SCRIPT_FILE_NAME
          Instance init script file name.
static java.lang.String TEMPL_INSTANCE_NAME
          Instance name.
static java.lang.String TEMPL_INSTANCE_TEMPLATE_ID
          Instance template name.
static java.lang.String TEMPL_INSTANCE_TEMPLATE_NAME
          Instance template name.
static java.lang.String TEMPL_INSTANCE_TYPE
          Instance type.
static java.lang.String TEMPL_LOAD_SCRIPT_FILE_NAME
          Instance load script file name.
static java.lang.String TEMPL_LOADER_OVERRIDE_NAME
          World loader override name.
static java.lang.String TEMPL_POPULATION_LIMIT
          Property name for the population Limit
static java.lang.String TEMPL_TERRAIN_CONFIG_FILE
          Instance terrain config file (.aot).
static java.lang.String TEMPL_UNIQUE_NAME
          Unique name flag (Boolean).
static java.lang.String TEMPL_WORLD_COLLECTION_DATABASE_KEYS
          Property name for the list of database persistence keys for the collections that should be loaded as part of our instance load.
static java.lang.String TEMPL_WORLD_COLLECTION_FILES
          Property name for the list of files that should be loaded as part of our instance load.
static java.lang.String TEMPL_WORLD_FILE_NAME
          Instance world file name.
 
Constructor Summary
InstanceClient()
           
 
Method Summary
static OID createInstance(int templateID, Template override)
          Create an instance.
static OID createInstance(int templateID, Template override, OID groupOid, OID playerOid, int guildID)
           
static boolean deleteInstance(OID instanceOid)
          Delete an instance.
static InstanceClient.InstanceInfo getInstanceInfo(OID instanceOid, int flags)
          Get instance information.
static InstanceClient.InstanceInfo getInstanceInfo(OID instanceOid, int flags, boolean createIfDoesntExist)
          Get instance information.
static java.util.List<InstanceClient.InstanceInfo> getInstanceInfoByName(java.lang.String instanceName, int flags)
          Get instance information by instance name.
static OID getInstanceOid(int instanceID)
          Get instance oid from an instance name.
static OID getInstanceOid(int instanceID, OID groupOid, OID playerOid, int guildOid)
          Get instance oid from an instance name.
static OID getInstanceOid(int instanceID, OID groupOid, OID playerOid, int guildOid, boolean createIfDoesntExist)
          Get instance oid from an instance name.
static OID getInstanceOid(java.lang.String instanceName)
          Get instance oid from an instance name.
static java.util.List<OID> getInstanceOids(java.lang.String instanceName)
          Get loaded instance oids from an instance name.
static Marker getMarker(OID defaultInstanceOid, java.lang.String markerName)
          Create a marker based on the underlying marker type object from a loaded instance.
static Point getMarkerPoint(OID instanceOid, java.lang.String markerName)
          Get marker location from a loaded instance.
static java.util.List<OID> getMatchingEntityOids(java.lang.String entityName)
          Get entity oids from an entity name.
static java.util.List<Point> getNavMeshPath(OID mobOid, Point startLoc, Point endLoc)
          Gets the points of a path from the NavMesh to get from startLoc to endLoc.
static Region getRegion(OID instanceOid, java.lang.String regionName, long flags)
          Get region information from a loaded instance.
static OID loadInstance(int instanceID, OID groupOid, OID playerOid, int guidId)
          Sends a message out to load a new instance matching the given instanceID.
static int loadInstance(OID instanceOid)
          Load a persistent instance.
static boolean objectInstanceEntry(OID oid, BasicWorldNode instanceLoc, int flags)
          Move an object to a different instance.
static boolean objectInstanceEntry(OID oid, BasicWorldNode instanceLoc, int flags, BasicWorldNode restoreWnode)
          Move an object to a different instance.
static boolean objectInstanceEntry(OID oid, java.lang.String instanceName, BasicWorldNode instanceLoc, int flags)
          Move an object to a different instance.
static boolean registerInstanceTemplate(Template template)
          Register an instance template.
static void setInstanceGroup(OID instanceOid, OID groupOid)
           
static boolean unloadInstance(OID instanceOid)
          Unload a persistent instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_OID

public static final int FLAG_OID
Get instance oid.

See Also:
Constant Field Values

FLAG_NAME

public static final int FLAG_NAME
Get instance name.

See Also:
Constant Field Values

FLAG_TEMPLATE_NAME

public static final int FLAG_TEMPLATE_NAME
Get instance template name.

See Also:
Constant Field Values

FLAG_TEMPLATE_ID

public static final int FLAG_TEMPLATE_ID
Get instance template name.

See Also:
Constant Field Values

FLAG_SKYBOX

public static final int FLAG_SKYBOX
Get instance skybox.

See Also:
Constant Field Values

FLAG_FOG

public static final int FLAG_FOG
Get instance fog.

See Also:
Constant Field Values

FLAG_AMBIENT_LIGHT

public static final int FLAG_AMBIENT_LIGHT
Get instance ambient light.

See Also:
Constant Field Values

FLAG_DIR_LIGHT

public static final int FLAG_DIR_LIGHT
Get instance directional light.

See Also:
Constant Field Values

FLAG_OCEAN

public static final int FLAG_OCEAN
Get instance ocean data.

See Also:
Constant Field Values

FLAG_WORLDFILE

public static final int FLAG_WORLDFILE
Get instance terrain data.

See Also:
Constant Field Values

FLAG_TERRAIN

public static final int FLAG_TERRAIN
Get instance terrain data.

See Also:
Constant Field Values

FLAG_REGION_CONFIG

public static final int FLAG_REGION_CONFIG
Get instance regions.

See Also:
Constant Field Values

FLAG_PLAYER_POPULATION

public static final int FLAG_PLAYER_POPULATION
Get current instance player population.

See Also:
Constant Field Values

FLAG_POPULATION_LIMIT

public static final int FLAG_POPULATION_LIMIT
Get current instance population limit.

See Also:
Constant Field Values

FLAG_GROUP_OID

public static final int FLAG_GROUP_OID
Get current instance group oid.

See Also:
Constant Field Values

FLAG_PLAYER_OID

public static final int FLAG_PLAYER_OID
Get current instance player oid.

See Also:
Constant Field Values

FLAG_GUILD_OID

public static final int FLAG_GUILD_OID
Get current instance guild oid.

See Also:
Constant Field Values

FLAG_MULTIPLE

public static final int FLAG_MULTIPLE
Get list of InstanceInfo.

See Also:
Constant Field Values

FLAG_ALL_INFO

public static final int FLAG_ALL_INFO
Get all available instance information.

See Also:
Constant Field Values

REGION_BOUNDARY

public static final long REGION_BOUNDARY
Get the region boundary (search selection flag).

See Also:
Constant Field Values

REGION_PROPERTIES

public static final long REGION_PROPERTIES
Get the region properties (search selection flag).

See Also:
Constant Field Values

REGION_ALL

public static final long REGION_ALL
Get all region information (search selection flag).

See Also:
Constant Field Values

RESULT_OK

public static final int RESULT_OK
See Also:
Constant Field Values

RESULT_ERROR_UNKNOWN_OBJECT

public static final int RESULT_ERROR_UNKNOWN_OBJECT
See Also:
Constant Field Values

RESULT_ERROR_INTERNAL

public static final int RESULT_ERROR_INTERNAL
See Also:
Constant Field Values

RESULT_ERROR_NO_WORLD_MANAGER

public static final int RESULT_ERROR_NO_WORLD_MANAGER
See Also:
Constant Field Values

RESULT_ERROR_RETRY

public static final int RESULT_ERROR_RETRY
See Also:
Constant Field Values

NAMESPACE

public static Namespace NAMESPACE
Instance sub-object namespace.


TEMPL_INSTANCE_TEMPLATE_NAME

public static final java.lang.String TEMPL_INSTANCE_TEMPLATE_NAME
Instance template name. Available on an instance object. Ignored on an instance template.

See Also:
Constant Field Values

TEMPL_INSTANCE_TEMPLATE_ID

public static final java.lang.String TEMPL_INSTANCE_TEMPLATE_ID
Instance template name. Available on an instance object. Ignored on an instance template.

See Also:
Constant Field Values

TEMPL_WORLD_FILE_NAME

public static final java.lang.String TEMPL_WORLD_FILE_NAME
Instance world file name. Available on an instance object and template.

See Also:
registerInstanceTemplate(Template), Constant Field Values

TEMPL_INIT_SCRIPT_FILE_NAME

public static final java.lang.String TEMPL_INIT_SCRIPT_FILE_NAME
Instance init script file name. Available on an instance object and template.

See Also:
registerInstanceTemplate(Template), Constant Field Values

TEMPL_LOAD_SCRIPT_FILE_NAME

public static final java.lang.String TEMPL_LOAD_SCRIPT_FILE_NAME
Instance load script file name. Available on an instance object and template.

See Also:
registerInstanceTemplate(Template), Constant Field Values

TEMPL_TERRAIN_CONFIG_FILE

public static final java.lang.String TEMPL_TERRAIN_CONFIG_FILE
Instance terrain config file (.aot). Overrides world file terrain configuration. Available on an instance object and template.

See Also:
registerInstanceTemplate(Template), Constant Field Values

TEMPL_INSTANCE_NAME

public static final java.lang.String TEMPL_INSTANCE_NAME
Instance name. Available on an instance object.

See Also:
Constant Field Values

TEMPL_LOADER_OVERRIDE_NAME

public static final java.lang.String TEMPL_LOADER_OVERRIDE_NAME
World loader override name.

See Also:
Constant Field Values

TEMPL_UNIQUE_NAME

public static final java.lang.String TEMPL_UNIQUE_NAME
Unique name flag (Boolean). If true, then instance name must be unique during instance creation.

See Also:
Constant Field Values

TEMPL_INSTANCE_TYPE

public static final java.lang.String TEMPL_INSTANCE_TYPE
Instance type. Available on an instance object. Ignored on an instance template.

See Also:
Constant Field Values

TEMPL_COLLISION_POINTS

public static final java.lang.String TEMPL_COLLISION_POINTS
Instance collision points. Available on an instance object and template.

See Also:
Constant Field Values

TEMPL_ASSET_INFO

public static final java.lang.String TEMPL_ASSET_INFO
Map associated with an instance with an entry for each of the various flash assets required to display an instance. Available on an instance object and template.

See Also:
Constant Field Values

TEMPL_WORLD_COLLECTION_FILES

public static final java.lang.String TEMPL_WORLD_COLLECTION_FILES
Property name for the list of files that should be loaded as part of our instance load.

See Also:
Constant Field Values

TEMPL_WORLD_COLLECTION_DATABASE_KEYS

public static final java.lang.String TEMPL_WORLD_COLLECTION_DATABASE_KEYS
Property name for the list of database persistence keys for the collections that should be loaded as part of our instance load.

See Also:
Constant Field Values

TEMPL_POPULATION_LIMIT

public static final java.lang.String TEMPL_POPULATION_LIMIT
Property name for the population Limit

See Also:
Constant Field Values

COLLECTION_STATIC_OBJECTS

public static final java.lang.String COLLECTION_STATIC_OBJECTS
Name of a property of entity objects that contain world collection information. This property should contain a list of PersistableTemplate objects for static objects in the scene.

See Also:
Constant Field Values

COLLECTION_MARKER_OBJECTS

public static final java.lang.String COLLECTION_MARKER_OBJECTS
Name of a property of entity objects that contain world collection information. This property should contain a list of PersistableTemplate objects for markers in the scene.

See Also:
Constant Field Values

MSG_TYPE_REGISTER_INSTANCE_TEMPLATE

public static final MessageType MSG_TYPE_REGISTER_INSTANCE_TEMPLATE

MSG_TYPE_CREATE_INSTANCE

public static final MessageType MSG_TYPE_CREATE_INSTANCE

MSG_TYPE_GET_INSTANCE_INFO

public static final MessageType MSG_TYPE_GET_INSTANCE_INFO

MSG_TYPE_GET_MARKER

public static final MessageType MSG_TYPE_GET_MARKER

MSG_TYPE_GET_REGION

public static final MessageType MSG_TYPE_GET_REGION

MSG_TYPE_LOAD_INSTANCE

public static final MessageType MSG_TYPE_LOAD_INSTANCE

MSG_TYPE_UNLOAD_INSTANCE

public static final MessageType MSG_TYPE_UNLOAD_INSTANCE

MSG_TYPE_DELETE_INSTANCE

public static final MessageType MSG_TYPE_DELETE_INSTANCE

MSG_TYPE_LOAD_INSTANCE_CONTENT

public static final MessageType MSG_TYPE_LOAD_INSTANCE_CONTENT

MSG_TYPE_INSTANCE_UNLOADED

public static final MessageType MSG_TYPE_INSTANCE_UNLOADED

MSG_TYPE_INSTANCE_DELETED

public static final MessageType MSG_TYPE_INSTANCE_DELETED

MSG_TYPE_INSTANCE_LOADED

public static final MessageType MSG_TYPE_INSTANCE_LOADED

MSG_TYPE_INSTANCE_ENTRY_REQ

public static MessageType MSG_TYPE_INSTANCE_ENTRY_REQ

MSG_TYPE_GET_ENTITY_OIDS

public static MessageType MSG_TYPE_GET_ENTITY_OIDS

MSG_TYPE_LOAD_INSTANCE_BY_ID

public static MessageType MSG_TYPE_LOAD_INSTANCE_BY_ID

MSG_TYPE_GET_NAVMESH_PATH

public static MessageType MSG_TYPE_GET_NAVMESH_PATH

MSG_TYPE_SET_INSTANCE_GROUP

public static MessageType MSG_TYPE_SET_INSTANCE_GROUP
Constructor Detail

InstanceClient

public InstanceClient()
Method Detail

registerInstanceTemplate

public static boolean registerInstanceTemplate(Template template)
Register an instance template. The template specifies the instance world file, scripts, and custom properties. An instance template is required to create an instance.

The supported properties are:

  • TEMPL_WORLD_FILE_NAME -- name of the world file
  • TEMPL_INIT_SCRIPT_FILE_NAME -- instance initialization script
  • TEMPL_LOAD_SCRIPT_FILE_NAME -- load script The world file should be a .aow file. The init script is run once when the instance is created. The load script is run each time a persistent instance is loaded after creation.

    The file names undergo variable expansion prior to use. The supported variables are:

    • $AO_HOME -- the value of AO_HOME environment variable
    • $WORLD_NAME -- the world name
    • $WORLD_DIR -- the world config directory: $AO_HOME/config/$WORLD_NAME

    Returns:
    True on success, false on failure

  • createInstance

    public static OID createInstance(int templateID,
                                     Template override)
    Create an instance. The instance properties are taken from the registered templateName merged with the override. Properties in the override template take precedence over those in the registered template. See registerInstanceTemplate(Template).

    To make a persistent instance, set the persistent property in the registered or override template:

                Java:
                template.put(Namespace.OBJECT_MANAGER,
                    ObjectManagerClient.TEMPL_PERSISTENT, true)
                Python:
                template.put(Namespace.OBJECT_MANAGER,
                    ObjectManagerClient.TEMPL_PERSISTENT, Boolean(True))
            

    Instance creation has the following steps:

    1. Select world manager to host instance (currently hardcoded to "WorldManager1").
    2. Generate instance object via object manager. Sub-objects are created in the instance and world manager plugins.
    3. Load world file into instance; structures, lights, etc.
    4. Create world editor defined spawn generators
    5. Run the instance init script (TEMPL_INIT_SCRIPT_FILE_NAME)

    Returns:
    Instance oid on success, null on failure

    createInstance

    public static OID createInstance(int templateID,
                                     Template override,
                                     OID groupOid,
                                     OID playerOid,
                                     int guildID)

    loadInstance

    public static int loadInstance(OID instanceOid)
    Load a persistent instance.

    Instance loading has the following steps:

    1. Select world manager to host instance (currently hardcoded to "WorldManager1").
    2. Load instance object via object manager. Sub-objects are loaded in the instance and world manager plugins.
    3. Load world file into instance; structures, lights, etc.
    4. Load instance contents; persistent objects spawned in the instance
    5. Create world editor defined spawn generators
    6. Run the instance load script (TEMPL_LOAD_SCRIPT_FILE_NAME)

    Returns:
    RESULT_OK on success, RESULT_ERROR_UNKNOWN_OBJECT if the instanceOid does not exist, RESULT_ERROR_NO_WORLD_MANAGER if there's no world manager to host the instance, RESULT_ERROR_RETRY if the instance is in an intermediate state, and RESULT_ERROR_INTERNAL for any other error.

    unloadInstance

    public static boolean unloadInstance(OID instanceOid)
    Unload a persistent instance. For a non-persistent instance, this is the same as deleting the instance. Instance content (objects spawned in the instance) are automatically unloaded when the instance unloads. However, players in the instance are not unloaded.

    A MSG_TYPE_INSTANCE_UNLOADED SubjectMessage is published after the content is unloaded, but before the instance object is unloaded. The message is published as a broadcast RPC and the caller waits for all subscribers to respond.

    This operation is actually implemented in the object manager plugin.

    Returns:
    True on success, false on failure

    deleteInstance

    public static boolean deleteInstance(OID instanceOid)
    Delete an instance. Instance content (objects spawned in the instance) are automatically deleted when the instance is deleted. However, players in the instance are not deleted. For a persistent instance, the object and content are deleted from the database.

    A MSG_TYPE_INSTANCE_DELETED SubjectMessage is published after the content is deleted, but before the instance object is deleted. The message is published as a broadcast RPC and the caller waits for all subscribers to respond.

    This operation is actually implemented in the object manager plugin.

    Returns:
    True on success, false on failure

    loadInstance

    public static OID loadInstance(int instanceID,
                                   OID groupOid,
                                   OID playerOid,
                                   int guidId)
    Sends a message out to load a new instance matching the given instanceID.


    getInstanceOid

    public static OID getInstanceOid(java.lang.String instanceName)
    Get instance oid from an instance name. Instance names may not be unique. In case of duplicate instance names, the selected instance is undefined.

    Returns:
    Oid on success, null on failure or unknown name.

    getInstanceOid

    public static OID getInstanceOid(int instanceID)
    Get instance oid from an instance name. Instance names may not be unique. In case of duplicate instance names, the selected instance is undefined.

    Returns:
    Oid on success, null on failure or unknown name.

    getInstanceOid

    public static OID getInstanceOid(int instanceID,
                                     OID groupOid,
                                     OID playerOid,
                                     int guildOid)
    Get instance oid from an instance name. Instance names may not be unique. In case of duplicate instance names, the selected instance is undefined.

    Returns:
    Oid on success, null on failure or unknown name.

    getInstanceOid

    public static OID getInstanceOid(int instanceID,
                                     OID groupOid,
                                     OID playerOid,
                                     int guildOid,
                                     boolean createIfDoesntExist)
    Get instance oid from an instance name. Instance names may not be unique. In case of duplicate instance names, the selected instance is undefined.

    Returns:
    Oid on success, null on failure or unknown name.

    getInstanceOids

    public static java.util.List<OID> getInstanceOids(java.lang.String instanceName)
    Get loaded instance oids from an instance name. Currently does not support getting unloaded instances.

    Returns:
    List of oids. The list is empty if there are no instances matching the given name.

    getMatchingEntityOids

    public static java.util.List<OID> getMatchingEntityOids(java.lang.String entityName)
    Get entity oids from an entity name.

    Returns:
    List of oids. The list is empty if there are no entities matching the given name.

    getNavMeshPath

    public static java.util.List<Point> getNavMeshPath(OID mobOid,
                                                       Point startLoc,
                                                       Point endLoc)
    Gets the points of a path from the NavMesh to get from startLoc to endLoc.

    Returns:
    List of points.

    getInstanceInfo

    public static InstanceClient.InstanceInfo getInstanceInfo(OID instanceOid,
                                                              int flags)
    Get instance information. Information is selected by the flags parameter. Information for unloaded instances is limited to the 'oid' and 'loaded' status.

    Parameters:
    instanceOid - Instance identifier.
    flags - Bit-mask of the FLAG_* constants.
    Returns:
    Always returns an InstanceInfo. InstanceInfo.oid will be null if the instance does not exist.

    getInstanceInfo

    public static InstanceClient.InstanceInfo getInstanceInfo(OID instanceOid,
                                                              int flags,
                                                              boolean createIfDoesntExist)
    Get instance information. Information is selected by the flags parameter. Information for unloaded instances is limited to the 'oid' and 'loaded' status.

    Parameters:
    instanceOid - Instance identifier.
    flags - Bit-mask of the FLAG_* constants.
    Returns:
    Always returns an InstanceInfo. InstanceInfo.oid will be null if the instance does not exist.

    getInstanceInfoByName

    public static java.util.List<InstanceClient.InstanceInfo> getInstanceInfoByName(java.lang.String instanceName,
                                                                                    int flags)
    Get instance information by instance name. Information is selected by the flags parameter. Currently does not support getting information for unloaded instances.

    Parameters:
    instanceName - Instance name.
    flags - Bit-mask of the FLAG_* constants.
    Returns:
    List of InstanceInfo, one for each loaded instance. List will be empty if no instances of the given name are loaded.

    getMarker

    public static Marker getMarker(OID defaultInstanceOid,
                                   java.lang.String markerName)
    Create a marker based on the underlying marker type object from a loaded instance.

    Parameters:
    defaultInstanceOid - Instance identifier.
    markerName - Marker name.
    Returns:
    Marker object or null if unknown instance or marker.

    getMarkerPoint

    public static Point getMarkerPoint(OID instanceOid,
                                       java.lang.String markerName)
    Get marker location from a loaded instance.

    Parameters:
    instanceOid - Instance identifier.
    markerName - Marker name.
    Returns:
    Marker object or null if unknown instance or marker.

    getRegion

    public static Region getRegion(OID instanceOid,
                                   java.lang.String regionName,
                                   long flags)
    Get region information from a loaded instance. Information is selected by the flags parameter.

    Parameters:
    instanceOid - Instance identifier.
    regionName - Region name.
    flags - Bit-mask of REGION_* constants; REGION_BOUNDARY, REGION_PROPERTIES, REGION_ALL.
    Returns:
    Region object or null if unknown instance or region.

    objectInstanceEntry

    public static boolean objectInstanceEntry(OID oid,
                                              BasicWorldNode instanceLoc,
                                              int flags,
                                              BasicWorldNode restoreWnode)
    Move an object to a different instance. The destination instance, location, and orientation are specified in instanceLoc. The destination instance must already be loaded. Passing InstanceClient.InstanceEntryReqMessage.FLAG_PUSH for flags pushes the current instance and location onto the player's instance restore stack. A subsequent instance entry with InstanceClient.InstanceEntryReqMessage.FLAG_POP will instance back to this location.

    Passing InstanceClient.InstanceEntryReqMessage.FLAG_POP for flags removes the top entry from the player instance stack and moves the player to that instance and location. The bottom of the instance restore stack is the fail-safe location and is never removed.

    The destination instance may be the same as the current instance.

    Blocks until the instance entry is complete. Currently only supported for player objects.

    See InstanceClient.InstanceEntryReqMessage for additional instance entry options.

    Parameters:
    oid - Object identifier (only players are supported).
    instanceLoc - Instance and location.
    flags - One of FLAG_NONE, FLAG_POP, or FLAG_PUSH from
    restoreWnode - Location to push onto instance restore stack InstanceClient.InstanceEntryReqMessage.
    Returns:
    True on success, false on failure.
    See Also:
    InstanceClient.InstanceEntryReqMessage

    objectInstanceEntry

    public static boolean objectInstanceEntry(OID oid,
                                              BasicWorldNode instanceLoc,
                                              int flags)
    Move an object to a different instance. See objectInstanceEntry().


    objectInstanceEntry

    public static boolean objectInstanceEntry(OID oid,
                                              java.lang.String instanceName,
                                              BasicWorldNode instanceLoc,
                                              int flags)
    Move an object to a different instance. The instance is identified by name (however instance names may not be unique).

    See Also:
    objectInstanceEntry(atavism.server.engine.OID,BasicWorldNode,int), InstanceClient.InstanceEntryReqMessage

    setInstanceGroup

    public static void setInstanceGroup(OID instanceOid,
                                        OID groupOid)


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