Namespace: GGG.Items
Creates and restores runtime item instances.
public interface IItemFactory
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.
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.
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.