GS2-Buff Script トリガー リファレンス

拡張スクリプトを呼び出す イベントトリガー のリファレンス

トリガー

apply

バフの適用

同期実行スクリプト

バフの適用処理の前に、スクリプトが同期実行されます。

Request
説明
namespaceNamespaceネームスペース
buffEntryModelBuffEntryModelバフエントリーモデル
userIdstringユーザーID
Result
必須デフォルト値の制限説明
permitbool
バフの適用を許可するか
overrideBuffRatefloat
0 ~ 100バフに適用する最終レート
実装例
-- Request
local namespace = args.namespace
local buffEntryModel = args.buffEntryModel
local userId = args.userId

-- Business logic:
local permit = true
local overrideBuffRate = 0

-- Result
result = {
  permit=permit,
  overrideBuffRate=overrideBuffRate
}

非同期実行スクリプト

バフの適用処理の後に、スクリプトが非同期実行されます。

Request
説明
namespaceNamespaceネームスペース
buffEntryModelBuffEntryModelバフエントリーモデル
userIdstringユーザーID
実装例
-- Request
local namespace = args.namespace
local buffEntryModel = args.buffEntryModel
local userId = args.userId

-- Asynchronous scripts typically do not affect the API response.
-- Use for logging, analytics, external notifications, etc.

result = {
}