Namespace: GGG.Items
Creates valid runtime item instances from item definitions.
public sealed class ItemFactory : IItemFactory
Inheritance
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
ItemCatalogFactoryExtensions.Create(IItemFactory, ItemCatalog, string), ItemCatalogFactoryExtensions.Restore(IItemFactory, ItemCatalog, string, string)
Methods
Create(ItemDefinition)
Creates a new runtime instance for the specified item definition.
public ItemInstance Create(ItemDefinition definition)
Parameters
definition ItemDefinition
The item or inventory definition to inspect or use.
Returns
A newly created item instance.
Restore(ItemDefinition, string)
Restores a runtime item instance using a previously assigned identifier.
public ItemInstance Restore(ItemDefinition definition, string instanceId)
Parameters
definition ItemDefinition
The item or inventory definition to inspect or use.
instanceId string
The identifier to preserve on the restored item.
Returns
The restored item instance.