/// <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); }
public static bool HasAnyFlag(this ObjectTypeCustom flags, ObjectTypeCustom otherFlags) { return((flags & otherFlags) != ObjectTypeCustom.None); }
public static bool HasAnyFlag(this ObjectTypeCustom flags, ObjectTypeCustom otherFlags) { return (flags & otherFlags) != 0; }