fix
This commit is contained in:
@@ -294,7 +294,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
public int getPlayerRouteInex(Player player)
|
||||
{
|
||||
if (!playerRouteCurrent.ContainsKey(player.Name))
|
||||
return -1;
|
||||
return 0;
|
||||
|
||||
List<Vector3> selectedRoute = playerRouteCurrent[player.Name];
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
private uint getPlayerJobVehicle(Player player)
|
||||
@@ -345,7 +345,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
if (type == PROFESSIONAL && user.BusSkill < SKILL_PROFESSIONAL) { player.TriggerEvent("MenuSelect:Error"); return; }
|
||||
|
||||
List<Vector3> selectedRoute = new List<Vector3>();
|
||||
int index = -1;
|
||||
int index = 0;
|
||||
|
||||
if (playerRouteCurrent.ContainsKey(player.Name))
|
||||
{
|
||||
@@ -403,7 +403,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
playerRouteCurrent.Remove(player.Name);
|
||||
playerRouteCurrent.Add(player.Name, selectedRoute);
|
||||
|
||||
if (selectedRoute.Count is 0)
|
||||
if (selectedRoute is null || selectedRoute.Count is 0)
|
||||
{
|
||||
Console.WriteLine($"[ERROR:BUSJOB] Player {player.Name} has empty route Vector3 List.");
|
||||
return;
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
selectedRoute = ROUTE_INTERMEDIATE.GetValueOrDefault(random.Next(1, ROUTE_INTERMEDIATE.Count));
|
||||
}
|
||||
|
||||
if (selectedRoute.Count is 0)
|
||||
if (selectedRoute is null || selectedRoute.Count is 0)
|
||||
{
|
||||
Console.WriteLine($"[ERROR:BUSJOB] Player {player.Name} has empty route Vector3 List.");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user