Change Wages on Pilot, Bus and RefuseCollector
This commit is contained in:
@@ -35,7 +35,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
|
|
||||||
public const int WAGE_BEGINNER = 400;
|
public const int WAGE_BEGINNER = 400;
|
||||||
public const int WAGE_INTERMEDIATE = 600;
|
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 BEGINNER = "Anfänger";
|
||||||
public const string INTERMEDIATE = "Fortgeschrittener";
|
public const string INTERMEDIATE = "Fortgeschrittener";
|
||||||
@@ -617,11 +617,18 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_BEGINNER)
|
if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_BEGINNER)
|
||||||
|
{
|
||||||
payWage(player, BusDriverJob.WAGE_BEGINNER / BusDriverJob.playerRouteCurrent[player.Name].Count);
|
payWage(player, BusDriverJob.WAGE_BEGINNER / BusDriverJob.playerRouteCurrent[player.Name].Count);
|
||||||
|
}
|
||||||
else if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_INTERMEDIATE)
|
else if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_INTERMEDIATE)
|
||||||
|
{
|
||||||
payWage(player, BusDriverJob.WAGE_INTERMEDIATE / BusDriverJob.playerRouteCurrent[player.Name].Count);
|
payWage(player, BusDriverJob.WAGE_INTERMEDIATE / BusDriverJob.playerRouteCurrent[player.Name].Count);
|
||||||
|
payWage(player, 0);
|
||||||
|
}
|
||||||
else if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_PROFESSIONAL)
|
else if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_PROFESSIONAL)
|
||||||
|
{
|
||||||
payWage(player, BusDriverJob.WAGE_PROFESSIOAL / BusDriverJob.playerRouteCurrent[player.Name].Count);
|
payWage(player, BusDriverJob.WAGE_PROFESSIOAL / BusDriverJob.playerRouteCurrent[player.Name].Count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void payWage(Player player, int wage)
|
public static void payWage(Player player, int wage)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
public const string PROFESSIONAL = "Profi";
|
public const string PROFESSIONAL = "Profi";
|
||||||
|
|
||||||
public const int WAGE_BEGINNER = 300;
|
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_BEGINNER = (uint)VehicleHash.Cuban800;
|
||||||
public const uint VEHICLE_INTERMEDIATE = (uint)VehicleHash.Velum2;
|
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);
|
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();
|
using var dbContext = new DatabaseContext();
|
||||||
User user = player.GetUser(dbContext);
|
User user = player.GetUser(dbContext);
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
public override bool NeedVehicleToStart => false;
|
public override bool NeedVehicleToStart => false;
|
||||||
|
|
||||||
private const int MAX_BAG = 40;
|
private const int MAX_BAG = 40;
|
||||||
|
private const int WAGE = 80;
|
||||||
|
private const int BONUS = 10;
|
||||||
|
|
||||||
public RefuseCollectorJob()
|
public RefuseCollectorJob()
|
||||||
{
|
{
|
||||||
@@ -271,12 +273,12 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
{
|
{
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
user1.Wage += 25;
|
user1.Wage += WAGE / 2;
|
||||||
user2.Wage += 25;
|
user2.Wage += WAGE / 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
user1.Wage += 50;
|
user1.Wage += WAGE;
|
||||||
}
|
}
|
||||||
dbContext.SaveChanges();
|
dbContext.SaveChanges();
|
||||||
}
|
}
|
||||||
@@ -302,7 +304,7 @@ namespace ReallifeGamemode.Server.Job
|
|||||||
User user1 = player.GetUser(dbContext);
|
User user1 = player.GetUser(dbContext);
|
||||||
User user2 = target.GetUser(dbContext);
|
User user2 = target.GetUser(dbContext);
|
||||||
|
|
||||||
int bonus = 5 * data.getTrashCount();
|
int bonus = BONUS * data.getTrashCount();
|
||||||
|
|
||||||
if (target != null)
|
if (target != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user