onlineliste shows newbieStatus + newbiePlayedMinutesThreshold in GlobalHelper

This commit is contained in:
Luke
2021-05-08 00:09:02 +02:00
parent 6e21e3c5d2
commit 31a777585b
11 changed files with 55 additions and 25 deletions

View File

@@ -769,12 +769,12 @@ namespace ReallifeGamemode.Server.Events
return new
{
Id = p.Handle.Value,
p.Name,
p.Ping,
FactionName = u?.Faction?.Name ?? "Zivilist",
FactionId = u?.FactionId ?? 0
Name = p.Name + (u.PlayedMinutes <= GlobalHelper.newbiePlayedMinutesThreshold ? "<span class=\"player__status\">Neuling</span>" : ""),
FactionId = u?.FactionId ?? 0,
p.Ping
};
});
player.TriggerEvent("showPlayerlist", JsonConvert.SerializeObject(listPlayers));
}