public List <SimPersonality> GetClanMembership(SimDescription sim, bool includeLeadership) { List <SimPersonality> personalities = new List <SimPersonality>(); if (sim != null) { if (includeLeadership) { personalities.AddRange(GetClanLeadership(sim)); } SimData simData = GetData(sim); List <string> clans = new List <string>(simData.Clans); foreach (string clan in clans) { SimPersonality personality = GetPersonality(clan); if (personality == null) { simData.RemoveClan(clan); } else { personalities.Add(personality); } } } return(personalities); }