Change Wages on Pilot, Bus and RefuseCollector

This commit is contained in:
2021-04-22 21:13:15 +02:00
parent 9e6df00f24
commit 253d982883
3 changed files with 16 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ namespace ReallifeGamemode.Server.Job
public const int WAGE_BEGINNER = 400;
public const int WAGE_INTERMEDIATE = 600;
public const int WAGE_PROFESSIOAL = 900;
public const int WAGE_PROFESSIOAL = 650;
public const string BEGINNER = "Anfänger";
public const string INTERMEDIATE = "Fortgeschrittener";
@@ -617,11 +617,18 @@ namespace ReallifeGamemode.Server.Job
return;
if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_BEGINNER)
{
payWage(player, BusDriverJob.WAGE_BEGINNER / BusDriverJob.playerRouteCurrent[player.Name].Count);
}
else if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_INTERMEDIATE)
{
payWage(player, BusDriverJob.WAGE_INTERMEDIATE / BusDriverJob.playerRouteCurrent[player.Name].Count);
payWage(player, 0);
}
else if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_PROFESSIONAL)
{
payWage(player, BusDriverJob.WAGE_PROFESSIOAL / BusDriverJob.playerRouteCurrent[player.Name].Count);
}
}
public static void payWage(Player player, int wage)

View File

@@ -25,7 +25,7 @@ namespace ReallifeGamemode.Server.Job
public const string PROFESSIONAL = "Profi";
public const int WAGE_BEGINNER = 300;
public const int WAGE_INTERMEDIATE = 750;
public const int WAGE_INTERMEDIATE = 900;
public const uint VEHICLE_BEGINNER = (uint)VehicleHash.Cuban800;
public const uint VEHICLE_INTERMEDIATE = (uint)VehicleHash.Velum2;
@@ -345,7 +345,7 @@ namespace ReallifeGamemode.Server.Job
payWage(player, PilotJob.WAGE_INTERMEDIATE / PilotJob.playerRouteCurrent[player.Name].Count);
}
private void payWage(Player player, int wage)
public void payWage(Player player, int wage)
{
using var dbContext = new DatabaseContext();
User user = player.GetUser(dbContext);

View File

@@ -21,6 +21,8 @@ namespace ReallifeGamemode.Server.Job
public override bool NeedVehicleToStart => false;
private const int MAX_BAG = 40;
private const int WAGE = 80;
private const int BONUS = 10;
public RefuseCollectorJob()
{
@@ -271,12 +273,12 @@ namespace ReallifeGamemode.Server.Job
{
if (target != null)
{
user1.Wage += 25;
user2.Wage += 25;
user1.Wage += WAGE / 2;
user2.Wage += WAGE / 2;
}
else
{
user1.Wage += 50;
user1.Wage += WAGE;
}
dbContext.SaveChanges();
}
@@ -302,7 +304,7 @@ namespace ReallifeGamemode.Server.Job
User user1 = player.GetUser(dbContext);
User user2 = target.GetUser(dbContext);
int bonus = 5 * data.getTrashCount();
int bonus = BONUS * data.getTrashCount();
if (target != null)
{