Table of Contents

Interface IWorldObjectAutomation

Namespace
AcDream.Plugin.Abstractions
Assembly
AcDream.Plugin.Abstractions.dll

Reads the objects the client currently knows about -- everything in the world around the player as well as everything they carry -- and asks the server to appraise one of them.

public interface IWorldObjectAutomation

Properties

IsAvailable

True when the session is in the world, so these reads are meaningful.

bool IsAvailable { get; }

Property Value

bool

LastActivationCompletion

The most recent activation completion. Default until anything completes, fails, or is interrupted.

PluginActivationCompletion LastActivationCompletion { get; }

Property Value

PluginActivationCompletion

OpenContainerObjectId

The external container currently open (a corpse, a chest, a storage crate), or zero when none is.

uint OpenContainerObjectId { get; }

Property Value

uint

Methods

Activate(uint)

Activates a known world object such as a portal, door, vendor, NPC, or external container. The host may approach an out-of-range object first; Started means the interaction was accepted, not that the world transition has completed. Use PortalTransition and object changes for follow-up state.

PluginItemCommandResult Activate(uint objectId)

Parameters

objectId uint

Returns

PluginItemCommandResult

CaptureObjects()

Lists every object the client is tracking, ordered by object id. Returns an empty list when the session is not in the world.

IReadOnlyList<PluginWorldObject> CaptureObjects()

Returns

IReadOnlyList<PluginWorldObject>

Identify(uint)

Requests an appraisal of any object present in the object table -- owned inventory, equipped, landscape, a vendor listing, or an open container's content -- through the same appraisal request the client's own assess uses, gated the same way (Busy while another inventory request is in flight). Contrast ILootAutomation.Identify, which only accepts the currently open corpse/container's contents.

PluginItemCommandResult Identify(uint objectId)

Parameters

objectId uint

Returns

PluginItemCommandResult

TryCaptureProperties(uint, out PluginItemProperties)

Reads the property tables the client holds for one object, including its weapon and armor profiles once it has been appraised. Returns false when the client has no object for that id; an object it has never appraised yields mostly empty tables rather than false.

bool TryCaptureProperties(uint objectId, out PluginItemProperties properties)

Parameters

objectId uint
properties PluginItemProperties

Returns

bool

TryGet(uint, out PluginWorldObject)

Reads one object by id. Returns false when the session is not in the world or the client has never seen that object.

bool TryGet(uint objectId, out PluginWorldObject value)

Parameters

objectId uint
value PluginWorldObject

Returns

bool

TryGetIntProperty(uint, uint, out int)

One integer property of one object. A caller reading a single property inside a per-object predicate should use this rather than TryCaptureProperties(uint, out PluginItemProperties), which copies the object's whole property bundle. The default answers from that copy, so a surface that has not specialised it is correct but not cheap.

bool TryGetIntProperty(uint objectId, uint property, out int value)

Parameters

objectId uint
property uint
value int

Returns

bool