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
| Type | Description |
---|
namespace | Namespace | Namespace |
bonusModel | BonusModel | Bonus model |
userId | string | User ID performing the loginReward |
receiveStep | int | Received step |
config | Config[] | Set values to be applied to transaction variables |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow 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
| Type | Description |
---|
namespace | Namespace | Namespace |
bonusModel | BonusModel | Bonus model |
userId | string | User ID performing the loginReward |
receiveStep | int | Received step |
config | Config[] | Set values to be applied to transaction variables |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
bonusModel = args.bonusModel
userId = args.userId
receiveStep = args.receiveStep
config = args.config
result = {
}