Set a custom reward function which will run after an incentive sender’s reward is rolled.
1
2
3
4
5
6
systems.GetIncentivesSystem().SetOnSenderReward(OnSenderReward)funcOnSenderReward(ctxcontext.Context,loggerruntime.Logger,nkruntime.NakamaModule,userID,sourceIDstring,source*hiro.IncentivesConfigIncentive,rewardConfig*hiro.EconomyConfigReward,reward*hiro.Reward)(*hiro.Reward,error){// Modify reward or take additional actions.
returnreward,nil}
Set a custom reward function which will run after an incentive recipient’s reward is rolled.
1
2
3
4
5
6
systems.GetIncentivesSystem().SetOnRecipientReward(OnRecipientReward)funcOnRecipientReward(ctxcontext.Context,loggerruntime.Logger,nkruntime.NakamaModule,userID,sourceIDstring,source*hiro.IncentivesConfigIncentive,rewardConfig*hiro.EconomyConfigReward,reward*hiro.Reward)(*hiro.Reward,error){// Modify reward or take additional actions.
returnreward,nil}