If I give a positive amount of items to a user with ModifyItemUses API, the Playstream event that is generated is com.playfab.player_consumed_item. Here is the generated response when I added 2 uses of an item:
{
"EventName": "player_consumed_item",
"ItemId": "snowman",
"CatalogVersion": "Main Catalog",
"ItemInstanceId": "11EC7374EC1A57DC",
"PreviousUsesRemaining": 1,
"UsesRemaining": 3,
"Class": "boost",
"EventNamespace": "com.playfab",
"EntityType": "player",
"Source": "PlayFab",
"TitleId": "C15DC",
"EntityId": "F60A005E5D8D7DB1",
"EventId": "1cf9b969c9cb4ec2a85c9f640fb9537c",
"SourceType": "BackEnd",
"Timestamp": "2023-01-11T15:17:48.8336047Z",
"History": null,
"CustomTags": null,
"Reserved": null,
"PlayFabEnvironment": {
"Vertical": "master",
"Cloud": "main",
"Application": "mainserver",
"Commit": "aab0da2"
}
}
As you can see, the event is player_consumed_item, but I'm adding items, not removing them. Note that UsesRemaining = 3 and PreviousUsesRemaining = 1. The user consumed "-2" items! This is wrong. Either ModifyItemUses must not generate playstream events, or the resulting event must be either player_consumed_item or player_inventory_item_added depending on whether items are being added or removed.
,If I give a positive amount of items to a user with ModifyItemUses API, the Playstream event that is generated is com.playfab.player_consumed_item. Here is an example of the generated response when I added 2 uses of an item, as seen on Playstream monitor:
{
"EventName": "player_consumed_item",
"ItemId": "snowman",
"CatalogVersion": "Main Catalog",
"ItemInstanceId": "11EC7374EC1A57DC",
"PreviousUsesRemaining": 1,
"UsesRemaining": 3,
"Class": "boost",
"EventNamespace": "com.playfab",
"EntityType": "player",
"Source": "PlayFab",
"TitleId": "C15DC",
"EntityId": "F60A005E5D8D7DB1",
"EventId": "1cf9b969c9cb4ec2a85c9f640fb9537c",
"SourceType": "BackEnd",
"Timestamp": "2023-01-11T15:17:48.8336047Z",
"History": null,
"CustomTags": null,
"Reserved": null,
"PlayFabEnvironment": {
"Vertical": "master",
"Cloud": "main",
"Application": "mainserver",
"Commit": "aab0da2"
}
}
As you can see, the event is player_consumed_item, but I'm adding items, not removing them. Note that UsesRemaining = 3 and PreviousUsesRemaining = 1. Turns out the user consumed "-2" items! This is wrong. Either ModifyItemUses must not generate playstream events, or the resulting event must be either player_consumed_item or player_inventory_item_added depending on whether items are added or removed.