UpdateMyGuildCurrency
public BackndReturnObject UpdateMyGuildCurrency(GoodsType goodsType, GoodsUse goodsUse, int goodsAmount, bool setBlockDuringLeaderboardUpdateTime); public BackndReturnObject UpdateMyGuildCurrency(GoodsType goodsType, GoodsUse goodsUse, long goodsAmount, bool setBlockDuringLeaderboardUpdateTime); public BackndReturnObject UpdateMyGuildCurrency(GoodsType goodsType, GoodsUse goodsUse, float goodsAmount, bool setBlockDuringLeaderboardUpdateTime); public BackndReturnObject UpdateMyGuildCurrency(GoodsType goodsType, GoodsUse goodsUse, double goodsAmount, bool setBlockDuringLeaderboardUpdateTime);
Parameters
Value | Type | Description |
---|---|---|
goodsType | GoodsType(enum) | Type of currency to contribute. goodsType.goodsN(N: 1 - 10) |
goodsUse | GoodsUse(enum) | If you want to donate merchandise, enter Give; if you want to use merchandise, enter Spend. Only Master or ViceMaster can Use. |
goodsAmount | int, long, float, double | Amount of contribution. Only positive numbers are allowed. |
setBlockDuringLeaderboardUpdateTime | bool | When utilizing guild rankings using metadata, true |
Description
Contributes currency to the currently joined guild.
In BACKND, 10 types of goods can be contributed, and a total amount of contributed goods can be set when creating a guild.
These types are named goods1, goods2, goods3 ⋯ goods10.
Example
Synchronous
Backnd.Guild.UpdateMyGuildCurrency(goodsType.goods1, GoodsUse.Give, 20, true);
Asynchronous
Backnd.Guild.UpdateMyGuildCurrency(goodsType.goods1, GoodsUse.Give, 20, true, (callback) =>
{
// Post-process
});
Return cases
Success cases
When the contribution is successful
statusCode : 204
Error cases
When the contributed goodsType exceeds the goodsCount
statusCode : 400
errorCode : BadParameterException
When the amount is a negative number
statusCode : 412
errorCode : PreconditionFailed
When a user who has not joined a guild calls the method
statusCode : 412
errorCode : PreconditionFailed