game-common / pragma.inventory / InstancedItemPlugin / update /

update #

abstract fun update(initialInstancedItem: InstancedItem, instancedSpec: InventoryContent.InstancedSpec, updateEntry: InventoryContent.UpdateEntry, inventoryContent: InventoryServiceContent, startingInventory: InventoryData, pendingInventory: InventoryData, clientRequestExt: ExtInstancedItemUpdate?, serverRequestExt: ExtInstancedItemServerUpdate?): InstancedItemPlugin.InstancedItemPluginResult

When modifying an existing Instanced Item, the update function will allow you to interact with the ext data that will be saved within the item. update is called with either a valid client sourced ext or a valid server sourced ext. The other ext will be null. ExtInstancedItemUpdate might contain untrusted or unverified information, since it might come directly from the client. ExtInstancedItemServerUpdate contains information only provided by other internal flows such as from inventory match end updates.

Used By

  • InventoryService.updateItemV4
  • InventoryService.updateItemsV0
  • InventoryService.applyInventoryOperationsOperatorV1
  • InventoryService.applyInventoryOperationsPartnerV1
  • InventoryService.applyInventoryOperationsServiceV1

Return #

The updated Ext data to be added within the instanced item.

Parameters #


The Instanced Item to modify.


The Instanced Spec definition from the catalog.


The update entry from the catalog.


InventoryServiceContent object used to reference all the content specs.


InventoryData - object that contains all the player’s instanced and stackable items.


InventoryData - object that contains the current in-flight representation of a player’s instanced and stackable items.


Ext data passed from the client to be used when updating the Instanced Item.


Ext data passed from the server to be used when updating the Instanced Item.