Use dictionary and hashset for admin log entities and players respectively

Add test for duplicate player ids in an admin log not throwing
This commit is contained in:
DrSmugleaf
2021-12-26 00:50:10 +01:00
parent 82d9c38c96
commit 0ca8c705ab
5 changed files with 65 additions and 25 deletions

View File

@@ -243,7 +243,7 @@ public partial class AdminLogSystem : SharedAdminLogSystem
}
}
private async void Add(LogType type, LogImpact impact, string message, JsonDocument json, List<Guid> players, List<(int id, string? name)> entities)
private async void Add(LogType type, LogImpact impact, string message, JsonDocument json, HashSet<Guid> players, Dictionary<int, string?> entities)
{
var logId = NextLogId;
var date = DateTime.UtcNow;