Fix Revive not setting DB

This commit is contained in:
VegaZ
2021-04-05 15:07:13 +02:00
parent f1c76080ed
commit 9ac0a15d13

View File

@@ -324,10 +324,6 @@ namespace ReallifeGamemode.Server.Commands
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");
@@ -336,6 +332,8 @@ namespace ReallifeGamemode.Server.Commands
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;