Skip to main content
Version: SDK-5.11.6

UseGuildGoods

public BackendReturnObject UseGuildGoods(string rankUuid, goodsType goodsType, int value);

Note

Old version rankings cannot use this method.

Parameters

ValueTypeDescription
rankUuidstringuuid of the ranking to update
goodsTypegoodsTypeType of guild goods to update
valueintValue to use

The rankUuid value can be checked using the following methods:

Description

Uses guild goods and updates the ranking at the same time.

  • UseGuildGoods is a method where the ranking update function is added to the Backend.Social.Guild.UseGoodsV3 method.
  • Information of goods updated without using the ContributeGuildGoods method or the UseGuildGoods method is not reflected in the ranking.
    When 1,000 points are used using Backend.Social.Guild.UseGoodsV3 method while 10,000 points are reflected in the current ranking, 10,000 points will be reflected in the ranking, and 9,000 points will be reflected in the guild goods.
    If the user uses 1,000 points again using the UseGuildGoods method, 8,000 points will be reflected in the ranking and 8,000 points will also be reflected in the guild goods.

Only the guild master can use guild goods.

Guild rankings do not support additional fields.

Example

Synchronous

Backend.URank.Guild.UseGuildGoods("rankUuid", goodsType.goods1, 1);

Asynchronous

Backend.URank.Guild.UseGuildGoods("rankUuid", goodsType.goods1, 1, callback => {
// Post-process
});

SendQueue

SendQueue.Enqueue(Backend.URank.Guild.UseGuildGoods, "rankUuid", goodsType.goods1, 1, callback => {
// Post-process
});

Return cases

Success cases

When the ranking is updated successfully
statusCode : 204
message : Success

Error cases

When the uuid is null or string.Empty
statusCode : 400
errorCode : ValidationException
message : rankUuid is null or empty

When the ranking to be updated is not a goods ranking
statusCode : 400
errorCode : BadParameterException
message : bad table, Invalid table

When the value is 0 or lower
statusCode : 400
errorCode : PreconditionFailed
message : value only allow more than 0

When a user who is not the guild master calls the UseGuildGoods method
statusCode : 403
errorCode : ForbiddenException
message : Forbidden useGoods, Cannot use goods

When the user tries to update with goods not selected during ranking creation
statusCode : 404
errorCode : NotFoundException
message : guild rank not found, guild rank cannot be found

When there is an attempt to use goods more than the amount owned by the guild
statusCode : 412
errorCode : PreconditionFailed
message : inadequateAmount prerequisites are not met.

When a user who has not joined a guild attempts to update the ranking
statusCode : 412
errorCode : PreconditionFailed
message : notGuildMember prerequisites are not met.

When there is an attempt to update the ranking during UTC +9 04:00 - 05:00
statusCode : 428
errorCode : Precondition Required
message : Precondition Required ranking is being counted When there is an attempt to update the ranking between 4 am - 5 am in Korean time

When there is an attempt to update an expired one-time ranking
statusCode : 428
errorCode : Precondition Required
message : Precondition Required ranking is being counted