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

@@ -15,7 +15,7 @@ namespace ReallifeGamemode.Server.Events
public void OnFactionRanksEdit(Client player, string jsonData)
{
FactionRankHelper helper = JsonConvert.DeserializeObject<FactionRankHelper>(jsonData);
using(var context = new DatabaseContext())
using (var context = new DatabaseContext())
{
Entities.Faction f = context.Factions.FirstOrDefault(x => x.Id == helper.FactionId);
if (f == null)
@@ -31,10 +31,10 @@ namespace ReallifeGamemode.Server.Events
List<int> found = new List<int>();
for(int i = 0; i < ranks.Count; i++)
for (int i = 0; i < ranks.Count; i++)
{
Rank newRank = ranks[i];
if(newRank.Id == 0)
if (newRank.Id == 0)
{
context.FactionRanks.Add(new FactionRank
{
@@ -52,9 +52,9 @@ namespace ReallifeGamemode.Server.Events
}
}
for(int i = 0; i < factionRanks.Count; i++)
for (int i = 0; i < factionRanks.Count; i++)
{
if(!found.Contains(factionRanks[i].Id))
if (!found.Contains(factionRanks[i].Id))
{
context.FactionRanks.Remove(factionRanks[i]);
}