/// <summary>
        /// Whether this the supplied arguments match the specified target criteria.
        /// </summary>
        public bool CheckArgs(Command <RealmServerCmdArgs> cmd)
        {
            if (!(cmd is RealmServerCommand))
            {
                return(true);
            }
            RealmServerCommand realmServerCommand = (RealmServerCommand)cmd;
            Unit             target      = this.Target;
            ObjectTypeCustom targetTypes = realmServerCommand.TargetTypes;

            if (realmServerCommand.RequiresCharacter && this.m_chr == null)
            {
                return(false);
            }
            if (targetTypes == ObjectTypeCustom.None)
            {
                return(true);
            }
            if (target != null)
            {
                return(targetTypes.HasAnyFlag(target.CustomType));
            }
            return(false);
        }
Exemple #2
0
 public static bool HasAnyFlag(this ObjectTypeCustom flags, ObjectTypeCustom otherFlags)
 {
     return((flags & otherFlags) != ObjectTypeCustom.None);
 }
Exemple #3
0
		public static bool HasAnyFlag(this ObjectTypeCustom flags, ObjectTypeCustom otherFlags)
		{
			return (flags & otherFlags) != 0;
		}