From 9eac853a32766a222f463bdd0a651e577d5a7049 Mon Sep 17 00:00:00 2001 From: Lukas Moungos Date: Sat, 14 Dec 2019 17:02:12 +0100 Subject: [PATCH] fix --- ReallifeGamemode.Server/Gangwar/Turf.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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");