Table of Contents

Struct PluginWorldObject

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

One object the client is currently tracking, whether it stands in the world, sits in a container, or is carried by someone.

public readonly record struct PluginWorldObject : IEquatable<PluginWorldObject>
Implements
Inherited Members

Constructors

PluginWorldObject(uint, uint, string, PluginObjectClass, uint, uint, uint)

One object the client is currently tracking, whether it stands in the world, sits in a container, or is carried by someone.

public PluginWorldObject(uint ObjectId, uint WeenieClassId, string Name, PluginObjectClass ObjectClass, uint ItemType, uint ContainerObjectId, uint WielderObjectId)

Parameters

ObjectId uint

The object's id.

WeenieClassId uint

The object's class id, shared by every copy of it; zero when the client has no detail for the object beyond its presence.

Name string

The object's display name. Falls back to the name the world update carried, and finally to the object id written in hexadecimal.

ObjectClass PluginObjectClass

The broad category the object falls into.

ItemType uint

The object's item-type bit mask.

ContainerObjectId uint

The container holding the object, or zero when it is not inside one.

WielderObjectId uint

The creature carrying or wearing the object, or zero when nobody is.

Properties

ActiveSpellIds

The enchantments currently running on the object. Only the local player's own entry is ever filled in, and only on a host that tracks them; every other object reports an empty list.

public IReadOnlyList<uint> ActiveSpellIds { get; init; }

Property Value

IReadOnlyList<uint>

CanActivate

True when the host recognizes an activation interaction.

public bool CanActivate { get; }

Property Value

bool

Capabilities

Semantic operations the host can perform or recognize for this object. Plugins should use these flags instead of decoding item-type or public weenie bitfields themselves.

public PluginObjectCapabilities Capabilities { get; init; }

Property Value

PluginObjectCapabilities

ContainerObjectId

The container holding the object, or zero when it is not inside one.

public uint ContainerObjectId { get; init; }

Property Value

uint

ContainersCapacity

How many packs the object can hold, when it is a container.

public int ContainersCapacity { get; init; }

Property Value

int

CoverageMask

The body parts a piece of clothing or armor covers, as the coverage bits the server sends when the object first appears -- so known before the object has ever been appraised, the same value as CoverageMask. Zero for anything that is not worn.

public uint CoverageMask { get; init; }

Property Value

uint

HasAppraisalData

True once the client holds property data for the object, which is what an appraisal delivers.

public bool HasAppraisalData { get; init; }

Property Value

bool

HasPosition

True when the client knows where the object is.

public bool HasPosition { get; init; }

Property Value

bool

Header

The raw description words and optional values of the object's latest full description, as the server sent them; null for an object the client never received a description of, and on a host that does not report them.

public PluginObjectHeader? Header { get; init; }

Property Value

PluginObjectHeader

IconId

The object's icon, for a plugin that draws its own UI.

public uint IconId { get; init; }

Property Value

uint

IsDoorOpen

True when the object is a door and that door stands open.

public bool IsDoorOpen { get; init; }

Property Value

bool

IsLandscape

True when the object stands out in the world: it has a position and is neither owned, contained, nor carried.

public bool IsLandscape { get; init; }

Property Value

bool

IsOwned

True when the local player owns the object, counting anything nested inside a pack they carry.

public bool IsOwned { get; init; }

Property Value

bool

ItemType

The object's item-type bit mask.

public uint ItemType { get; init; }

Property Value

uint

ItemsCapacity

How many loose items the object can hold, when it is a container.

public int ItemsCapacity { get; init; }

Property Value

int

LastAppraisalUnsuccessful

True when the latest thing the server said about the object was an appraisal answer saying it could not appraise it. This follows every answer the client receives, whoever asked. A successful answer clears it, and so does anything else the server sends about the object -- a fresh create, a property or stack-size update, a confirmed move or wield, a pack listing or inventory list that names it -- because each shows the server still has the object. The server answers unsuccessfully for an object it no longer has, but also for an item made to resist appraisal and for a repeat request of the same object sent within about five seconds of an unsuccessful one, so on its own it does not prove the object is gone.

public bool LastAppraisalUnsuccessful { get; init; }

Property Value

bool

LastIdTime

The client's own millisecond timestamp for the object's last appraisal; zero when it has never been appraised.

public int LastIdTime { get; init; }

Property Value

int

Name

The object's display name. Falls back to the name the world update carried, and finally to the object id written in hexadecimal.

public string Name { get; init; }

Property Value

string

ObjectClass

The broad category the object falls into.

public PluginObjectClass ObjectClass { get; init; }

Property Value

PluginObjectClass

ObjectId

The object's id.

public uint ObjectId { get; init; }

Property Value

uint

PortalDestination

A portal's appraised destination label, or null when the client does not know one. This is a display label, not a destination cell id.

public string? PortalDestination { get; init; }

Property Value

string

PortalMaximumLevel

A portal's maximum character level, or null when no maximum is known.

public int? PortalMaximumLevel { get; init; }

Property Value

int?

PortalMinimumLevel

A portal's minimum character level, or null when no minimum is known.

public int? PortalMinimumLevel { get; init; }

Property Value

int?

Position

Where the object is; only meaningful when HasPosition is true.

public PluginNavigationPosition Position { get; init; }

Property Value

PluginNavigationPosition

SpellIds

The spells an appraisal reported on the object; empty until it has been appraised.

public IReadOnlyList<uint> SpellIds { get; init; }

Property Value

IReadOnlyList<uint>

StackSize

How many of the object this stack holds; at least one.

public int StackSize { get; init; }

Property Value

int

WeenieClassId

The object's class id, shared by every copy of it; zero when the client has no detail for the object beyond its presence.

public uint WeenieClassId { get; init; }

Property Value

uint

WielderObjectId

The creature carrying or wearing the object, or zero when nobody is.

public uint WielderObjectId { get; init; }

Property Value

uint