Table of Contents

Struct PluginVendorItem

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

One item a vendor currently has listed for sale.

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

Constructors

PluginVendorItem(uint, uint, string, PluginObjectClass, int, int)

One item a vendor currently has listed for sale.

public PluginVendorItem(uint TemplateObjectId, uint WeenieClassId, string Name, PluginObjectClass ObjectClass, int UnitPrice, int StackSize)

Parameters

TemplateObjectId uint

The id of the vendor's listing. It identifies the shop entry, not an item the player owns, and it is the id every buy command refers to.

WeenieClassId uint

The item's class id, shared by every copy of it.

Name string

The item's display name.

ObjectClass PluginObjectClass

The broad category the listing falls into.

UnitPrice int

What the vendor charges for one of these, already worked out at the vendor's own mark-up.

StackSize int

How many the listing sells as one stack.

Properties

ItemType

The item's category, as a bit mask over the same category bits DealsInItemTypes is built from, so the two can be compared directly. Zero when the listing does not say, and zero on a host that does not provide this surface.

public uint ItemType { get; init; }

Property Value

uint

MaxStackSize

How many of this item fit in one stack, so a plugin can work out how many pack slots a purchase takes. One means the item does not stack, which is also how a listing that does not say is read. Zero on a host that does not provide this surface, since it lists nothing at all.

public int MaxStackSize { get; init; }

Property Value

int

Name

The item's display name.

public string Name { get; init; }

Property Value

string

ObjectClass

The broad category the listing falls into.

public PluginObjectClass ObjectClass { get; init; }

Property Value

PluginObjectClass

StackSize

How many the listing sells as one stack.

public int StackSize { get; init; }

Property Value

int

TemplateObjectId

The id of the vendor's listing. It identifies the shop entry, not an item the player owns, and it is the id every buy command refers to.

public uint TemplateObjectId { get; init; }

Property Value

uint

UnitPrice

What the vendor charges for one of these, already worked out at the vendor's own mark-up.

public int UnitPrice { get; init; }

Property Value

int

WeenieClassId

The item's class id, shared by every copy of it.

public uint WeenieClassId { get; init; }

Property Value

uint