예제 #1
0
 private static void ClearCastable()
 {
     DeadAllies.Clear();
     CastableTanks.Clear();
     CastableHealers.Clear();
     CastableDps.Clear();
     CastableAlliesWithin30.Clear();
     CastableAlliesWithin25.Clear();
     CastableAlliesWithin20.Clear();
     CastableAlliesWithin15.Clear();
     CastableAlliesWithin12.Clear();
     CastableAlliesWithin10.Clear();
 }
예제 #2
0
        private static void AddAllyToCastable(Character ally)
        {
            if (ally.CurrentHealth <= 0 || ally.IsDead)
            {
                DeadAllies.Add(ally);
                return;
            }

            if (ally.IsTank())
            {
                CastableTanks.Add(ally);
            }
            if (ally.IsHealer())
            {
                CastableHealers.Add(ally);
            }
            if (ally.IsDps())
            {
                CastableDps.Add(ally);
            }

            var distance = ally.Distance(Core.Me);

            if (distance <= 30)
            {
                CastableAlliesWithin30.Add(ally);
            }
            if (distance <= 25)
            {
                CastableAlliesWithin25.Add(ally);
            }
            if (distance <= 20)
            {
                CastableAlliesWithin20.Add(ally);
            }
            if (distance <= 15)
            {
                CastableAlliesWithin15.Add(ally);
            }
            if (distance <= 12)
            {
                CastableAlliesWithin12.Add(ally);
            }
            if (distance <= 10)
            {
                CastableAlliesWithin10.Add(ally);
            }
        }
예제 #3
0
        public static void UpdateAllies(Action extensions = null)
        {
            DeadAllies.Clear();
            CastableTanks.Clear();
            CastableAlliesWithin30.Clear();
            CastableAlliesWithin20.Clear();
            CastableAlliesWithin15.Clear();
            CastableAlliesWithin10.Clear();

            if (!PartyManager.IsInParty)
            {
                if (RaptureAtkUnitManager.Controls.Any(r => r.Name == "GcArmyOrder"))
                {
                    Globals.InGcInstance = true;

                    foreach (var ally in GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(r => !r.CanAttack))
                    {
                        if (!ally.IsTargetable || !ally.InLineOfSight() || ally.Icon == PlayerIcon.Viewing_Cutscene)
                        {
                            continue;
                        }

                        if (BaseSettings.Instance.PartyMemberAuraHistory)
                        {
                            UpdatePartyMemberHistory(ally);
                        }

                        if (ally.CurrentHealth <= 0 || ally.IsDead)
                        {
                            DeadAllies.Add(ally);
                            continue;
                        }

                        if (ally.IsTank())
                        {
                            CastableTanks.Add(ally);
                        }

                        var distance = ally.Distance(Core.Me);

                        if (distance <= 30)
                        {
                            CastableAlliesWithin30.Add(ally);
                        }
                        if (distance <= 30)
                        {
                            CastableAlliesWithin20.Add(ally);
                        }
                        if (distance <= 15)
                        {
                            CastableAlliesWithin15.Add(ally);
                        }
                        if (distance <= 10)
                        {
                            CastableAlliesWithin10.Add(ally);
                        }

                        CastableAlliesWithin30.Add(Core.Me);
                        CastableAlliesWithin20.Add(Core.Me);
                        CastableAlliesWithin15.Add(Core.Me);
                        CastableAlliesWithin10.Add(Core.Me);
                    }
                }
                else
                {
                    Globals.InGcInstance = false;
                }
            }

            foreach (var ally in PartyManager.AllMembers.Select(r => r.BattleCharacter))
            {
                if (ally == null)
                {
                    continue;
                }

                if (!ally.IsTargetable || !ally.InLineOfSight() || ally.Icon == PlayerIcon.Viewing_Cutscene)
                {
                    continue;
                }

                if (BaseSettings.Instance.PartyMemberAuraHistory)
                {
                    UpdatePartyMemberHistory(ally);
                }

                if (ally.CurrentHealth <= 0 || ally.IsDead)
                {
                    DeadAllies.Add(ally);
                    continue;
                }

                if (WorldManager.InPvP)
                {
                    if (ally.HasAura(Auras.MountedPvp))
                    {
                        continue;
                    }
                }

                if (ally.IsTank())
                {
                    CastableTanks.Add(ally);
                }

                var distance = ally.Distance(Core.Me);

                if (distance <= 30)
                {
                    CastableAlliesWithin30.Add(ally);
                }
                if (distance <= 20)
                {
                    CastableAlliesWithin20.Add(ally);
                }
                if (distance <= 15)
                {
                    CastableAlliesWithin15.Add(ally);
                }
                if (distance <= 12)
                {
                    CastableAlliesWithin12.Add(ally);
                }
                if (distance <= 10)
                {
                    CastableAlliesWithin10.Add(ally);
                }
            }

            extensions?.Invoke();
        }
