Add /goto and /save goto

This commit is contained in:
VegaZ
2018-10-15 18:29:16 +02:00
parent dece35bd1f
commit 5cb86693b0
7 changed files with 84 additions and 81 deletions

View File

@@ -124,6 +124,23 @@ namespace reallife_gamemode.Server.Events
saveData.SaveChanges();
}
}
public static void SaveGotoPoint(Client player, string description)
{
using (var saveData = new Model.DatabaseContext())
{
var dataSet = new Entities.GotoPoint
{
Description = description,
X = player.Position.X,
Y = player.Position.Y,
Z = player.Position.Z,
Active = true
};
saveData.GotoPoints.Add(dataSet);
saveData.SaveChanges();
}
}
public static void SaveAllOnSave()
{
using (var saveAll = new Model.DatabaseContext())