Merge branch 'hotfix/wt-medic' into develop

This commit is contained in:
hydrant
2021-04-12 20:22:14 +02:00
2 changed files with 8 additions and 1 deletions

View File

@@ -497,7 +497,7 @@ namespace ReallifeGamemode.Server.Events
List<string> stages = new List<string>();
foreach (var e in PositionManager.ElevatorPoints)
{
if (e.Position.DistanceTo2D(player.Position) <= 25 && e.Position.DistanceTo(player.Position) > 1.5)
if (e.Position.DistanceTo2D(player.Position) <= 30 && e.Position.DistanceTo(player.Position) > 1.5)
{
stages.Add(e.Stage);
}

View File

@@ -516,6 +516,13 @@ namespace ReallifeGamemode.Server.Managers
return;
}
var factionVehicleCount = dbContext.FactionVehicles.ToList().Where(v => v.Id == id && v.GetOwners().Contains(user.FactionId.Value)).Count();
if(factionVehicleCount <= 6)
{
ChatService.ErrorMessage(player, "Die Fraktion braucht mindestens 6 Fahrzeuge");
return;
}
var price = dbContext.ShopVehicles.Where(v => v.Model == factionVehicle.Model && v.Active).Select(s => new { s.Price }).FirstOrDefault();
if (price == null)
{