game / pragma.inventory / InventoryService /
InventoryService #
class InventoryService(pragmaNode: PragmaNode, instanceId: UUID, uuidProxy: UUIDProxy = UUIDProxy(), content: InventoryServiceContent = InventoryServiceContent(), rewardsEngine: RewardsEngine = RewardsEngine(content), ledgerBuilder: LedgerBuilder = LedgerBuilder(content, uuidProxy, rewardsEngine), inventoryFilter: InventoryFilter = InventoryFilter(content), playerNotifier: PlayerNotifier = PlayerNotifier(pragmaNode), playerInventoryProxy: PlayerInventoryProxy = PlayerInventoryProxyImpl(ledgerBuilder, inventoryFilter, playerNotifier), fulfillment: Fulfillment = Fulfillment(playerInventoryProxy, LedgerOperationsFactory(content)), purchaseConstraintsFactory: PurchaseConstraintsFactory = PurchaseConstraintsFactory(content), storeEntryPurchaser: StoreEntryPurchaser = StoreEntryPurchaser(purchaseConstraintsFactory, content), purchaseCommand: StorePurchaseCommand = StorePurchaseCommand(playerInventoryProxy, storeEntryPurchaser), stores: Stores = Stores(content, playerInventoryProxy, storeEntryPurchaser), craftCommand: CraftCommand = CraftCommand(playerInventoryProxy, content, purchaseConstraintsFactory), updateCommand: UpdateCommand = UpdateCommand(playerInventoryProxy), grantRewardsCommand: GrantRewardsCommand = GrantRewardsCommand(playerInventoryProxy), matchEndCommand: InventoryMatchEndCommand = InventoryMatchEndCommand(pragmaNode, playerInventoryProxy), grantCommand: GrantCommand = GrantCommand(playerInventoryProxy), grantCommandBulk: GrantCommandBulk = GrantCommandBulk(), destroyCommand: DestroyCommand = DestroyCommand(playerInventoryProxy), limitedGrantCommand: LimitedGrantCommand = LimitedGrantCommand(content, playerInventoryProxy), loginDataCommand: LoginDataCommand = LoginDataCommand(
content,
playerInventoryProxy,
stores,
limitedGrantCommand
), applyContentCommand: ApplyContentChangesCommand = applyCommandFactory(pragmaNode), updateContentCommand: UpdateContentCommand = UpdateContentCommand(), planContentCommand: PlanContentChangesCommand = PlanContentChangesCommand(), contentVersionCountsCommand: ContentVersionCountsCommand = ContentVersionCountsCommand(), socialPaymentServiceClient: SocialPaymentServiceClient = SocialPaymentServiceClient(pragmaNode), applyInventoryOperationsCommand: ApplyInventoryOperationsCommand = ApplyInventoryOperationsCommand(playerInventoryProxy), itemBundleGrantCommand: ItemBundleGrantCommand = ItemBundleGrantCommand(fulfillment), getContentSourceCommand: GetContentSourceCommand = GetContentSourceCommand(), socialAccountServiceClient: SocialAccountServiceClient = SocialAccountServiceClient(), playerDataEntitlementFulfiller: PlayerDataEntitlementFulfiller = PlayerDataEntitlementFulfiller(), entitlementsCommand: EntitlementsCommand = EntitlementsCommand(InventoryEntitlementFulfiller(fulfillment), playerDataEntitlementFulfiller), inventoryCache: InventoryCache = InventoryCache()) : DistributedService, ConfigHandler<InventoryServiceConfig>
InventoryService is responsible for interactions with Player Inventory, management of Instanced and Stackable items, reward and content grants, and store purchasing.
References
Constructors #
InventoryService | internal fun InventoryService(pragmaNode: PragmaNode, instanceId: UUID, uuidProxy: UUIDProxy = UUIDProxy(), content: InventoryServiceContent = InventoryServiceContent(), rewardsEngine: RewardsEngine = RewardsEngine(content), ledgerBuilder: LedgerBuilder = LedgerBuilder(content, uuidProxy, rewardsEngine), inventoryFilter: InventoryFilter = InventoryFilter(content), playerNotifier: PlayerNotifier = PlayerNotifier(pragmaNode), playerInventoryProxy: PlayerInventoryProxy = PlayerInventoryProxyImpl(ledgerBuilder, inventoryFilter, playerNotifier), fulfillment: Fulfillment = Fulfillment(playerInventoryProxy, LedgerOperationsFactory(content)), purchaseConstraintsFactory: PurchaseConstraintsFactory = PurchaseConstraintsFactory(content), storeEntryPurchaser: StoreEntryPurchaser = StoreEntryPurchaser(purchaseConstraintsFactory, content), purchaseCommand: StorePurchaseCommand = StorePurchaseCommand(playerInventoryProxy, storeEntryPurchaser), stores: Stores = Stores(content, playerInventoryProxy, storeEntryPurchaser), craftCommand: CraftCommand = CraftCommand(playerInventoryProxy, content, purchaseConstraintsFactory), updateCommand: UpdateCommand = UpdateCommand(playerInventoryProxy), grantRewardsCommand: GrantRewardsCommand = GrantRewardsCommand(playerInventoryProxy), matchEndCommand: InventoryMatchEndCommand = InventoryMatchEndCommand(pragmaNode, playerInventoryProxy), grantCommand: GrantCommand = GrantCommand(playerInventoryProxy), grantCommandBulk: GrantCommandBulk = GrantCommandBulk(), destroyCommand: DestroyCommand = DestroyCommand(playerInventoryProxy), limitedGrantCommand: LimitedGrantCommand = LimitedGrantCommand(content, playerInventoryProxy), loginDataCommand: LoginDataCommand = LoginDataCommand(
content,
playerInventoryProxy,
stores,
limitedGrantCommand
), applyContentCommand: ApplyContentChangesCommand = applyCommandFactory(pragmaNode), updateContentCommand: UpdateContentCommand = UpdateContentCommand(), planContentCommand: PlanContentChangesCommand = PlanContentChangesCommand(), contentVersionCountsCommand: ContentVersionCountsCommand = ContentVersionCountsCommand(), socialPaymentServiceClient: SocialPaymentServiceClient = SocialPaymentServiceClient(pragmaNode), applyInventoryOperationsCommand: ApplyInventoryOperationsCommand = ApplyInventoryOperationsCommand(playerInventoryProxy), itemBundleGrantCommand: ItemBundleGrantCommand = ItemBundleGrantCommand(fulfillment), getContentSourceCommand: GetContentSourceCommand = GetContentSourceCommand(), socialAccountServiceClient: SocialAccountServiceClient = SocialAccountServiceClient(), playerDataEntitlementFulfiller: PlayerDataEntitlementFulfiller = PlayerDataEntitlementFulfiller(), entitlementsCommand: EntitlementsCommand = EntitlementsCommand(InventoryEntitlementFulfiller(fulfillment), playerDataEntitlementFulfiller), inventoryCache: InventoryCache = InventoryCache()) |
Functions #
Name | Summary |
---|---|
Auto-approves new content changes and publish. Development only. | |
processes collections of inventory data operations: grants, updates, destroy, rewards for stackable and instanced items | |
processes collections of inventory data operations: grants, updates, destroy, rewards for stackable and instanced items | |
processes collections of inventory data operations: grants, updates, destroy, rewards for stackable and instanced items | |
Cancels an in-progress order that was previously started using the InitializeOrderV1Request. | |
Clears all player inventory out of the instance’s cache. | |
Clears all player inventory out of the instance’s cache. | |
Clears a player’s inventory out of the instance’s cache. | |
Clears a player’s inventory out of the instance’s cache. | |
Clears a player’s inventory out of the in-memory cache. | |
Gets all current content version numbers. | |
Performs an arbitrary transform on player inventory. | |
Permanently deletes all inventory data for all players. | |
Deletes a player’s entire inventory. | |
Deletes a player’s entire inventory. | |
Deletes a player’s entire inventory. | |
Deletes a player’s entire inventory. | |
Applies a list of InventoryCommon.ItemServerDestroyV1 item destroys for an operator to delete player inventory items. | |
Applies a list of InventoryCommon.ItemServerDestroyV1 item destroys for a partner to delete player inventory items. | |
Applies a list of InventoryCommon.ItemServerDestroyV1 item destroys to delete player inventory items. | |
Finalizes all in-progress orders that were previously started using the InitializeOrderV1Request, but were not finalized and/or fulfilled. | |
Finalizes an in-progress order that was previously started using the InitializeOrderV1Request. | |
Retrieves a specific catalog. | |
Retrieves content of a specific type grouped by source file. | |
Retrieves full inventory for a player. | |
Retrieves full inventory for a player. | |
Retrieves inventory for a player. Optionally can filter based on list of tags to include. | |
Retrieves full inventory for player. | |
Retrieves content catalogs and will execute any limited grants. Will broadcast an InventoryRpc.InventoryUpdatedV1Notification if player is given any limited grants. | |
Retrieve records of entitlements synced syncEntitlementsV1/syncEntitlementsOperatorV1/syncEntitlementsServiceV1/syncEntitlementsPartnerV1. | |
Retrieve records of entitlements synced syncEntitlementsV1/syncEntitlementsOperatorV1/syncEntitlementsServiceV1/syncEntitlementsPartnerV1. | |
Retrieves content of a specific type grouped by source file. | |
Grants a list of InventoryCommon.ItemServerGrantV1 item grants to a given list of players. | |
Grants a list of InventoryCommon.ItemServerGrantV1 item grants to a player. | |
Grants a list of InventoryCommon.ItemServerGrantV1 item grants to a player. | |
Grants a list of InventoryCommon.ItemServerGrantV1 item grants to a player. | |
Initialize an order for a product entry by its identifier with a given provider. | |
Processes match end inventory results for a specific player. | |
Grants a list of InventoryCommon.RewardGrant grants to a player. | |
Retrieves a summary of new content changes. | |
Grants a list of InventoryCommon.RewardGrant grants to a player. | |
Simulates the result of applying a reward grant. | |
Lets players purchase a specified amount of a InventoryContent.StoreEntry items. InventoryContent.StoreEntry defines requirements to check whether a player can purchase the entry before letting the transaction happen. | |
Syncs all available entitlements from all configured Entitlement Provider Plugins except those that currently require an authCode. | |
Syncs all available entitlements from all configured Entitlement Provider Plugins except those that currently require an authCode. | |
Syncs all available entitlements from all configured Entitlement Provider Plugins except those that currently require an authCode. | |
Syncs all available entitlements from all configured Entitlement Provider Plugins. | |
Updates a content source file. | |
Lets operators update multiple items for a given player by list of InventoryCommon.ServerItemUpdateV2. | |
Lets partners update multiple items for a given player by list of InventoryCommon.ServerItemUpdateV2. | |
Lets players update multiple items by list of InventoryCommon.InstancedItemUpdate. | |
Lets players update an item by InventoryCommon.InstancedItemUpdate. | |
Updates a content source file. | |
Updates a content source file. |