This commit is contained in:
Siga
2020-04-04 19:44:01 +02:00
parent 46fac4d558
commit 6f8de7553e
2 changed files with 9 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ using ReallifeGamemode.Server.Services;
using ReallifeGamemode.Database.Models;
using ReallifeGamemode.Server.Core.Managers;
using ReallifeGamemode.Server.Extensions;
using ReallifeGamemode.Database.Entities;
namespace ReallifeGamemode.Server.Job
{
@@ -165,6 +166,8 @@ namespace ReallifeGamemode.Server.Job
private void SrvEvent_PlayerDc(Player player)
{
if (!player.IsLoggedIn() || !GetPlayerInJob().Contains(player)) return;
User u = player.GetUser();
if (u.JobId != this.Id) return;
foreach (var data in muellmanData)
{
@@ -187,6 +190,8 @@ namespace ReallifeGamemode.Server.Job
private void SrvEvent_PlayerDeath(Player player)
{
if (!player.IsLoggedIn() || !GetPlayerInJob().Contains(player)) return;
User u = player.GetUser();
if (u.JobId != this.Id) return;
foreach (var data in muellmanData)
{
@@ -229,6 +234,8 @@ namespace ReallifeGamemode.Server.Job
{
Player target;
if (!player.IsLoggedIn() || !GetPlayerInJob().Contains(player)) return;
User u = player.GetUser();
if (u.JobId != this.Id) return;
if (vehicle.Model == (uint)Types.VehicleModel.Trash || vehicle.Model == (uint)Types.VehicleModel.Trash2)
{

View File

@@ -103,7 +103,6 @@ namespace ReallifeGamemode.Server.Job
public static void UpdateFare()
{
Console.WriteLine($"{GetPlayerInJob().Count}");
foreach (var player in GetPlayerInJob())
{
User u = player.GetUser();