Added items load

This commit is contained in:
Lennart Kampshoff
2018-10-27 13:18:22 +02:00
parent 39cb03b2ec
commit cf10c52ab0
4 changed files with 43 additions and 7 deletions

View File

@@ -130,6 +130,13 @@ namespace reallife_gamemode.Server.Entities
//TODO ***Admin Info: {ADMIN-NAME} hat {USER-NAME} entbannt.
}
public List<UserItem> GetItems()
{
using(var dbContext = new DatabaseContext())
{
return dbContext.UserItems.ToList().FindAll(u => u.UserId == this.Id);
}
}
public bool IsAdmin(AdminLevel level) => AdminLevel >= level;
}
}