Trigger Reference of GS2-Grade Script
Reference of event triggers that call extended scripts
Trigger
changeGrade
grade changes
Synchronous Execution Script
Script and grade changes are executed synchronously in that order.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| gradeModel | GradeModel | Grade Model |
| status | Status | Status before change |
| afterStatus | Status | Status after change |
Result
| Type | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|
| permit | bool | ✓ | Whether to allow grade change | ||
| overrideGradeValue | long | ✓ | 0 ~ 2147483645 | Amount of grade change |
Implementation Example
namespace = args.namespace
gradeModel = args.gradeModel
status = args.status
afterStatus = args.afterStatus
result = {
permit=permit,
overrideGradeValue=overrideGradeValue
}Asynchronous Execution Script
The script will run after the grade changes is executed.
Request
| Type | Description | |
|---|---|---|
| namespace | Namespace | Namespace |
| gradeModel | GradeModel | Grade Model |
| status | Status | Status |
| afterStatus | Status | Status after change |
Result
| Type | Required | Default | Value Limits | Description |
|---|
Implementation Example
namespace = args.namespace
gradeModel = args.gradeModel
status = args.status
afterStatus = args.afterStatus
result = {
}