game / pragma.inventory / InventoryService / craftV1 /

craftV1 #

suspend fun craftV1(session: PlayerSession, request: InventoryRpc.CraftV1Request): InventoryRpc.CraftV1Response

Performs an arbitrary transform on player inventory.

Plugins

  • CraftingPlugin.meetsRequirements
  • CraftingPlugin.craft - Describes the arbitrary transformation to be applied.
  • InstancedItemPlugin.newInstanced - If new instanced items are created as result of craft.
  • RewardSelectorPlugin.select - If reward grants are created as result of craft.
  • StackableItemPlugin.onUpdate - If any stackable items are granted or upated.

PragmaResultErrors

  • PragmaError.InventoryService_ContentNotFound - If provided crafting entry ID is not found in crafting entries content.
  • PragmaError.InventoryService_RequirementsNotMetError - If crafting entry needs instance items and the user did not provide enough.
  • PragmaError.InventoryService_RequirementsNotMetError - If user passed in an instanced item not part of the crafting entry.
  • PragmaError.InventoryService_GrantError - When db errors.
  • PragmaError.InventoryService_GetError - When db retrieve fails.