コード例 #1
0
 public CharacterHumanOptionGuild(GuildInformations informations)
 {
     this.GuildId    = informations.guildId;
     this.GuildLevel = informations.guildLevel;
     this.GuildName  = informations.guildName;
     this.Emblem     = ContextGuildEmblem.New(informations.guildEmblem);
 }
コード例 #2
0
        public GuildCreationResultEnum CreateGuild(Character owner, string name, GuildEmblem emblem)
        {
            ContextGuildEmblem contextEmblem = ContextGuildEmblem.New(emblem);

            if (name.Contains('\'') || GuildRecord.Exist(name))
            {
                return(GuildCreationResultEnum.GUILD_CREATE_ERROR_NAME_ALREADY_EXISTS);
            }
            if (GuildRecord.Exist(contextEmblem))
            {
                return(GuildCreationResultEnum.GUILD_CREATE_ERROR_EMBLEM_ALREADY_EXISTS);
            }

            GuildRecord record = GuildRecord.New(name, contextEmblem, DEFAULT_MAX_TAX_COLLECTOR);

            record.AddElement();
            GuildInstance instance = new GuildInstance(record);

            instance.Join(owner, true);
            Guilds.Add(instance);
            return(GuildCreationResultEnum.GUILD_CREATE_OK);
        }