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
ObjectIduintThe object's id.
WeenieClassIduintThe object's class id, shared by every copy of it; zero when the client has no detail for the object beyond its presence.
NamestringThe object's display name. Falls back to the name the world update carried, and finally to the object id written in hexadecimal.
ObjectClassPluginObjectClassThe broad category the object falls into.
ItemTypeuintThe object's item-type bit mask.
ContainerObjectIduintThe container holding the object, or zero when it is not inside one.
WielderObjectIduintThe 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
CanActivate
True when the host recognizes an activation interaction.
public bool CanActivate { get; }
Property Value
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
ContainerObjectId
The container holding the object, or zero when it is not inside one.
public uint ContainerObjectId { get; init; }
Property Value
ContainersCapacity
How many packs the object can hold, when it is a container.
public int ContainersCapacity { get; init; }
Property Value
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
HasAppraisalData
True once the client holds property data for the object, which is what an appraisal delivers.
public bool HasAppraisalData { get; init; }
Property Value
HasPosition
True when the client knows where the object is.
public bool HasPosition { get; init; }
Property Value
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
IconId
The object's icon, for a plugin that draws its own UI.
public uint IconId { get; init; }
Property Value
IsDoorOpen
True when the object is a door and that door stands open.
public bool IsDoorOpen { get; init; }
Property Value
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
IsOwned
True when the local player owns the object, counting anything nested inside a pack they carry.
public bool IsOwned { get; init; }
Property Value
ItemType
The object's item-type bit mask.
public uint ItemType { get; init; }
Property Value
ItemsCapacity
How many loose items the object can hold, when it is a container.
public int ItemsCapacity { get; init; }
Property Value
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
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
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
ObjectClass
The broad category the object falls into.
public PluginObjectClass ObjectClass { get; init; }
Property Value
ObjectId
The object's id.
public uint ObjectId { get; init; }
Property Value
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
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
SpellIds
The spells an appraisal reported on the object; empty until it has been appraised.
public IReadOnlyList<uint> SpellIds { get; init; }
Property Value
StackSize
How many of the object this stack holds; at least one.
public int StackSize { get; init; }
Property Value
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
WielderObjectId
The creature carrying or wearing the object, or zero when nobody is.
public uint WielderObjectId { get; init; }