Exemple #1
0
        protected virtual bool ShouldCommandSkeletons(out TrinityActor target)
        {
            target = null;

            if (!Skills.Necromancer.CommandSkeletons.CanCast())
            {
                return(false);
            }

            target = TargetUtil.GetBestClusterUnit() ?? CurrentTarget;
            if (target != null)
            {
                // assuming skeletons only get the focus damage bonus on one acd at a time.
                // prevent spamming on the same target over and over, maybe there is an attribute on skeletons
                // for their current target or the skeleton power on the target itself.

                var lastCast = SpellHistory.GetLastUseHistoryItem(SNOPower.P6_Necro_CommandSkeletons);
                if (lastCast == null)
                {
                    return(true);
                }

                LastSkeletonCommandTargetAcdId = lastCast.TargetAcdId;
                return(target.AcdId != lastCast.TargetAcdId);
            }
            return(false);
        }
Exemple #2
0
        protected virtual bool ShouldCommandSkeletons()
        {
            if (!Skills.Necromancer.CommandSkeletons.CanCast() || Skills.Necromancer.Simulacrum.TimeSinceUse < 12500)
            {
                return(false);
            }

            if (Skills.Necromancer.CommandSkeletons.TimeSinceUse < 2500)
            {
                return(false);
            }

            var lastCast = SpellHistory.GetLastUseHistoryItem(SNOPower.P6_Necro_CommandSkeletons);

            if (Target.AcdId == lastCast?.TargetAcdId)
            {
                return(false);
            }

            Core.Logger.Error(LogCategory.Routine,
                              $"[Command Skeletons] - On {Target}.");
            return(true);
        }