diff --git a/Glamourer/Designs/RevertableDesigns.cs b/Glamourer/Designs/RevertableDesigns.cs index e9b7505..14eab86 100644 --- a/Glamourer/Designs/RevertableDesigns.cs +++ b/Glamourer/Designs/RevertableDesigns.cs @@ -1,11 +1,12 @@ -using System.Collections.Generic; +using System.Collections.Concurrent; +using System.Collections.Generic; using Dalamud.Game.ClientState.Objects.Types; namespace Glamourer.Designs { public class RevertableDesigns { - public readonly Dictionary Saves = new(); + public readonly ConcurrentDictionary Saves = new(); public bool Add(Character actor) { @@ -24,7 +25,7 @@ namespace Glamourer.Designs if (!Saves.ContainsKey(actorName)) return false; - Saves.Remove(actorName); + Saves.Remove(actorName, out _); return true; } @@ -34,7 +35,7 @@ namespace Glamourer.Designs return false; save.Apply(actor); - Saves.Remove(actor.Name.ToString()); + Saves.Remove(actor.Name.ToString(), out _); return true; } }