frak lohn dynamisch (3000 / anzahl ränge) * rang
This commit is contained in:
@@ -85,12 +85,17 @@ namespace ReallifeGamemode.Server.Finance
|
|||||||
|
|
||||||
if (user.Faction != null && user.FactionRank != null)
|
if (user.Faction != null && user.FactionRank != null)
|
||||||
{
|
{
|
||||||
int factioWage = user.FactionRank.Order * 300;
|
using var dbContext = new DatabaseContext();
|
||||||
|
int factionRankCount = dbContext.FactionRanks.Where(r => r.FactionId == user.FactionId).Count();
|
||||||
|
|
||||||
|
int factionWage = (3000 / factionRankCount) * user.FactionRank.Order;
|
||||||
|
|
||||||
if (wage > 2500)
|
if (wage > 2500)
|
||||||
factioWage /= 2;
|
{
|
||||||
else
|
factionWage /= 2;
|
||||||
factionMoney = factioWage;
|
}
|
||||||
|
|
||||||
|
factionMoney = factionWage;
|
||||||
}
|
}
|
||||||
int otheramount = user.otheramount;
|
int otheramount = user.otheramount;
|
||||||
int amount = wage - (int)(wage * financialInterest) - vehicleTaxation - (int)propertyTax + (int)financialHelp - rentalFees - healthInsurance + (factionMoney ?? 0) + otheramount;
|
int amount = wage - (int)(wage * financialInterest) - vehicleTaxation - (int)propertyTax + (int)financialHelp - rentalFees - healthInsurance + (factionMoney ?? 0) + otheramount;
|
||||||
|
|||||||
Reference in New Issue
Block a user