Fix Count Duty Medics
This commit is contained in:
@@ -4,6 +4,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Factions.Medic;
|
||||
using ReallifeGamemode.Server.Managers;
|
||||
|
||||
namespace ReallifeGamemode.Server.Util
|
||||
@@ -44,15 +45,7 @@ namespace ReallifeGamemode.Server.Util
|
||||
Events.UpdateCharacterCloth.LoadCharacterDefaults(player);
|
||||
|
||||
player.TriggerEvent("toggleDutyMode", false);
|
||||
int medicCount = 0;
|
||||
foreach (Player c in NAPI.Pools.GetAllPlayers())
|
||||
{
|
||||
if ((c.GetUser()?.Faction?.Id ?? 0) == 2)
|
||||
{
|
||||
medicCount++;
|
||||
}
|
||||
}
|
||||
NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", medicCount);
|
||||
Medic.UpdateDutyMedics(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user