public void LeaveGuild(Character character)
 {
     CharacterGuildRecord.GetCharacterGuild(character.Id).RemoveElement();
     character.HumanOptions.RemoveAll(x => x is HumanOptionGuild);
     character.Client.Send(new GuildLeftMessage());
     AllianceRecord.OnCharacterLeftAlliance(character);
     character.RefreshOnMapInstance();
     character.ForgetEmote(GuildProvider.EMOTE_ID);
 }
        public static void LeaveAlliance(int guildId)
        {
            GuildAllianceRecord         AllianceMember = GuildAllianceRecord.GuildsAlliances.Find(x => x.GuildId == guildId);
            List <CharacterGuildRecord> guildMembers   = CharacterGuildRecord.CharactersGuilds.FindAll(x => x.GuildId == guildId);

            foreach (CharacterGuildRecord guildMember in guildMembers)
            {
                Character record = WorldServer.Instance.GetOnlineClient(guildMember.CharacterId).Character;
                AllianceRecord.OnCharacterLeftAlliance(record);
            }
            AllianceMember.RemoveElement();
        }