Trigger Reference of GS2-LoginReward Script

Reference for event triggers that call extended scripts, as defined in GS2-LoginReward

receive

Event trigger to call GS2-Script before Receive.

Request

TypeDescription
namespaceNamespaceNamespace
bonusModelBonusModelBonus model
userIdstringUser ID performing the loginReward
receiveStepintReceived step
configConfig[]Set values to be applied to transaction variables

Result

TypeRequireDefaultLimitationDescription
permitboolAllow buy

Implementation Example

namespace = args.namespace
bonusModel = args.bonusModel
userId = args.userId
receiveStep = args.receiveStep
config = args.config

result = {
  permit=permit
}

receiveDone

GS2-Script called after Receive.

Request

TypeDescription
namespaceNamespaceNamespace
bonusModelBonusModelBonus model
userIdstringUser ID performing the loginReward
receiveStepintReceived step
configConfig[]Set values to be applied to transaction variables

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
bonusModel = args.bonusModel
userId = args.userId
receiveStep = args.receiveStep
config = args.config

result = {
}