Add more types of moneytransfer

This commit is contained in:
VegaZ
2018-10-09 21:41:52 +02:00
parent e11d453e27
commit e0bc6ef9aa
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;