Add duty System and Duty Cloth

This commit is contained in:
VegaZ
2018-11-14 19:00:31 +01:00
parent f02ad2b93d
commit b4df50215d
17 changed files with 371 additions and 45 deletions

View File

@@ -42,6 +42,21 @@ namespace reallife_gamemode.Server.Extensions
}
}
public static Character GetCharacter(this User user, DatabaseContext context = null)
{
if (context == null)
{
using (context = new DatabaseContext())
{
return context.Characters.FirstOrDefault(u => u.UserId == user.Id);
}
}
else
{
return context.Characters.FirstOrDefault(u => u.UserId == user.Id);
}
}
/// <summary>
/// Gibt zurück, ob ein Client eingeloggt ist
/// </summary>