haus löschen mahlzeit moin

This commit is contained in:
hydrant
2020-05-03 16:32:42 +02:00
parent 145fb713a1
commit f441f3ad6e
2 changed files with 2 additions and 1 deletions

View File

@@ -192,6 +192,7 @@ namespace ReallifeGamemode.Server.Core.Managers
.Include(h => h.Owner) .Include(h => h.Owner)
.Include(h => h.BankAccount) .Include(h => h.BankAccount)
.Include(h => h.Rentals) .Include(h => h.Rentals)
.ToList()
.OrderBy(h => h.Position.DistanceTo(position)) .OrderBy(h => h.Position.DistanceTo(position))
.FirstOrDefault(); .FirstOrDefault();
} }

View File

@@ -37,7 +37,7 @@ namespace ReallifeGamemode.Server.Managers
if (c.IsInVehicle && c.VehicleSeat == 0) if (c.IsInVehicle && c.VehicleSeat == 0)
{ {
Vehicle v = c.Vehicle; Vehicle v = c.Vehicle;
if (v.GetServerVehicle() is FactionVehicle fV && fV.GetOwners().TrueForAll(fV => dbContext.Factions.Where(f => f.Id == fV).First().StateOwned)) if (v.GetServerVehicle() is FactionVehicle fV && fV.GetOwners().Any(fV => dbContext.Factions.Where(f => f.Id == fV && f.StateOwned).Any()))
{ {
return; return;
} }