CreateGuildV3
public BackendReturnObject CreateGuildV3(string guildName, int goodsCount);
public BackendReturnObject CreateGuildV3(string guildName, int goodsCount, CountryCode countryCode);
public BackendReturnObject CreateGuildV3(string guildName, int goodsCount, Param param);
public BackendReturnObject CreateGuildV3(string guildName, int goodsCount, Param param, CountryCode countryCode);
Parameters
Value | Type | Description | default |
---|---|---|---|
guildName | string | Guild name | - |
goodsCount | int | Number of guild goods to be used(1 - 10)(Cannot be changed after the guild has been created) | - |
param | Param | (Optional) Guild metadata | - |
countryCode | CountryCode | (Optional) Country information | CountryCode.NONE |
Description
Creates a guild.
- Only members who meet all guild creation conditions registered in BACKND Console can create a guild.
Guild creation conditions will be determined according to the latest value in the designated table and partition under BACKND Console > BACKND Base > Guild Management > Settings. If there is no guild creation condition registered in BACKND Console, any member can create a guild.
Caution
- The guild name must be between 2 - 16 characters and can contain Korean and alphanumeric characters; however, using special characters is prohibited. Furthermore, guild names cannot start with a number. Using spaces is allowed, but consecutive spaces are prohibited. Starting or ending the guild name with a space is also prohibited.
- The number of guild goods types can only be defined at the point of creation; increasing or decreasing it is not available afterward.
- The desired information can be stored in the metadata, and it is possible to add/modify meta information through ModifyGuild(param).
- The country code can be added/modified by the guild master using UpdateCountryCode after the guild is created.
- For more information on CountryCode, refer to this link.
- Only countries that exist in the users' country code can be registered as the guild's country code. Guild country codes that are not a part of the users' country code pool are not displayed on the console.
Example
Synchronous
// If the metadata is missing
Backend.Guild.CreateGuildV3("guildName", 2);
Backend.Guild.CreateGuildV3("guildName", 2, CountryCode.SouthKorea);
// Enter the metadata you want in the param(optional)
Param param = new Param();
param.Add("level",0);
param.Add("buf",1);
Backend.Guild.CreateGuildV3("guildName", 2, param);
Backend.Guild.CreateGuildV3("guildName", 2, param, CountryCode.SouthKorea);
Asynchronous
// If the metadata is missing
Backend.Guild.CreateGuildV3("guildName", 2, (callback) =>
{
// Post-process
});
Backend.Guild.CreateGuildV3("guildName", 2, CountryCode.SouthKorea, (callback) =>
{
// Post-process
});
// If the metadata exists
Param param = new Param();
param.Add("level",0);
param.Add("buf",1);
Backend.Guild.CreateGuildV3("guildName", 2, param, (callback) =>
{
// Post-process
});
Backend.Guild.CreateGuildV3("guildName", 2, param, CountryCode.SouthKorea, (callback) =>
{
// Post-process
});
SendQueue
//If the metadata is missing
SendQueue.Enqueue(Backend.Guild.CreateGuildV3("guildName", 2, (callback) =>
{
// Post-process
});
Backend.Guild.CreateGuildV3("guildName", 2, CountryCode.SouthKorea, (callback) =>
{
// Post-process
});
//If the metadata exists
Param param = new Param();
param.Add("level",0);
param.Add("buf",1);
Backend.Guild.CreateGuildV3("guildName", 2, param, (callback) =>
{
// Post-process
});
Backend.Guild.CreateGuildV3("guildName", 2, param, CountryCode.SouthKorea, (callback) =>
{
// Post-process
});
Return cases
Success cases
When created successfully
statusCode : 204
Error cases
When the goodsCount is more than 10
statusCode : 400
errorCode : BadParameterException
When the goodsCount is 0 or lower
statusCode : 400
errorCode : UndefinedParameterException
When a user who does not meet the console setting conditions tries to create a guild
statusCode : 403
errorCode : ForbiddenError
When there is an attempt to create a guild with a duplicated guild name
statusCode : 409
errorCode : DuplicatedParameterException
When the guild name conditions are not met
statusCode : 412
errorCode : PreconditionFailed
When the user is already in a guild
statusCode : 412
errorCode : PreconditionFailed