예제 #4
0
        public static void UpdateAllies(Action extensions = null)
        {
            DeadAllies.Clear();
            CastableTanks.Clear();
            CastableAlliesWithin30.Clear();
            CastableAlliesWithin20.Clear();
            CastableAlliesWithin15.Clear();
            CastableAlliesWithin10.Clear();

            if (!Globals.InParty)
            {
                if (Globals.InGcInstance)
                {
                    foreach (var ally in GameObjectManager.GetObjectsOfType <BattleCharacter>().Where(r => !r.CanAttack))
                    {
                        //if (!ally.IsTargetable || !ally.InLineOfSight() || ally.Icon == PlayerIcon.Viewing_Cutscene)
                        //TODO: This is a temporary fix for wrong PlayerIcon Enum: 15 = Viewing_Cutscene
                        if (!ally.IsTargetable || !ally.InLineOfSight() || ally.Icon == (PlayerIcon)15)
                        {
                            continue;
                        }

                        if (BaseSettings.Instance.PartyMemberAuraHistory)
                        {
                            UpdatePartyMemberHistory(ally);
                        }

                        if (ally.CurrentHealth <= 0 || ally.IsDead)
                        {
                            DeadAllies.Add(ally);
                            continue;
                        }

                        if (ally.IsTank())
                        {
                            CastableTanks.Add(ally);
                        }

                        var distance = ally.Distance(Core.Me);

                        if (distance <= 30)
                        {
                            CastableAlliesWithin30.Add(ally);
                        }
                        if (distance <= 30)
                        {
                            CastableAlliesWithin20.Add(ally);
                        }
                        if (distance <= 15)
                        {
                            CastableAlliesWithin15.Add(ally);
                        }
                        if (distance <= 10)
                        {
                            CastableAlliesWithin10.Add(ally);
                        }

                        CastableAlliesWithin30.Add(Core.Me);
                        CastableAlliesWithin20.Add(Core.Me);
                        CastableAlliesWithin15.Add(Core.Me);
                        CastableAlliesWithin10.Add(Core.Me);
                    }
                }
            }

            foreach (var ally in PartyManager.AllMembers.Select(r => r.BattleCharacter))
            {
                if (ally == null)
                {
                    continue;
                }

                if (BaseSettings.Instance.DebugHealingLists == true)
                {
                    Logger.WriteInfo($@"[Debug] PartyManager {ally.Name} is a valid Party Member in PartyManager.");
                }

                //if (!ally.IsTargetable || !ally.InLineOfSight() || ally.Icon == PlayerIcon.Viewing_Cutscene)
                //TODO: This is a temporary fix for wrong PlayerIcon Enum: 15 = Viewing_Cutscene
                if (!ally.IsTargetable || !ally.InLineOfSight() || ally.Icon == (PlayerIcon)15)
                {
                    continue;
                }

                if (BaseSettings.Instance.PartyMemberAuraHistory)
                {
                    UpdatePartyMemberHistory(ally);
                }

                if (ally.CurrentHealth <= 0 || ally.IsDead)
                {
                    DeadAllies.Add(ally);
                    continue;
                }

                if (WorldManager.InPvP)
                {
                    if (ally.HasAura(Auras.MountedPvp))
                    {
                        continue;
                    }
                }

                if (ally.IsTank())
                {
                    CastableTanks.Add(ally);
                }

                var distance = ally.Distance(Core.Me);

                if (distance <= 30)
                {
                    CastableAlliesWithin30.Add(ally);
                }
                if (distance <= 20)
                {
                    CastableAlliesWithin20.Add(ally);
                }
                if (distance <= 15)
                {
                    CastableAlliesWithin15.Add(ally);
                }
                if (distance <= 12)
                {
                    CastableAlliesWithin12.Add(ally);
                }
                if (distance <= 10)
                {
                    CastableAlliesWithin10.Add(ally);
                }
            }

            extensions?.Invoke();
        }