public static void InvalidateTreeStructure() { TreeStructure.Clear(); foreach (var c in CircleNames) { var d = new Dictionary <Type, SpellInfo>(); foreach (var o in SpellsInfo.Where(o => Insensitive.StartsWith(o.Key.FullName, "Server.Spells." + c))) { d[o.Key] = o.Value; } TreeStructure[c] = d; } }
public static void InvalidateTreeStructure() { if (TreeStructure == null) { TreeStructure = new Dictionary <string, Dictionary <Type, SpellInfo> >(CircleNames.Length); } else { TreeStructure.Clear(); } CircleNames.ForEach( circle => { TreeStructure.AddOrReplace(circle, new Dictionary <Type, SpellInfo>()); SpellsInfo.Where( kvp => kvp.Key != null && kvp.Value != null && kvp.Key.FullName.StartsWith("Server.Spells." + circle)) .ForEach(kvp => TreeStructure[circle].Add(kvp.Key, kvp.Value)); }); }
public static SpellInfo GetSpellInfo(Type type) { return(type != null && SpellsInfo.ContainsKey(type) ? SpellsInfo[type] : null); }
public static SpellInfo GetSpellInfo(Type type) { return(SpellsInfo.GetValue(type)); }