private WoWUnit FindUnoccupiedVehicle() { return ((from wowUnit in FindUnitsFromIds(VehicleIds) where !wowUnit.Auras.Values.Any(aura => AuraIds_OccupiedVehicle.Contains(aura.SpellId)) && !IsInCompetition(wowUnit) && wowUnit.IsUntagged() orderby wowUnit.Distance select wowUnit) .FirstOrDefault()); }
private WoWUnit FindUnoccupiedVehicle() { return ((from wowObject in Query.FindMobsAndFactions(VehicleIds) let wowUnit = wowObject as WoWUnit where Query.IsViable(wowUnit) && !wowUnit.Auras.Values.Any(aura => AuraIds_OccupiedVehicle.Contains(aura.SpellId)) && !Query.IsInCompetition(wowUnit, NonCompeteDistance) && wowUnit.IsUntagged() orderby wowUnit.Distance select wowUnit) .FirstOrDefault()); }