some changes

This commit is contained in:
michael.reiswich
2021-05-21 20:57:55 +02:00
parent a5b6f3215e
commit a1234a7fcf
7 changed files with 27 additions and 12 deletions

View File

@@ -105,6 +105,11 @@ namespace ReallifeGamemode.Server.Finance
healthInsurance = 0;
}
if (healthInsurance > 150)
{
healthInsurance = 150;
}
int? factionMoney = null;
if (user.Faction != null && user.FactionRank != null)
@@ -185,8 +190,8 @@ namespace ReallifeGamemode.Server.Finance
.ThenInclude(h => h.BankAccount)
.Where(hR => hR.UserId == u.Id);
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += (int)(paycheck.HealthInsurance * 0.1);
logger.LogInformation("Medic faction got a health insurance payment of {0} dollars from player {1}", paycheck.HealthInsurance * 0.1, client.Name);
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += (int)(paycheck.HealthInsurance);
logger.LogInformation("Medic faction got a health insurance payment of {0} dollars from player {1}", paycheck.HealthInsurance, client.Name);
if (rentals.Any())
{
foreach (var rental in rentals)