formatted code

This commit is contained in:
Lennart Kampshoff
2019-05-05 17:59:11 +02:00
parent a34c03eae9
commit a88d5256a8
54 changed files with 290 additions and 210 deletions

View File

@@ -49,7 +49,7 @@ namespace ReallifeGamemode.Server.Entities
[ForeignKey("Ban")]
public int? BanId { get; set; }
public Ban Ban { get; set; }
public int? FactionId { get; set; }
public Faction Faction { get; set; }
@@ -60,6 +60,8 @@ namespace ReallifeGamemode.Server.Entities
public Group Group { get; set; }
public GroupRank GroupRank { get; set; }
public FactionRank GetFactionRank()
{
using (var dbContext = new DatabaseContext())
@@ -97,7 +99,7 @@ namespace ReallifeGamemode.Server.Entities
banUser = new Ban { UserId = this.Id, Reason = reason, BannedBy = admin.Name, Applied = unixTimestamp, UntilDateTime = unixTimestamp };
this.Client?.Kick();
mins--;
}
else
@@ -128,7 +130,7 @@ namespace ReallifeGamemode.Server.Entities
public List<UserItem> GetItems()
{
using(var dbContext = new DatabaseContext())
using (var dbContext = new DatabaseContext())
{
return dbContext.UserItems.ToList().FindAll(u => u.UserId == this.Id);
}