diff --git a/Import/Bootstrapper.dll b/Import/Bootstrapper.dll index ed6d5e94..98d8bf7f 100644 Binary files a/Import/Bootstrapper.dll and b/Import/Bootstrapper.dll differ diff --git a/Import/rage-sharp.dll b/Import/rage-sharp.dll index 586eddad..cf2cbe9a 100644 Binary files a/Import/rage-sharp.dll and b/Import/rage-sharp.dll differ diff --git a/ReallifeGamemode.Client/Interaction/interactionmenu.ts b/ReallifeGamemode.Client/Interaction/interactionmenu.ts index ed340470..041649b6 100644 --- a/ReallifeGamemode.Client/Interaction/interactionmenu.ts +++ b/ReallifeGamemode.Client/Interaction/interactionmenu.ts @@ -26,7 +26,7 @@ export default function (globalData: IGlobalData) { var groupItem = new UIMenuItem("Gruppe", "Verwalte deine Gruppe"); var paycheckItem = new UIMenuItem("Gehaltsscheck", "Schaue dir deinen Verdienst der letzten Stunde an"); - + var licenseItem = new UIMenuItem("Lizenzen", "Lizenzen Informationen"); var vehiclesItem = new UIMenuItem("Fahrzeuge", "Zeige deine Fahrzeuge an"); @@ -82,6 +82,12 @@ export default function (globalData: IGlobalData) { item.SetRightLabel("~g~+ $" + moneyFormat(p.financialHelp)); paycheckMenu.AddItem(item); + if (p.factionMoney) { + item = new UIMenuItem("Fraktionsgeld"); + item.SetRightLabel("~g~+ $" + moneyFormat(p.factionMoney)); + paycheckMenu.AddItem(item); + } + item = new UIMenuItem("Fahrzeugsteuer"); item.SetRightLabel("~r~- $" + moneyFormat(p.vehicleTaxation)); paycheckMenu.AddItem(item); @@ -106,8 +112,7 @@ export default function (globalData: IGlobalData) { menu.BindMenuToItem(paycheckMenu, paycheckItem); } - if (ticket_boolean == true) - { + if (ticket_boolean == true) { menu.AddItem(ticketItem); menu.BindMenuToItem(getTicketMenu(ticket_amount, menu), ticketItem); } diff --git a/ReallifeGamemode.Client/global.d.ts b/ReallifeGamemode.Client/global.d.ts index dc0525ca..13ba2478 100644 --- a/ReallifeGamemode.Client/global.d.ts +++ b/ReallifeGamemode.Client/global.d.ts @@ -35,6 +35,7 @@ declare type Paycheck = { amount: number; rentalFees: number; healthInsurance: number; + factionMoney: number; } declare type Licenses = { diff --git a/ReallifeGamemode.Server/Finance/Economy.cs b/ReallifeGamemode.Server/Finance/Economy.cs index 3df8ec42..676c21e8 100644 --- a/ReallifeGamemode.Server/Finance/Economy.cs +++ b/ReallifeGamemode.Server/Finance/Economy.cs @@ -81,9 +81,17 @@ namespace ReallifeGamemode.Server.Finance int healthInsurance = (int)(user.BankAccount.Balance * 0.001); - int amount = wage - (int)(wage * financialInterest) - vehicleTaxation - (int)propertyTax + (int)financialHelp - rentalFees - healthInsurance; - Paycheck paycheck = new Paycheck(financialHelp, financialInterest, vehicleTaxation, propertyTax, wage, amount, rentalFees, healthInsurance); + int? factionMoney = null; + + if (user.Faction != null && user.FactionRank != null) + { + factionMoney = user.FactionRank.Order * 1000; + } + + int amount = wage - (int)(wage * financialInterest) - vehicleTaxation - (int)propertyTax + (int)financialHelp - rentalFees - healthInsurance + (factionMoney ?? 0); + + Paycheck paycheck = new Paycheck(financialHelp, financialInterest, vehicleTaxation, propertyTax, wage, amount, rentalFees, healthInsurance, factionMoney); Paychecks[user.Id] = paycheck; ReleasePayDay(client, paycheck); } diff --git a/ReallifeGamemode.Server/Finance/Paycheck.cs b/ReallifeGamemode.Server/Finance/Paycheck.cs index d574e996..9a6059a0 100644 --- a/ReallifeGamemode.Server/Finance/Paycheck.cs +++ b/ReallifeGamemode.Server/Finance/Paycheck.cs @@ -37,7 +37,10 @@ namespace ReallifeGamemode.Server.Finance [JsonProperty("healthInsurance")] public int HealthInsurance { get; set; } = 0; - public Paycheck(float FinancialHelp, float FinancialInterest, int VehicleTaxation, float PropertyTaxation, int Wage, int Amount, int RentalFees, int HealthInsurance) + [JsonProperty("factionMoney")] + public int? FactionMoney { get; set; } = 0; + + public Paycheck(float FinancialHelp, float FinancialInterest, int VehicleTaxation, float PropertyTaxation, int Wage, int Amount, int RentalFees, int HealthInsurance, int? FactionMoney) { this.FinancialHelp = FinancialHelp; this.FinancialInterest = FinancialInterest; @@ -47,6 +50,7 @@ namespace ReallifeGamemode.Server.Finance this.Amount = Amount; this.RentalFees = RentalFees; this.HealthInsurance = HealthInsurance; + this.FactionMoney = FactionMoney; } } }