Ejemplo n.º 1
0
        public Character FindCharacter(int id, bool onlyOnline = true)
        {
            var chr = CharacterStore.Find(c => c.ID == id);

            if (onlyOnline && (chr?.IsOnline ?? false) == false)
            {
                return(null);
            }
            return(chr);
        }
Ejemplo n.º 2
0
        public Character FindCharacter(string name, bool onlyOnline = true)
        {
            var chr = CharacterStore.Find(x => x.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));

            if (onlyOnline && (chr?.IsOnline ?? false) == false)
            {
                return(null);
            }
            return(chr);
        }