GS2-Buff Script トリガー リファレンス
拡張スクリプトを呼び出す イベントトリガー のリファレンス
トリガー
apply
バフの適用
同期実行スクリプト
バフの適用処理の前に、スクリプトが同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| buffEntryModel | BuffEntryModel | バフエントリーモデル |
| userId | string | ユーザーID |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | バフの適用を許可するか | ||
| overrideBuffRate | float | ✓ | 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
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| buffEntryModel | BuffEntryModel | バフエントリーモデル |
| userId | string | ユーザー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 = {
}