question

rewardclients avatar image
rewardclients asked

How to get only active items?

Hey!

I need to know to get only Active Items, I use code like this:

private void OnCheckRewardsSuccess(GetUserInventoryResult result)
    {


		foreach (var eachItem in result.Inventory)
		{
			if (eachItem.ItemId == "Item_Reward")
			{
				RemoveItemReward();


				
			}
         
		}


	
	}

but it shows all Items even Revoked and Expired but I need only get Active Items.

Can you help?

Thansk!

Player Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

API GetUserInventory should only get active items and a quick test I have done shows that it still in the correct behavior. You can use postman to test this API and see if the items in the results correspond one-to-one with the active items in the player's Inventory.


3.png (24.6 KiB)
4.png (86.1 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.