Add more types of moneytransfer

This commit is contained in:
VegaZ
2018-10-09 21:41:52 +02:00
parent e3070913cb
commit 7d21f9c06e
6 changed files with 152 additions and 24 deletions

View File

@@ -34,22 +34,6 @@ namespace reallife_gamemode.Server.Extensions
}
}
public static UserBankAccount GetUserBankAccount(this User user, DatabaseContext context = null)
{
using (DatabaseContext dbContext = new DatabaseContext())
if (context == null)
{
using (context = new DatabaseContext())
{
return context.UserBankAccounts.FirstOrDefault(u => u.UserId == user.Id);
}
}
else
{
return context.UserBankAccounts.FirstOrDefault(u => u.UserId == user.Id);
}
}
public static bool IsLoggedIn(this Client player)
{
return player.HasData("isLoggedIn") ? player.GetData("isLoggedIn") : false;