Fix ShopVehicles, Upodate /goto

This commit is contained in:
VegaZ
2018-10-15 19:03:45 +02:00
parent 1fe11b642e
commit 834d60b6da
2 changed files with 14 additions and 2 deletions

View File

@@ -659,9 +659,21 @@ namespace reallife_gamemode.Server.Commands
return; return;
} }
else else
{
using (var dbContext = new DatabaseContext())
{
Entities.GotoPoint p = dbContext.GotoPoints.FirstOrDefault(x => x.Description == description);
if(p == null)
{ {
SaveManager.SaveGotoPoint(player, description); SaveManager.SaveGotoPoint(player, description);
} }
else
{
player.SendChatMessage("Einen Goto-Punkt mit dieser Bezeichnung gibt es schon!");
}
}
}
break; break;
case "Vehicle": case "Vehicle":

View File

@@ -21,7 +21,7 @@ namespace reallife_gamemode.Server.Entities
public int Id { get; set; } public int Id { get; set; }
[ForeignKey("Shop")] [ForeignKey("Shop")]
public int ShopId { get; set; } public int? ShopId { get; set; }
public Shop Shop { get; set; } public Shop Shop { get; set; }
public VehicleHash Model { get; set; } public VehicleHash Model { get; set; }