示例#1
0
        public static bool Has(this Spell spell, SpellAttributesEx toCheck)
        {
            if (spell == null)
                return false;

            return (spell.AttributesEx & toCheck) == toCheck;
        }
示例#2
0
        public static void FindAllWithAttributeEx(SpellAttributesEx 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.AttributesEx);
                Console.WriteLine();
            }

            Console.WriteLine("{0} spells have Attribute {1}", query.Count(), attr);
            Console.WriteLine();
        }
		public static bool HasAnyFlag(this SpellAttributesEx flags, SpellAttributesEx otherFlags)
		{
			return (flags & otherFlags) != 0;
		}
 public static bool HasAnyFlag(this SpellAttributesEx flags, SpellAttributesEx otherFlags)
 {
     return((flags & otherFlags) != SpellAttributesEx.None);
 }