diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index 4d760f2c..c2fbe406 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -323,11 +323,7 @@ namespace ReallifeGamemode.Server.Commands deadPlayerUser.Handmoney = 0; deadPlayerUser.BankAccount.Balance -= bankMoney; } - - dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += Medic.ReviveIncome; - - dbContext.SaveChanges(); - + player.PlayAnimation("amb@medic@standing@kneel@enter", "enter", 0); deadPlayer.TriggerEvent("onPlayerRevived"); @@ -335,7 +331,9 @@ namespace ReallifeGamemode.Server.Commands deadPlayer.SendNotification($"Du wurdest von ~y~{player.Name}~s~ für ~g~{100.ToMoneyString()} ~s~wiederbelebt."); player.SendNotification($"Du hast ~y~{deadPlayer.Name}~s~ wiederbelebt und ~g~{Medic.ReviveIncome}$ ~s~für die Fraktion verdient."); deadPlayer.SetData("isDead", false); - + + dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += Medic.ReviveIncome; + User u; u = deadPlayer.GetUser(dbContext); u.Dead = false;