public void Remove(BasePlayer oldHenchman) { Henchman itemToRemove = henchmen.SingleOrDefault(o => o.Player == oldHenchman); if (itemToRemove != null) { henchmen.Remove(itemToRemove); } }
public bool TryResolveByPartialName(string partialName, out Henchman matchingHenchman) { matchingHenchman = henchmen.SingleOrDefault(o => o.Player.displayName.IndexOf(partialName, StringComparison.InvariantCultureIgnoreCase) != -1); return(matchingHenchman != null); }
public bool TryResovleByPlayer(BasePlayer player, out Henchman matchingHenchman) { matchingHenchman = henchmen.SingleOrDefault(o => o.Player == player); return(matchingHenchman != null); }