Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        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));
            });
        }
Exemplo n.º 3
0
 public static SpellInfo GetSpellInfo(Type type)
 {
     return(type != null && SpellsInfo.ContainsKey(type) ? SpellsInfo[type] : null);
 }
Exemplo n.º 4
0
 public static SpellInfo GetSpellInfo(Type type)
 {
     return(SpellsInfo.GetValue(type));
 }