From 37cb9d0e30d2dec52d3d990d616bcc1e7dc7cf17 Mon Sep 17 00:00:00 2001 From: Lukas Moungos Date: Sun, 1 Dec 2019 19:06:50 +0100 Subject: [PATCH] fix --- ReallifeGamemode.Server/Gangwar/Turf.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index c4692673..cf867c43 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -59,7 +59,7 @@ namespace ReallifeGamemode.Server.Gangwar public string getOwner() { - return this.TurfName; + return this.Owner; } public string getAttacker() @@ -168,7 +168,7 @@ namespace ReallifeGamemode.Server.Gangwar } else if (getOwner() != FactionName) { - ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte das Gebiet ~r~" + getName() + "~w~ nicht verteidigen.", dbContext.Factions.Where(f => f.Name == getAttacker()).FirstOrDefault()); + ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte das Gebiet ~r~" + getName() + "~w~ nicht erobern.", dbContext.Factions.Where(f => f.Name == getAttacker()).FirstOrDefault()); this.Owner = FactionName; Turfs turf = dbContext.Turfs.Where(t => t.Id == getId()).FirstOrDefault(); turf.Owner = this.Owner; @@ -206,9 +206,6 @@ namespace ReallifeGamemode.Server.Gangwar Client[] usersInGangwar = NAPI.Pools.GetAllPlayers().Where(c => c.GetUser().Faction.Name == getOwner() || c.GetUser().Faction.Name == getAttacker()).ToArray(); foreach (var u in usersInGangwar) { - u.SendChatMessage(JsonConvert.SerializeObject(usersInGangwar)); - u.SendChatMessage(JsonConvert.SerializeObject(usersInGangwar.Length)); - u.SendChatMessage(JsonConvert.SerializeObject(u.Name)); u.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score); u.SetData("inGangWar", getId()); clientsInGangwar.Add(u);