Removed User.GetFaction()
This commit is contained in:
@@ -87,7 +87,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
//LSFD
|
||||
case 2:
|
||||
player.TriggerEvent("showFactionInteraction", user.FactionId, player.GetData("duty"), user.GetFaction().Name, user.FactionLeader, Medic.ReviveTasks.Count.ToString(), Medic.HealTasks.Count.ToString(), Medic.FireTasks.Count.ToString());
|
||||
player.TriggerEvent("showFactionInteraction", user.FactionId, player.GetData("duty"), user.Faction.Name, user.FactionLeader, Medic.ReviveTasks.Count.ToString(), Medic.HealTasks.Count.ToString(), Medic.FireTasks.Count.ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -115,7 +115,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
int medicCount = 0;
|
||||
foreach(Client c in NAPI.Pools.GetAllPlayers())
|
||||
{
|
||||
if((c.GetUser()?.GetFaction().Id ?? 0) == 2)
|
||||
if((c.GetUser()?.Faction.Id ?? 0) == 2)
|
||||
{
|
||||
medicCount++;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
player.NametagColor = nameTagColor;
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
List<CharacterCloth> clothes = context.CharacterClothes.ToList().FindAll(u => u.UserId == user.Id && u.Duty == true);
|
||||
List<CharacterCloth> clothes = context.CharacterClothes.Where(u => u.UserId == user.Id && u.Duty == true).ToList();
|
||||
|
||||
foreach(var cloth in clothes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user