Before you can send a messages from Client Game to Server Game function, you need to:
Firstly, you need to make sure you add a list of Jackpots Templates Ids into your session messsage on server side (more info). You will get jackpots Details on Fireball succesfully authorise:
AuthRequest request = new AuthRequest(fireball.CurrentSession);
fireball.Authorize(request,
(response) =>
{
// success authorization
Debug.Log($"Balance: {response.Currency} {response.Balance}");
// check jackpots details
if (response.Jackpots != null && response.Jackpots.Count > 0)
{
foreach (var jackpotDetails in response.Jackpots)
{
Debug.Log($"Jackpot {jackpotDetails.TemplateId}: {jackpotDetails.Value}");
}
}
});
If any player makes a contribution to some jackpot that you have been subscribed to, the game client will receive an update event:
// subscribe to jackpots updates
fireball.OnJackpotUpdate += OnJackpotUpdate;
...
private void OnJackpotUpdate(JackpotUpdateMessage jackpotMessage)
{
// check jackpots details
if (jackpotMessage != null)
{
Debug.Log($"Jackpot {jackpotMessage.templateId}: {jackpotMessage.amount}");
}
}