game-common / pragma.inventory / InstancedItemPlugin / onDelete /
onDelete #
open suspend fun onDelete(deletedItem: InstancedItem, instancedSpec: InventoryContent.InstancedSpec, inventoryContent: InventoryServiceContent, startingInventory: InventoryData, pendingInventory: InventoryData): InventoryModifications
Called any time an instanced item is being deleted. This plugin allows chaining of additional item operations from the delete event.
Used By
- InventoryService.storePurchaseV4 - when cost includes an instanced item
 - InventoryServie.craftV1 - when cost includes an instanced item
 - InventoryService.applyInventoryOperationsOperatorV1
 - InventoryService.applyInventoryOperationsPartnerV1
 - InventoryService.applyInventoryOperationsServiceV1
 - InventoryService.matchEndV4
 - Any chained delete inventory operations returned from InstancedItemPlugin.newInstanced and InstancedItemPlugin.update and StackableItemPlugin.onUpdate
 
Parameters #
deletedItem  | The Instanced Item that is being deleted.  | 
instancedSpec  | The Instanced Spec definition from the catalog.  | 
inventoryContent  | InventoryServiceContent object used to reference all the content specs.  | 
startingInventory  | InventoryData - object that contains all the player’s instanced and stackable items.  | 
pendingInventory  | InventoryData - object that contains the current in-flight representation of a player’s instanced and stackable items.  |