Ejemplo n.º 1
0
        public static bool Has(this Spell spell, SpellAttributesExB toCheck)
        {
            if (spell == null)
                return false;

            return (spell.AttributesExB & toCheck) == toCheck;
        }
Ejemplo n.º 2
0
        public static bool Has(this Spell spell, SpellAttributesExB toCheck)
        {
            if (spell == null)
            {
                return(false);
            }

            return((spell.AttributesExB & toCheck) == toCheck);
        }
Ejemplo n.º 3
0
        public static void FindAllWithAttributeExB(SpellAttributesExB attr)
        {
            var query = from spell in SpellHandler.ById
                        where spell != null
                        where spell.Has(attr)
                        select spell;

            foreach (var spell in query)
            {
                Console.WriteLine("{0}: {1} - {2}", spell.Id, spell.Name, spell.AttributesExB);
                Console.WriteLine();
            }

            Console.WriteLine("{0} spells have Attribute {1}", query.Count(), attr);
            Console.WriteLine();
        }
Ejemplo n.º 4
0
        public static void FindAllWithAttributeExB(SpellAttributesExB attr)
        {
            var query = from spell in SpellHandler.ById
                        where spell != null
                        where spell.Has(attr)
                        select spell;

            foreach (var spell in query)
            {
                Console.WriteLine("{0}: {1} - {2}", spell.Id, spell.Name, spell.AttributesExB);
                Console.WriteLine();
            }

            Console.WriteLine("{0} spells have Attribute {1}", query.Count(), attr);
            Console.WriteLine();
        }