diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index 815e95cf..13ef1e24 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -174,8 +174,8 @@ namespace ReallifeGamemode.Server.Gangwar { if (getOwner() == FactionName) { - Client[] owners = NAPI.Pools.GetAllPlayers().Where(c => c.GetUser().Faction.Name == this.Owner).ToArray(); - Client[] attackers = NAPI.Pools.GetAllPlayers().Where(c => c.GetUser().Faction.Name == this.Attacker).ToArray(); + Client[] owners = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Owner).ToArray(); + Client[] attackers = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Attacker).ToArray(); foreach (var o in owners) { o.TriggerEvent("CLIENT:win"); @@ -194,8 +194,8 @@ namespace ReallifeGamemode.Server.Gangwar } ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte das Gebiet ~r~" + getName() + "~w~ nicht verteidigen.", dbContext.Factions.Where(f => f.Name == getOwner()).FirstOrDefault()); - Client[] owners = NAPI.Pools.GetAllPlayers().Where(c => c.GetUser().Faction.Name == this.Owner).ToArray(); - Client[] attackers = NAPI.Pools.GetAllPlayers().Where(c => c.GetUser().Faction.Name == this.Attacker).ToArray(); + Client[] owners = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Owner).ToArray(); + Client[] attackers = NAPI.Pools.GetAllPlayers().Where(c => c.IsLoggedIn() && c.GetUser().Faction.Name == this.Attacker).ToArray(); foreach (var o in owners) { o.TriggerEvent("CLIENT:loose");