public static Civilian GetCivilianByName(string first, string last) { return(Civs.FirstOrDefault(item => string.Equals(item.First, first, StringComparison.CurrentCultureIgnoreCase) && string.Equals(item.Last, last, StringComparison.CurrentCultureIgnoreCase))); // Finding the first civ that has that name }
public static Civilian GetCivilian(string pHandle) { return(Civs.FirstOrDefault(item => GetPlayerByIp(item.SourceIP)?.Handle == pHandle)); // Finding the first civ that has that handle }