https://metaplay.io logo
Offer Placements
# questions-and-feedback
z
Hello guys! Glad to join the community 🙂 I have a question related to the Offer Group Placements I'm building my in-game shop and have, for example few tabs in the shop like "Gold" (tab with gold packs), "Crystals" (tab with crystal packs), "Offers" (tab with special offers like Gold+Crystal packs), and each offer should have they own Lifetime and Cooldown, and AFAIK we can set Lifetime and Cooldown only for Offer Groups and not for Offers - I need to create a new offer group for each offer. For the offers, I use the same placement in offer groups = "Offers" And when I'm building my UI, I use Code: OfferPlacementId shopPlacement = OfferPlacementId.FromString(shopTabType.ToString()); (shopTabType could be "Offers", "Gold", "Crystals") But when I set Lifetime and Cooldown for all offers - not all of them are properly updating their appearance due to a check for occupation in the MetaPlay code: public virtual bool PlacementIsAvailable(IPlayerModelBase player, OfferPlacementId placement) { return !GetActiveStates(player).Any(offerGroup => offerGroup.ActivableInfo.Placement == placement); } Do I use the placement incorrect, or how can I fix it ? Thanks!
n
Hi! Do i understand correctly that you'd like all available Offers to be able to show up at the same time? As you discovered, the SDK imposes a limit of 1 offer group per each Placement at a time. This means each placement (from the SDK's point of view) is a "slot" where only one active offer group can fit. If you don't want to limit simultaneous offer groups per shop tab, probably the simplest way to go is to not use the SDK's Placement property for this, but instead have your own config property that specifies the shop tab (Gold, Crystals, Offers). Then to avoid the SDK's "1 per placement" limit, you can give each offer group its own unique Placement in the config.
z
Thanks for the answer!