๐ตAdd Promo Item
Like what you're seeing?
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude. These articles are made possible by our GitHub Sponsors ... become a sponsor today!
Introduction
Grant a specific one-time promotional item to the current user.
This can be safely called from the client because the items it can grant can be locked down via policies in the itemdefs. One of the primary scenarios for this call is to grant an item to users who also own a specific other game. This can be useful if your game has a custom UI for showing a specific promo item to the user otherwise if you want to grant multiple promotional items then use AddPromoItems or GrantPromoItems.
Any items that can be granted MUST have a "promo" attribute in their itemdef. That promo item lists a set of APPIDs that the user must own to be granted this given item. This version will grant all items that have promo attributes specified for them in the configured item definitions. This allows adding additional promotional items without having to update the game client. For example, the following will allow the item to be granted if the user owns either TF2 or SpaceWar.
Options
Heathen provides two sets of options when working with this endpoint. You can add a single promo item or multiple, and you can use the "Native" or "Simple" version. The Simple version uses a callback that will invoke when the result is ready as opposed to returning a handle that you would need to manage your self
Last updated