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

# GS2-Money2 Buff Reference

Describes the fields within models/actions whose parameters can be adjusted when applying buffs with GS2-Buff, and how to configure the scope in which those buffs are applied.




{{% alert title="Note" color="info" %}}
See [BuffEntryModel](api_reference/buff/master_data/#buffentrymodel) for more information on the buff entry model.
{{% /alert %}}
## Action
Types of actions that can apply buffs

### Gs2Money2:DepositByUserId
Deposit balance to Wallet by User ID

Adds the specified deposit transactions to the wallet for the specified user.
An event log is recorded for each deposit transaction.


#### Target fields for buff application

##### count


[DepositTransaction - Deposit Transaction](../sdk#deposittransaction)



|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| count | int |  | ✓|  | 0 ~ 2147483646 | Quantity of premium currency<br>The number of virtual currency units in this deposit. Decreases as currency is withdrawn from the wallet. |


##### Example Master Data



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

#### Buff Application Condition Model

##### Gs2Money2:Wallet


Wallet


##### Example Master Data


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



---

### Gs2Money2:Withdraw
Withdraw balance from wallet

Withdraws the specified amount of currency from the wallet for the requesting user.
If paidOnly is false, free currency is consumed first, then paid currency. If paidOnly is true, only paid currency is consumed.


#### Target fields for buff application

##### withdrawCount


[Wallet - Wallet](../sdk#wallet)



|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| withdrawCount | int |  | ✓|  | 1 ~ 2147483646 | Quantity of premium currency to be consumed |


##### Example Master Data



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

#### Buff Application Condition Model

##### Gs2Money2:Wallet


Wallet


##### Example Master Data


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



---

### Gs2Money2:WithdrawByUserId
Withdraw balance from Wallet by User ID

Withdraws the specified amount of currency from the wallet for the specified user.
If paidOnly is false, free currency is consumed first, then paid currency.


#### Target fields for buff application

##### withdrawCount


[Wallet - Wallet](../sdk#wallet)



|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| withdrawCount | int |  | ✓|  | 1 ~ 2147483646 | Quantity of premium currency to be consumed |


##### Example Master Data



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

#### Buff Application Condition Model

##### Gs2Money2:Wallet


Wallet


##### Example Master Data


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



---



