Trigger Reference of GS2-SkillTree Script

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

release

Event trigger to call GS2-Script before release node.

Request

TypeDescription
namespaceNamespaceNamespace
oldStatusStatusStatus before update
newStatusStatusStatus after update
userIdstringUser Id
nodeModelNamesstring[]List of node model names

Result

TypeRequireDefaultLimitationDescription
permitboolAllow release node

Implementation Example

namespace = args.namespace
oldStatus = args.oldStatus
newStatus = args.newStatus
userId = args.userId
nodeModelNames = args.nodeModelNames

result = {
  permit=permit
}

releaseDone

GS2-Script called after release node.

Request

TypeDescription
namespaceNamespaceNamespace
oldStatusStatusStatus before update
newStatusStatusStatus after update
userIdstringUser Id
nodeModelNamesstring[]List of node model names

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
oldStatus = args.oldStatus
newStatus = args.newStatus
userId = args.userId
nodeModelNames = args.nodeModelNames

result = {
}

restrain

Event trigger to call GS2-Script before Restrain node.

Request

TypeDescription
namespaceNamespaceNamespace
userIdstringUser Id
oldStatusStatusStatus before update
newStatusStatusStatus after update
nodeModelNamesstring[]List of node model names

Result

TypeRequireDefaultLimitationDescription
permitboolAllow restrain node

Implementation Example

namespace = args.namespace
userId = args.userId
oldStatus = args.oldStatus
newStatus = args.newStatus
nodeModelNames = args.nodeModelNames

result = {
  permit=permit
}

restrainDone

GS2-Script called after Restrain node.

Request

TypeDescription
namespaceNamespaceNamespace
userIdstringUser Id
oldStatusStatusStatus before update
newStatusStatusStatus after update
nodeModelNamesstring[]List of node model names

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
userId = args.userId
oldStatus = args.oldStatus
newStatus = args.newStatus
nodeModelNames = args.nodeModelNames

result = {
}