Fix ShopVehicles, Upodate /goto

This commit is contained in:
VegaZ
2018-10-15 19:03:45 +02:00
parent a7a9de7162
commit 93f4077cb8
2 changed files with 14 additions and 2 deletions

View File

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