> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Money2 Buff リファレンス

GS2-Buff でバフを適用する際に指定する、パラメータの補正が可能なモデル/アクション内のフィールドと、その適用範囲の設定について




{{% alert title="Note" color="info" %}}
バフエントリーモデルの詳細については [BuffEntryModel](api_reference/buff/master_data/#buffentrymodel) をご参照ください。
{{% /alert %}}
## Action
バフを適用可能なアクションの種類

### Gs2Money2:DepositByUserId
ユーザーIDを指定してウォレットの残高に加算<br>

指定されたユーザーのウォレットに指定された入金トランザクションを追加します。<br>
各入金トランザクションに対してイベントログが記録されます。


#### バフの適用対象フィールド

##### count


[DepositTransaction - 入金トランザクション](../sdk#deposittransaction)



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| count | int |  | ✓|  | 0 ~ 2147483646 | 課金通貨の数量<br>この入金における仮想通貨の単位数です。ウォレットから出金されると減少します。 |


##### マスターデータ記述例



**JSON**
```json
"targetAction": {
    "targetActionName": "Gs2Money2:DepositByUserId",
    "targetFieldName": "count",
    "conditionGrns": [
    ],
    "rate": 1.0
}
```

#### バフの適用条件モデル

##### Gs2Money2:Wallet


ウォレット


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Money2:Wallet",
        "targetGrn": "grn:gs2:{region}:{ownerId}:money2:{namespaceName}:user:{userId}:wallet:{slot}"
    }
]
```



---

### Gs2Money2:Withdraw
ウォレットから残高を消費<br>

リクエストユーザーのウォレットから指定量の通貨を消費します。<br>
paidOnly が false の場合、無償通貨が先に消費され、次に有償通貨が消費されます。paidOnly が true の場合、有償通貨のみが消費されます。


#### バフの適用対象フィールド

##### withdrawCount


[Wallet - ウォレット](../sdk#wallet)



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| withdrawCount | int |  | ✓|  | 1 ~ 2147483646 | 消費する課金通貨の数量 |


##### マスターデータ記述例



**JSON**
```json
"targetAction": {
    "targetActionName": "Gs2Money2:Withdraw",
    "targetFieldName": "withdrawCount",
    "conditionGrns": [
    ],
    "rate": 1.0
}
```

#### バフの適用条件モデル

##### Gs2Money2:Wallet


ウォレット


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Money2:Wallet",
        "targetGrn": "grn:gs2:{region}:{ownerId}:money2:{namespaceName}:user:{userId}:wallet:{slot}"
    }
]
```



---

### Gs2Money2:WithdrawByUserId
ユーザーIDを指定してウォレットから残高を消費<br>

指定されたユーザーのウォレットから指定量の通貨を消費します。<br>
paidOnly が false の場合、無償通貨が先に消費され、次に有償通貨が消費されます。


#### バフの適用対象フィールド

##### withdrawCount


[Wallet - ウォレット](../sdk#wallet)



|  | 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 |
| --- | --- | --- | --- | --- | --- | --- |
| withdrawCount | int |  | ✓|  | 1 ~ 2147483646 | 消費する課金通貨の数量 |


##### マスターデータ記述例



**JSON**
```json
"targetAction": {
    "targetActionName": "Gs2Money2:WithdrawByUserId",
    "targetFieldName": "withdrawCount",
    "conditionGrns": [
    ],
    "rate": 1.0
}
```

#### バフの適用条件モデル

##### Gs2Money2:Wallet


ウォレット


##### マスターデータ記述例


**JSON**
```json
"conditionGrns": [
    {
        "targetModelName": "Gs2Money2:Wallet",
        "targetGrn": "grn:gs2:{region}:{ownerId}:money2:{namespaceName}:user:{userId}:wallet:{slot}"
    }
]
```



---



