Added /invite, removed some unneccessary debug lines
This commit is contained in:
@@ -15,7 +15,6 @@ namespace reallife_gamemode.Server.Events
|
||||
[RemoteEvent("OnFactionRanksEdit")]
|
||||
public void OnFactionRanksEdit(Client player, string jsonData)
|
||||
{
|
||||
Console.WriteLine(jsonData);
|
||||
FactionRankHelper helper = JsonConvert.DeserializeObject<FactionRankHelper>(jsonData);
|
||||
using(var context = new DatabaseContext())
|
||||
{
|
||||
@@ -38,7 +37,6 @@ namespace reallife_gamemode.Server.Events
|
||||
Rank newRank = ranks[i];
|
||||
if(newRank.Id == 0)
|
||||
{
|
||||
Console.WriteLine("Neuer Rang: " + newRank.Name);
|
||||
context.FactionRanks.Add(new FactionRank
|
||||
{
|
||||
RankName = newRank.Name,
|
||||
@@ -49,7 +47,6 @@ namespace reallife_gamemode.Server.Events
|
||||
else
|
||||
{
|
||||
FactionRank factionRank = factionRanks.Find(r => r.Id == newRank.Id);
|
||||
Console.WriteLine($"Edited Rang: {factionRank.RankName} -> {newRank.Name}");
|
||||
factionRank.RankName = newRank.Name;
|
||||
factionRank.Order = length - i;
|
||||
found.Add(factionRank.Id);
|
||||
@@ -60,7 +57,6 @@ namespace reallife_gamemode.Server.Events
|
||||
{
|
||||
if(!found.Contains(factionRanks[i].Id))
|
||||
{
|
||||
Console.WriteLine("removed: " + factionRanks[i].RankName);
|
||||
context.FactionRanks.Remove(factionRanks[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user