> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# character_inventory_item_added

> character_inventory_item_added 事件。

向角色授予物品时触发此事件。

## 属性

| 名称 | 类型 | 说明 |
| :- | :- | :- |
| Annotation | String | 关于该库存物品的可选详细信息。 |
| BundleContents | \[] | 作为捆绑包的一部分与此物品一起授予角色的任何其他物品的目录物品 ID。 |
| CatalogVersion | String | 定义所添加物品的目录版本。 |
| Class | String | 已添加物品的类别。 |
| CouponCode | String | 授予该物品的已兑换优惠券（如果有）。 |
| DisplayName | String | 已添加物品的显示名称。 |
| Expiration | DateTime | 物品的过期时间。如果物品不会过期，则该值为 null。 |
| InstanceId | String | 已添加库存物品的唯一实例 ID。 |
| ItemId | String | 已添加库存物品的目录物品 ID。 |
| PlayerId | String | |
| RemainingUses | uint32 | 如果物品具有有限的使用次数，则为物品剩余的使用次数。 |
| TitleId | String | |

## 通用属性

所有 V1 PlayStream 事件均格式化为 JSON 对象，并共享以下通用属性：

| 名称 | 类型 | 说明 |
| :- | :- | :- |
| EntityId | String | 此事件适用的实体（title、player 等）的标识符。 |
| EntityType | String | 此事件适用的实体（player、title 等）的类型。如果 PlayFab 需要对此实体执行操作，则 EntityType 必须为 "player"、"character" 或 "title"。要求 PlayFab 当前不解析的任何实体类型都应加上命名空间前缀（如 "com.mygame.guild"），因为 PlayFab 可能随时开始解析根实体。 |
| EventId | String | PlayFab 为此事件分配的唯一标识符。 |
| EventName | String | 此事件的名称。 |
| EventNamespace | String | 分配给此事件的命名空间。例如："com.myprogram.ads" |
| Source | String | 此 PlayStream 事件的来源名称；如果事件源自我们，则为 PlayFab。 |
| SourceType | [SourceType](https://docs.xbox.com/zh-CN/services/playfab/api-references/events/data-types/sourcetype.md) | 此事件的来源类型（PlayFab 合作伙伴、其他后端或来自 PlayFab API）。 |
| Timestamp | DateTime | 与此事件关联的时间（UTC）。 |


## Related topics

- [PlayFab 2016 版本发布说明](https://docs.xbox.com/zh-CN/services/playfab/release-notes/2016.md)
- [PlayStream 事件模型参考](https://docs.xbox.com/zh-CN/services/playfab/api-references/events/index.md)
- [player_inventory_item_added](https://docs.xbox.com/zh-CN/services/playfab/api-references/events/Player/player-inventory-item-added.md)
- [Get Character Inventory](https://docs.xbox.com/api-reference/player-item-management/get-character-inventory.md)
- [Grant Items To Character](https://docs.xbox.com/api-reference/player-item-management/grant-items-to-character.md)
