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
TemplateObjectIduintThe 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.
WeenieClassIduintThe item's class id, shared by every copy of it.
NamestringThe item's display name.
ObjectClassPluginObjectClassThe broad category the listing falls into.
UnitPriceintWhat the vendor charges for one of these, already worked out at the vendor's own mark-up.
StackSizeintHow 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
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
Name
The item's display name.
public string Name { get; init; }
Property Value
ObjectClass
The broad category the listing falls into.
public PluginObjectClass ObjectClass { get; init; }
Property Value
StackSize
How many the listing sells as one stack.
public int StackSize { get; init; }
Property Value
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
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
WeenieClassId
The item's class id, shared by every copy of it.
public uint WeenieClassId { get; init; }