예제 #1
0
        ///<summary>
        ///Tracks Lists of Clusters for specific Conditions used during Ability Clustering.
        ///</summary>
        internal List <UnitCluster> AbilityClusterCache(ClusterConditions CC)
        {
            if (!AbilityClusters.ContainsKey(CC))
            {
                Logger.Write(LogLevel.Cluster, "Creating new entry for ClusterConditions -- {0}", CC.ToString());
                AbilityClusters.Add(CC, new ClusterCollection(CC, 400, 200));
            }

            if (AbilityClusters[CC].ShouldUpdateClusters)
            {
                AbilityClusters[CC].UpdateClusters();
            }
            else
            {
                AbilityClusters[CC].RefreshClusters();
            }

            //Logger.DBLog.InfoFormat("Ability Clusters Found {0}", AbilityClusters[CC].Count.ToString());
            return(AbilityClusters[CC].CurrentClusters);
        }