Language File Updates

Fixed error when deleting from list while iterating
This commit is contained in:
Brett Hewitson 2021-12-23 16:06:44 +10:00
parent 4672281a52
commit a2e1afb4e0
12 changed files with 506 additions and 85 deletions

View file

@ -450,7 +450,7 @@ namespace ServerManagerTool.Lib
return new List<string>();
// remove any players that do not have a player record.
var droppedPlayers = this._players.Values.Where(p => dataContainer.Players.FirstOrDefault(pd => pd.PlayerId.Equals(p.PlayerId, StringComparison.OrdinalIgnoreCase)) == null);
var droppedPlayers = this._players.Values.Where(p => dataContainer.Players.FirstOrDefault(pd => pd.PlayerId.Equals(p.PlayerId, StringComparison.OrdinalIgnoreCase)) == null).ToArray();
foreach (var droppedPlayer in droppedPlayers)
{
_players.TryRemove(droppedPlayer.PlayerId, out PlayerInfo player);