Namespace: GGG.Items

Represents one runtime-owned occurrence of an item definition. Mutable item-specific state can be added here when a real game requirement proves that it belongs to every item instance.

[Serializable]
public sealed class ItemInstance

Inheritance

object ← ItemInstance

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

Definition

Gets the definition associated with this runtime instance.

public ItemDefinition Definition { get; }

Property Value

ItemDefinition

DefinitionId

Gets the stable identifier of this item’s definition.

public string DefinitionId { get; }

Property Value

string

InstanceId

Gets the unique identifier of this runtime item.

public string InstanceId { get; }

Property Value

string

IsValid

Gets whether this item has a usable identity and definition.

public bool IsValid { get; }

Property Value

bool

Methods

ToString()

Returns a readable representation of this instance.

public override string ToString()

Returns

string

A readable representation of this instance.