Skip to main content
Version: 5.9.6

UseGoodsV3

public BackendReturnObject UseGoodsV3(goodsType type, int amount);

Issue of ranking settlement failure upon calling the method
When utilizing guild rankings using goods information, calling this function during the ranking settlement time may abnormally terminate the process.
Therefore, please use the UseGoodsV4 function that restricts calls between 4 - 5 am when utilizing guild rankings using goods information.

Parameters

ValueTypeDescription
typegoodsType(enum)Type of currency to contribute. goodsType.goodsN(N: 1 - 10)
amountintAmount to be used. Only negative numbers are allowed.

Description

Uses the currency of the guild's goodsType.

Example

Synchronous

Backend.Guild.UseGoodsV3(goodsType.goods1, -20);

Asynchronous

Backend.Guild.UseGoodsV3(goodsType.goods1, -10, (callback) => 
{
// Post-process
});

SendQueue

SendQueue.Enqueue(Backend.Guild.UseGoodsV3, 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