What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Question] How do I make my CR ignore Piety Portals?

tozededao

Community Developer
Joined
Jan 15, 2010
Messages
1,225
Reaction score
5
I want to make my CR ignore Piety portals, I'm sure I've seen it here before but I can't seem to find it, it is probably something on the targeting weight .

Thanks in advance.
 
To make the CR totally ignore them, you just need to filter them out in CombatTargetingOnInclusionCalcuation.

Here's a modified CombatTargetingOnInclusionCalcuation function that shows that:
Code:
        private bool CombatTargetingOnInclusionCalcuation(NetworkObject entity)
        {
            try
            {
                var m = entity as Monster;
                if (m == null)
                    return false;

                if (AreaStateCache.Current.IsBlacklisted(m))
                    return false;

                // Do not consider inactive/dead mobs.
                if (!m.IsActive)
                    return false;

                // Ignore any mob that cannot die.
                if (m.CannotDie)
                    return false;

                // Ignore mobs that are too far to care about.
                if (m.Distance > (_currentLeashRange != -1 ? ExampleRoutineSettings.Instance.CombatRange : 300))
                    return false;

                // Ignore any mob near Divine Shrine: thanks ExVault!
                if (m.HasAura("shrine_godmode"))
                    return false;

                if (m.HasAura("bloodlines_necrovigil"))
                {
                    Log.ErrorFormat("[CombatTargetingOnInclusionCalcuation] {0} ({1}) has bloodlines_necrovigil!", m.Name, m.Id);
                    AreaStateCache.Current.Blacklist(m.Id, TimeSpan.FromHours(1), "bloodlines_necrovigil");
                    return false;
                }

                // Ignore Piety's portals.
                if (m.Name == "Chilling Portal" || m.Name == "Burning Portal")
                {
                    return false;
                }
            }
            catch (Exception ex)
            {
                Log.Error("[CombatOnInclusionCalcuation]", ex);
                return false;
            }
            return true;
        }
 
Back
Top