Trigger Reference of GS2-Grade Script
Reference for event triggers that call extended scripts, as defined in GS2-Grade
changeGrade
Event trigger to call GS2-Script before grade changes.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
gradeModel | GradeModel | Grade Model |
status | Status | Status before change |
afterStatus | Status | Status after change |
Result
| Type | Require | Default | Limitation | Description |
---|
permit | bool | ✓ | | | Allow grade change |
overrideGradeValue | long | ✓ | | ~ 2147483645 | Amount of grade change |
Implementation Example
namespace = args.namespace
gradeModel = args.gradeModel
status = args.status
afterStatus = args.afterStatus
result = {
permit=permit,
overrideGradeValue=overrideGradeValue
}
changeGradeDone
GS2-Script called after grade changes.
Request
| Type | Description |
---|
namespace | Namespace | Namespace |
gradeModel | GradeModel | Grade Model |
status | Status | Status |
afterStatus | Status | Status after change |
Result
| Type | Require | Default | Limitation | Description |
---|
Implementation Example
namespace = args.namespace
gradeModel = args.gradeModel
status = args.status
afterStatus = args.afterStatus
result = {
}