From abd8576a9ba30ffa4a1d2bdb2e3b306327476815 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Fri, 2 Apr 2021 18:38:25 +0200 Subject: [PATCH] Fix GW-Verteidigung gibt kein Geld --- ReallifeGamemode.Server/Gangwar/Turf.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index bf6dd5cc..97850e87 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -288,9 +288,9 @@ namespace ReallifeGamemode.Server.Gangwar dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Name == getOwner()).First().BankAccount.Balance += 10000; Turfs turf = dbContext.Turfs.Where(t => t.Id == getId()).FirstOrDefault(); turf.Owner = this.Owner; - turf.FactionId = dbContext.Factions.Where(f => f.Name == this.Owner).FirstOrDefault().Id; - dbContext.SaveChanges(); + turf.FactionId = dbContext.Factions.Where(f => f.Name == this.Owner).FirstOrDefault().Id; } + dbContext.SaveChanges(); } this.Attacker = null; foreach (var c in playerInGangwar)