UseGoodsV4
public BackendReturnObject UseGoodsV4(goodsType type, int amount);
Note
If rankings using goods are not included, please use ContributeGoodsV3, which does not have such restrictions.
Parameters
Value | Type | Description |
---|---|---|
type | goodsType(enum) | Type of currency to contribute. goodsType.goodsN(N: 1 - 10) |
amount | int | Amount to be used. Only negative numbers are allowed. |
Description
Uses the currency of the guild's goodsType.
Making changes between 4 - 5 am is unavailable, and requesting a change will return a 428 error.
It is used in the same way as UseGoodsV3.
When the ContributeGoodsV3 method is called while updating rankings using goods information, the ranking settlement process may fail with a low probability. Therefore, it is recommended to migrate to the ContrivuteGoodsV4 method to restrict updates during settlement time.
Example
Synchronous
Backend.Guild.UseGoodsV4(goodsType.goods1, -20);
Asynchronous
Backend.Guild.UseGoodsV4(goodsType.goods1, -10, (callback) =>
{
// Post-process
});
SendQueue
SendQueue.Enqueue(Backend.Guild.UseGoodsV4, goodsType.goods1, -10, (callback) =>
{
// Post-process
});
Return cases
Success cases
When used
statusCode : 204
Error cases
When a guild member who is not the master attempts to use
statusCode : 403
errorCode : ForbiddenException
When the amount is a positive number
statusCode : 412
errorCode : PreconditionFailed
When the used amount is larger than the owned amount
statusCode : 412
errorCode : PreconditionFailed
When a person not in the guild attempts to use
statusCode : 412
errorCode : PreconditionFailed
When called between 4 - 5 am
statusCode : 428
errorCode : Precondition Required