Fix Revive not setting DB
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user