fBaseXtensions.Targeting.Clustering.UpdateTargetClusteringVariables C# (CSharp) Method

UpdateTargetClusteringVariables() private method

The main cluster refresh -- creates general clustering to be used in more specific clustering checks.
private UpdateTargetClusteringVariables ( ) : void
return void
        internal void UpdateTargetClusteringVariables()
        {
            //normal clustering
            if (SettingCluster.ClusterSettingsTag.EnableClusteringTargetLogic &&
                 (FunkyGame.Hero.dCurrentHealthPct > SettingCluster.ClusterSettingsTag.IgnoreClusterLowHPValue))
            {
                if (FunkyGame.Targeting.Cache.Environment.UnitRAGUIDs.Count >= SettingCluster.ClusterSettingsTag.ClusterMinimumUnitCount)
                {
                    if (TargetClusterCollection.ShouldUpdateClusters)
                        TargetClusterCollection.UpdateClusters();
                }
                else
                    TargetClusterCollection.RefreshClusters();

                List<CacheUnit> units = TargetClusterCollection.RetrieveAllUnits();

                if (units.Count > 0)
                    ValidClusterUnits = units.Select(u => u.RAGUID).ToList();
            }
        }