Trigger Reference of GS2-Enhance Script

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

enhance

Event trigger to call GS2-Script before reinforcement.

Request

TypeDescription
namespaceNamespaceNamespace
rateModelRateModelEnhanced Rate Model
targetItemSetIdstringGRN of the item set to be enhanced
bonusRatefloatExperience bonus multiplier (1.0 = no bonus)
experienceValuelongAmount of experience gained

Result

TypeRequireDefaultLimitationDescription
permitboolAllow enhancement execution
overrideExperienceValuelong~ 2147483645Amount of available experience to be overwritten

Implementation Example

namespace = args.namespace
rateModel = args.rateModel
targetItemSetId = args.targetItemSetId
bonusRate = args.bonusRate
experienceValue = args.experienceValue

result = {
  permit=permit,
  overrideExperienceValue=overrideExperienceValue
}

enhanceDone

GS2-Script called after reinforcement.

Request

TypeDescription
namespaceNamespaceNamespace
rateModelRateModelEnhanced Rate Model
targetItemSetIdstringGRN of the item set to be enhanced
bonusRatefloatExperience bonus multiplier (1.0 = no bonus)
experienceValuelongAmount of experience gained

Result

TypeRequireDefaultLimitationDescription

Implementation Example

namespace = args.namespace
rateModel = args.rateModel
targetItemSetId = args.targetItemSetId
bonusRate = args.bonusRate
experienceValue = args.experienceValue

result = {
}