maybe fix Gangwar

This commit is contained in:
Michael
2020-07-30 19:31:46 +02:00
parent 8753c7a981
commit 6ab7ccc36f

View File

@@ -173,6 +173,7 @@ namespace ReallifeGamemode.Server.Gangwar
}
this.takeOver(this.Attacker);
this.Def_Score = 0;
return;
}
else if (this.Att_Score < this.Def_Score)
{
@@ -192,7 +193,6 @@ namespace ReallifeGamemode.Server.Gangwar
}
this.takeOver(this.Owner);
this.Def_Score = 0;
return;
}
}
@@ -297,7 +297,7 @@ namespace ReallifeGamemode.Server.Gangwar
List<Player> ownersInGangwar = context.Users.Include(u => u.Faction).Where(u => onlinePlayers.Contains(u.Name) && u.Faction.Name == getOwner()).Select(u => u.Player).ToList();
List<Player> attackersInGangwar = context.Users.Include(u => u.Faction).Where(u => onlinePlayers.Contains(u.Name) && u.Faction.Name == attacker).Select(u => u.Player).ToList();
if (ownersInGangwar.Count < 1 && attackersInGangwar.Count < 1)
if (ownersInGangwar.Count < 0 && attackersInGangwar.Count < 0)
{
List<Player> leaders = context.Users.Include(u => u.Faction).Where(u => onlinePlayers.Contains(u.Name) && u.Faction.Name == attacker && u.FactionLeader).Select(u => u.Player).ToList();
foreach (var l in leaders)