示例#1
0
        private bool SearchNewTarget(ref WowUnit target, bool grinding)
        {
            if ((target != null && !(target.IsDead || target.Health == 0)) || (HookManager.GetBuffs(WowLuaUnit.Player).Any(e => e.Contains("tealth")) && ObjectManager.Player.HealthPercentage <= 20))
            {
                return(false);
            }

            List <WowUnit> wowUnits       = ObjectManager.WowObjects.OfType <WowUnit>().Where(e => HookManager.GetUnitReaction(ObjectManager.Player, e) != WowUnitReaction.Friendly && HookManager.GetUnitReaction(ObjectManager.Player, e) != WowUnitReaction.Neutral).ToList();
            bool           newTargetFound = false;
            int            targetHealth   = (target == null || target.IsDead) ? 0 : target.Health;
            bool           inCombat       = target == null ? false : target.IsInCombat;
            int            targetCount    = 0;

            foreach (WowUnit unit in wowUnits)
            {
                if (BotUtils.IsValidUnit(unit) && unit != target && !unit.IsDead)
                {
                    double tmpDistance = ObjectManager.Player.Position.GetDistance(unit.Position);
                    if (tmpDistance < 100.0)
                    {
                        if (tmpDistance < 6.0)
                        {
                            targetCount++;
                        }

                        if ((unit.IsInCombat && unit.Health > targetHealth) || (!inCombat && grinding && unit.Health > targetHealth))
                        {
                            target         = unit;
                            targetHealth   = unit.Health;
                            newTargetFound = true;
                            inCombat       = unit.IsInCombat;
                        }
                    }
                }
            }

            if (target == null || target.IsDead)
            {
                HookManager.ClearTarget();
                newTargetFound = false;
                target         = null;
            }

            if (newTargetFound)
            {
                HookManager.TargetGuid(target.Guid);
                spells.ResetAfterTargetDeath();
            }

            return(newTargetFound);
        }
示例#2
0
        public void Execute()
        {
            ulong targetGuid = ObjectManager.TargetGuid;

            /*Character.Inventory.Objects.IWowItem weapon;
             * if(CharacterManager.Equipment.Equipment.TryGetValue(Character.Inventory.Enums.EquipmentSlot.INVSLOT_MAINHAND, out weapon))
             * {
             *  if(mainhandSpeed != 1 && weapon != null && weapon.Stats != null && weapon.Stats.Keys != null)
             *  {
             *      foreach (string stat in weapon.Stats.Keys)
             *      {
             *          Console.WriteLine(stat);
             *          mainhandSpeed = 1;
             *      }
             *  }
             *  //mainhandSpeed = weapon.Stats["ITEM_MOD_SPEED_SHORT"];
             * }*/
            WowUnit target = ObjectManager.WowObjects.OfType <WowUnit>().FirstOrDefault(t => t.Guid == targetGuid);

            SearchNewTarget(ref target, false);
            if (target != null)
            {
                bool targetDistanceChanged = false;
                if (!LastPlayerPosition.Equals(ObjectManager.Player.Position))
                {
                    distanceTraveled      = ObjectManager.Player.Position.GetDistance(LastPlayerPosition);
                    LastPlayerPosition    = new Vector3(ObjectManager.Player.Position.X, ObjectManager.Player.Position.Y, ObjectManager.Player.Position.Z);
                    targetDistanceChanged = true;
                }

                if (!LastTargetPosition.Equals(target.Position))
                {
                    hasTargetMoved        = true;
                    LastTargetPosition    = new Vector3(target.Position.X, target.Position.Y, target.Position.Z);
                    targetDistanceChanged = true;
                }
                else if (hasTargetMoved)
                {
                    hasTargetMoved  = false;
                    computeNewRoute = true;
                }

                if (targetDistanceChanged)
                {
                    distanceToTarget = LastPlayerPosition.GetDistance(LastTargetPosition);
                }

                HandleMovement(target);
                HandleAttacking(target);
            }
        }
 public Spell GetSpellToCast(WowUnit player, WowUnit activeTarget)
 {
     return(new Spell()
     {
         name = "TestSpell",
         castTime = 500,
         costs = 10,
         maxRange = 28,
         minRange = 0,
         rank = "TestRank",
         spellbookId = 1337,
         spellBookName = "TestBook"
     });
 }
示例#4
0
        public void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (ObjectManager.Player.CurrentlyCastingSpellId > 0 ||
                ObjectManager.Player.CurrentlyChannelingSpellId > 0)
            {
                return;
            }

            if ((DateTime.Now - LastDebuffCheck > TimeSpan.FromSeconds(debuffCheckTime) &&
                 HandleDebuffing()) ||
                ObjectManager.Player.ManaPercentage < 90 &&
                ObjectManager.Player.HealthPercentage > 60 &&
                CastSpellIfPossible(lifeTapSpell) ||
                (ObjectManager.Player.HealthPercentage < 80 &&
                 CastSpellIfPossible(deathCoilSpell, true)))
            {
                return;
            }

            WowUnit target = ObjectManager.WowObjects.OfType <WowUnit>().FirstOrDefault(e => e.Guid == ObjectManager.TargetGuid);

            if (target != null)
            {
                if (target.GetType() == typeof(WowPlayer))
                {
                    if ((ObjectManager.Player.Position.GetDistance(target.Position) < 6 &&
                         CastSpellIfPossible(howlOfTerrorSpell, true)) ||
                        (ObjectManager.Player.Position.GetDistance(target.Position) < 12 &&
                         CastSpellIfPossible(fearSpell, true)))
                    {
                        return;
                    }
                }

                if ((ObjectManager.Player.CurrentlyCastingSpellId == 0 &&
                     ObjectManager.Player.CurrentlyCastingSpellId == 0 &&
                     CharacterManager.Inventory.Items.Count(e => e.Name.Equals("Soul Shard", StringComparison.OrdinalIgnoreCase)) < 5 &&
                     target.HealthPercentage < 8 &&
                     CastSpellIfPossible(drainSoulSpell, true)))
                {
                    return;
                }
            }

            if (CastSpellIfPossible(shadowBoltSpell, true))
            {
                return;
            }
        }
        public bool IsVendorNpcNear(out WowUnit unit)
        {
            unit = WowInterface.ObjectManager.WowObjects.OfType <WowUnit>()
                   .Where(e => e.GetType() != typeof(WowPlayer) &&
                          !Blacklist.Contains(e.Guid) &&
                          !e.IsDead &&
                          e.IsVendor &&
                          WowInterface.HookManager.WowGetUnitReaction(WowInterface.ObjectManager.Player, e) != WowUnitReaction.Hostile &&
                          e.Position.GetDistance(WowInterface.ObjectManager.Player.Position) < Config.RepairNpcSearchRadius)
                   .OrderBy(e => e.Position.GetDistance(WowInterface.ObjectManager.Player.Position))
                   .FirstOrDefault();

            return(unit != null);
        }
示例#6
0
        /// <summary>
        /// Called when combating an unit
        /// </summary>
        /// <param name="p_Target"></param>
        /// <param name="p_UseBigCooldowns"></param>
        public override void OnCombat(WowUnit p_Target, bool p_UseBigCooldowns)
        {
            var l_ActivePlayer = WoW.ObjectManager.ActivePlayer;

            if (l_ActivePlayer == null)
            {
                return;
            }

            if (m_RotationBook.RunRotation("Combat", p_Target, p_UseBigCooldowns))
            {
                return;
            }
        }
        public bool IsUnitInFollowRange(WowUnit unitToFollow)
        {
            WowUnit wowPlayer = (WowUnit)ObjectManager.GetWowObjectByGuid(WowDataAdapter.PlayerGuid);

            if (wowPlayer != null && unitToFollow != null)
            {
                WowPosition myPosition = wowPlayer.Position;
                return(BotMath.GetDistance(myPosition, unitToFollow.Position) >= UnitFollowThreshold);
            }
            else
            {
                return(false);
            }
        }
        private BehaviorTreeStatus FleeFromComingEnemies(CtfBlackboard blackboard)
        {
            WowUnit nearestEnemy = WowInterface.ObjectManager.GetNearEnemies <WowUnit>(WowInterface.ObjectManager.Player.Position, 48.0).OrderBy(e => e.Position.GetDistance(WowInterface.ObjectManager.Player.Position)).FirstOrDefault();

            if (nearestEnemy != null)
            {
                WowInterface.MovementEngine.SetMovementAction(MovementAction.Flee, nearestEnemy.Position, nearestEnemy.Rotation);
                return(BehaviorTreeStatus.Ongoing);
            }
            else
            {
                return(BehaviorTreeStatus.Success);
            }
        }
示例#9
0
        private void Loot(WowUnit unit)
        {
            WowInterface.HookManager.WowUnitRightClick(unit);

            // if AutoLoot is enabled, the unit will be dequeued after it is looted because it will no longer be IsLootable
            // there is no need to handle the dequeing here
            if (WowInterface.HookManager.LuaAutoLootEnabled() &&
                WowInterface.XMemory.Read(WowInterface.OffsetList.LootWindowOpen, out byte lootOpen) &&
                lootOpen > 0)
            {
                WowInterface.HookManager.LuaLootEveryThing();
                UnitsAlreadyLootedList.Add(UnitLootQueue.Dequeue());
            }
        }
示例#10
0
        public override void Execute()
        {
            if (WowInterface.CharacterManager.Equipment.Items.Any(e => ((double)e.Value.MaxDurability / (double)e.Value.Durability) > 0.2))
            {
                StateMachine.SetState(BotState.Idle);
                return;
            }

            WowUnit selectedUnit = WowInterface.ObjectManager.WowObjects.OfType <WowUnit>()
                                   .OrderBy(e => e.Position.GetDistance(WowInterface.ObjectManager.Player.Position))
                                   .FirstOrDefault(e => e.GetType() != typeof(WowPlayer) &&
                                                   WowInterface.HookManager.GetUnitReaction(WowInterface.ObjectManager.Player, e) == WowUnitReaction.Friendly &&
                                                   e.IsRepairVendor &&
                                                   e.Position.GetDistance(WowInterface.ObjectManager.Player.Position) < 50);

            if (selectedUnit != null && !selectedUnit.IsDead)
            {
                if (!IsAtNpc)
                {
                    double distance = WowInterface.ObjectManager.Player.Position.GetDistance(selectedUnit.Position);
                    if (distance > 5.0)
                    {
                        WowInterface.MovementEngine.SetState(MovementEngineState.Moving, selectedUnit.Position);
                        WowInterface.MovementEngine.Execute();
                    }
                    else
                    {
                        if (distance > 3)
                        {
                            WowInterface.CharacterManager.InteractWithUnit(selectedUnit, 20.9f, 0.2f);
                        }
                        else
                        {
                            WowInterface.HookManager.UnitOnRightClick(selectedUnit);
                            RepairActionGo = DateTime.Now + TimeSpan.FromSeconds(1);
                            IsAtNpc        = true;
                        }
                    }
                }
                else if (DateTime.Now > RepairActionGo)
                {
                    WowInterface.HookManager.RepairAllItems();
                    WowInterface.HookManager.SellAllGrayItems();
                }
            }
            else
            {
                StateMachine.SetState(BotState.Idle);
            }
        }
示例#11
0
        public void OutOfCombatExecute()
        {
            if (!LastPlayerPosition.Equals(ObjectManager.Player.Position))
            {
                distanceTraveled   = ObjectManager.Player.Position.GetDistance(LastPlayerPosition);
                LastPlayerPosition = new Vector3(ObjectManager.Player.Position.X, ObjectManager.Player.Position.Y, ObjectManager.Player.Position.Z);
            }

            if (distanceTraveled < 0.001)
            {
                ulong   leaderGuid = ObjectManager.PartyleaderGuid;
                WowUnit target     = null;
                if (leaderGuid == ObjectManager.PlayerGuid && SearchNewTarget(ref target, true))
                {
                    if (!LastTargetPosition.Equals(target.Position))
                    {
                        hasTargetMoved     = true;
                        LastTargetPosition = new Vector3(target.Position.X, target.Position.Y, target.Position.Z);
                        distanceToTarget   = LastPlayerPosition.GetDistance(LastTargetPosition);
                    }
                    else
                    {
                        computeNewRoute = true;
                        hasTargetMoved  = false;
                    }

                    Dancing = false;
                    HandleMovement(target);
                    HandleAttacking(target);
                }
                else if (!Dancing || standing)
                {
                    standing = false;
                    HookManager.ClearTarget();
                    HookManager.SendChatMessage(standingEmotes[new Random().Next(standingEmotes.Length)]);
                    Dancing = true;
                }
            }
            else
            {
                if (!Dancing || !standing)
                {
                    standing = true;
                    HookManager.ClearTarget();
                    HookManager.SendChatMessage(runningEmotes[new Random().Next(runningEmotes.Length)]);
                    Dancing = true;
                }
            }
        }
示例#12
0
        private bool NeedToHealSomeone()
        {
            if (TargetManagerHeal.GetUnitToTarget(out IEnumerable <WowUnit> unitsToHeal))
            {
                WowUnit target = unitsToHeal.First();

                if (unitsToHeal.Count() > 3 &&
                    target.HealthPercentage > 80.0 &&
                    TryCastSpell(prayerOfHealingSpell, target.Guid, true))
                {
                    return(true);
                }

                if (target.HealthPercentage < 25.0 &&
                    TryCastSpell(guardianSpiritSpell, target.Guid, true))
                {
                    return(true);
                }

                if (target.Guid != WowInterface.ObjectManager.PlayerGuid &&
                    target.HealthPercentage < 70.0 &&
                    WowInterface.ObjectManager.Player.HealthPercentage < 70.0 &&
                    TryCastSpell(bindingHealSpell, target.Guid, true))
                {
                    return(true);
                }

                if (target.HealthPercentage < 90.0 &&
                    target.HealthPercentage > 75.0 &&
                    !target.HasBuffByName(renewSpell) &&
                    TryCastSpell(renewSpell, target.Guid, true))
                {
                    return(true);
                }

                double healthDifference = target.MaxHealth - target.Health;
                List <KeyValuePair <int, string> > spellsToTry = SpellUsageHealDict.Where(e => e.Key <= healthDifference).OrderByDescending(e => e.Key).ToList();

                foreach (KeyValuePair <int, string> keyValuePair in spellsToTry)
                {
                    if (TryCastSpell(keyValuePair.Value, target.Guid, true))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }
示例#13
0
        public void Execute()
        {
            // we dont want to do anything if we are casting something...
            if (ObjectManager.Player.CurrentlyCastingSpellId > 0 ||
                ObjectManager.Player.CurrentlyChannelingSpellId > 0)
            {
                return;
            }

            if (!ObjectManager.Player.IsAutoAttacking)
            {
                HookManager.StartAutoAttack();
            }

            if ((DateTime.Now - LastBuffCheck > TimeSpan.FromSeconds(buffCheckTime) &&
                 HandleBuffing()) ||
                (DateTime.Now - LastJudgementCheck > TimeSpan.FromSeconds(judgementCheckTime) &&
                 HandleJudgement()) ||
                (DateTime.Now - LastEnemyCastingCheck > TimeSpan.FromSeconds(enemyCastingCheckTime) &&
                 HandleHammerOfJustice()) ||
                (ObjectManager.Player.HealthPercentage < 20 &&
                 CastSpellIfPossible(layOnHandsSpell)) ||
                (ObjectManager.Player.HealthPercentage < 60 &&
                 CastSpellIfPossible(holyLightSpell, true)) ||
                CastSpellIfPossible(avengingWrathSpell, true) ||
                (ObjectManager.Player.ManaPercentage < 80 &&
                 CastSpellIfPossible(divinePleaSpell, true)))
            {
                return;
            }

            WowUnit target = ObjectManager.WowObjects.OfType <WowUnit>().FirstOrDefault(e => e.Guid == ObjectManager.TargetGuid);

            if (target != null)
            {
                if ((ObjectManager.Player.HealthPercentage < 20 &&
                     CastSpellIfPossible(hammerOfWrathSpell, true)) ||
                    CastSpellIfPossible(crusaderStrikeSpell, true) ||
                    CastSpellIfPossible(divineStormSpell, true) ||
                    CastSpellIfPossible(divineStormSpell, true) ||
                    CastSpellIfPossible(consecrationSpell, true) ||
                    CastSpellIfPossible(exorcismSpell, true) ||
                    CastSpellIfPossible(holyWrathSpell, true))
                {
                    return;
                }
            }
        }
示例#14
0
        public void Execute()
        {
            computeNewRoute = false;
            WowUnit target = WowInterface.ObjectManager.Target;

            if ((WowInterface.ObjectManager.TargetGuid != 0 && target != null && !(target.IsDead || target.Health < 1)) || SearchNewTarget(ref target, false))
            {
                Dancing = false;
                bool targetDistanceChanged = false;
                if (!LastPlayerPosition.Equals(WowInterface.ObjectManager.Player.Position))
                {
                    distanceTraveled      = WowInterface.ObjectManager.Player.Position.GetDistance(LastPlayerPosition);
                    LastPlayerPosition    = new Vector3(WowInterface.ObjectManager.Player.Position.X, WowInterface.ObjectManager.Player.Position.Y, WowInterface.ObjectManager.Player.Position.Z);
                    targetDistanceChanged = true;
                }

                if (!LastTargetPosition.Equals(target.Position))
                {
                    computeNewRoute       = true;
                    LastTargetPosition    = new Vector3(target.Position.X, target.Position.Y, target.Position.Z);
                    targetDistanceChanged = true;
                }

                if (targetDistanceChanged)
                {
                    distanceToTarget = LastPlayerPosition.GetDistance(LastTargetPosition);
                }

                HandleMovement(target);
                HandleAttacking(target);
            }
            else if (!Dancing)
            {
                if (distanceTraveled < 0.001)
                {
                    WowInterface.HookManager.WowClearTarget();
                    WowInterface.HookManager.LuaSendChatMessage(standingEmotes[new Random().Next(standingEmotes.Length)]);
                    Dancing = true;
                    WowInterface.Globals.ForceCombat = false;
                }
                else
                {
                    WowInterface.HookManager.WowClearTarget();
                    WowInterface.HookManager.LuaSendChatMessage(runningEmotes[new Random().Next(runningEmotes.Length)]);
                    Dancing = true;
                }
            }
        }
示例#15
0
        public static bool Run(WowInterface wowInterface, WowUnit selectedUnit)
        {
            if (wowInterface == null || selectedUnit == null)
            {
                return(false);
            }

            if (wowInterface.ObjectManager.TargetGuid != selectedUnit.Guid)
            {
                wowInterface.HookManager.WowTargetGuid(selectedUnit.Guid);
                return(false);
            }

            if (!BotMath.IsFacing(wowInterface.ObjectManager.Player.Position, wowInterface.ObjectManager.Player.Rotation, selectedUnit.Position))
            {
                wowInterface.HookManager.WowFacePosition(wowInterface.ObjectManager.Player, selectedUnit.Position);
            }

            if (selectedUnit.IsGossip)
            {
                if (wowInterface.HookManager.LuaUiIsVisible("GossipFrame"))
                {
                    string[] gossipTypes = wowInterface.HookManager.LuaGetGossipTypes();

                    for (int i = 0; i < gossipTypes.Length; ++i)
                    {
                        if (gossipTypes[i].Equals("vendor", StringComparison.OrdinalIgnoreCase) ||
                            gossipTypes[i].Equals("repair", StringComparison.OrdinalIgnoreCase))
                        {
                            wowInterface.HookManager.LuaSelectGossipOption(i + 1);
                        }
                    }
                }

                if (!wowInterface.HookManager.LuaUiIsVisible("MerchantFrame"))
                {
                    return(false);
                }
            }

            if (!wowInterface.HookManager.LuaUiIsVisible("GossipFrame", "MerchantFrame"))
            {
                wowInterface.HookManager.WowUnitRightClick(selectedUnit);
                return(false);
            }

            return(true);
        }
示例#16
0
        private bool NeedToHealSomeone()
        {
            if (TargetManager.GetUnitToTarget(out List <WowUnit> unitsToHeal))
            {
                WowInterface.HookManager.TargetGuid(unitsToHeal.First().Guid);
                WowInterface.ObjectManager.UpdateObject(WowInterface.ObjectManager.Player);

                if (unitsToHeal.Count > 3 &&
                    CastSpellIfPossible(tranquilitySpell, WowInterface.ObjectManager.TargetGuid, true))
                {
                    return(true);
                }

                WowUnit target = WowInterface.ObjectManager.Target;
                if (target != null)
                {
                    WowInterface.ObjectManager.UpdateObject(target);
                    if ((target.HealthPercentage < 15 &&
                         CastSpellIfPossible(naturesSwiftnessSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        (target.HealthPercentage < 90 &&
                         !WowInterface.ObjectManager.Target.HasBuffByName(rejuvenationSpell) &&
                         CastSpellIfPossible(rejuvenationSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        (target.HealthPercentage < 85 &&
                         !WowInterface.ObjectManager.Target.HasBuffByName(wildGrowthSpell) &&
                         CastSpellIfPossible(wildGrowthSpell, WowInterface.ObjectManager.TargetGuid, true)) ||
                        (target.HealthPercentage < 70 &&
                         (WowInterface.ObjectManager.Target.HasBuffByName(regrowthSpell) ||
                          WowInterface.ObjectManager.Target.HasBuffByName(rejuvenationSpell) &&
                          CastSpellIfPossible(swiftmendSpell, WowInterface.ObjectManager.TargetGuid, true))))
                    {
                        return(true);
                    }

                    double healthDifference = target.MaxHealth - target.Health;
                    List <KeyValuePair <int, string> > spellsToTry = SpellUsageHealDict.Where(e => e.Key <= healthDifference).ToList();

                    foreach (KeyValuePair <int, string> keyValuePair in spellsToTry.OrderByDescending(e => e.Value))
                    {
                        if (CastSpellIfPossible(keyValuePair.Value, WowInterface.ObjectManager.TargetGuid, true))
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
示例#17
0
        public void Execute()
        {
            ulong   targetGuid = ObjectManager.TargetGuid;
            WowUnit target     = ObjectManager.WowObjects.OfType <WowUnit>().FirstOrDefault(t => t.Guid == targetGuid);

            if (target != null)
            {
                // make sure we're auto attacking
                if (!ObjectManager.Player.IsAutoAttacking)
                {
                    HookManager.StartAutoAttack();
                }

                HandleAttacking(target);
            }
        }
示例#18
0
        //Change target if target to far away
        public void ChangeTargetToAttack()
        {
            IEnumerable <WowPlayer> PlayerNearPlayer = WowInterface.ObjectManager.GetNearEnemies <WowPlayer>(WowInterface.Player.Position, 15);

            WowUnit target = WowInterface.Target;

            if (target == null)
            {
                return;
            }
            if (PlayerNearPlayer.Count() >= 1 && WowInterface.ObjectManager.Target.HealthPercentage >= 60 && WowInterface.Player.Position.GetDistance(target.Position) >= 20)
            {
                WowInterface.HookManager.WowClearTarget();
                return;
            }
        }
        public bool ExecuteTactic(CombatClassRole role, bool isMelee, out bool preventMovement, out bool allowAttacking)
        {
            preventMovement = false;
            allowAttacking  = true;

            WowUnit wowUnit = WowInterface.I.ObjectManager.GetClosestWowUnitByDisplayId(DevourerOfSoulsDisplayId, false);

            if (wowUnit != null)
            {
                if (wowUnit.DisplayId == 30150)
                {
                    // make sure we avoid the lazer
                    // we only care about being on the reight side of him because the lazer spins clockwise
                    float angleDiff = BotMath.GetAngleDiff(wowUnit.Position, wowUnit.Rotation, WowInterface.I.ObjectManager.Player.Position);

                    if (angleDiff < 0.5f)
                    {
                        WowInterface.I.MovementEngine.SetMovementAction(MovementAction.Move, BotMath.CalculatePositionAround(wowUnit.Position, wowUnit.Rotation, MathF.PI, isMelee ? 5.0f : 22.0f));

                        preventMovement = true;
                        allowAttacking  = false;
                        return(true);
                    }
                }

                if (role == CombatClassRole.Tank)
                {
                    Vector3 modifiedCenterPosition = BotUtils.MoveAhead(MidPosition, BotMath.GetFacingAngle(WowInterface.I.ObjectManager.MeanGroupPosition, MidPosition), 8.0f);
                    float   distanceToMid          = WowInterface.I.ObjectManager.Player.Position.GetDistance(modifiedCenterPosition);

                    if (wowUnit.TargetGuid == WowInterface.I.ObjectManager.PlayerGuid)
                    {
                        if (distanceToMid > 5.0f && WowInterface.I.ObjectManager.Player.Position.GetDistance(wowUnit.Position) < 3.5)
                        {
                            // move the boss to mid
                            WowInterface.I.MovementEngine.SetMovementAction(MovementAction.Move, modifiedCenterPosition);

                            preventMovement = true;
                            allowAttacking  = false;
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
示例#20
0
        public WowUnitReaction GetUnitReaction(WowUnit wowUnitA, WowUnit wowUnitB)
        {
            WowUnitReaction reaction = WowUnitReaction.Unknown;

            if (wowUnitA == null || wowUnitB == null)
            {
                return(reaction);
            }

            if (WowInterface.BotCache.TryGetReaction(wowUnitA.FactionTemplate, wowUnitB.FactionTemplate, out WowUnitReaction cachedReaction))
            {
                return(cachedReaction);
            }

            // integer to save the reaction
            WowInterface.XMemory.AllocateMemory(4, out IntPtr memAlloc);
            WowInterface.XMemory.Write(memAlloc, 0);

            // TODO: refactor this
            string[] asm = new string[]
            {
                $"PUSH {wowUnitA.BaseAddress}",
                $"MOV ECX, {wowUnitB.BaseAddress}",
                $"CALL {WowInterface.OffsetList.FunctionUnitGetReaction}",
                $"MOV [{memAlloc}], EAX",
                "RETN",
            };

            if (wowUnitA.IsDead || wowUnitB.IsDead)
            {
                return(reaction);
            }

            try
            {
                InjectAndExecute(asm, true);
                WowInterface.XMemory.Read(memAlloc, out reaction);

                WowInterface.BotCache.CacheReaction(wowUnitA.FactionTemplate, wowUnitB.FactionTemplate, reaction);
            }
            finally
            {
                WowInterface.XMemory.FreeMemory(memAlloc);
            }

            return(reaction);
        }
示例#21
0
文件: AMonk.cs 项目: ghost4u/Combats
 public override void OnCombat(WowUnit TARGET)
 {
     /* Performance tests
     stopwatch.Stop();
     averageScanTimes.Add(stopwatch.ElapsedMilliseconds);
     SPQR.Logger.WriteLine("Elapsed:  " + stopwatch.ElapsedMilliseconds.ToString() + " miliseconds, average:" + (averageScanTimes.Sum() / averageScanTimes.Count()).ToString() + ",Max:" + averageScanTimes.Max());
     stopwatch.Restart();
      */
     if (!Cooldown.IsGlobalCooldownActive && TARGET.IsValid)
     {
         if (isAOE) { castNextSpellbyAOEPriority(TARGET); } else { castNextSpellbySinglePriority(TARGET); }
     }
     if ((GetAsyncKeyState(90) == -32767))
     {
         changeRotation();
     }
 }
示例#22
0
        internal bool CastSpellIfPossible(string spellName, ulong guid, bool needsResource = false, int currentResourceAmount = 0)
        {
            if (!PrepareCast(spellName))
            {
                return(false);
            }

            WowUnit target = null;

            if (guid != 0)
            {
                target = WowInterface.ObjectManager.GetWowObjectByGuid <WowUnit>(guid);

                if (target == null)
                {
                    return(false);
                }
            }

            if (currentResourceAmount == 0)
            {
                currentResourceAmount = WowInterface.ObjectManager.Player.Class switch
                {
                    WowClass.Deathknight => WowInterface.ObjectManager.Player.Runeenergy,
                    WowClass.Rogue => WowInterface.ObjectManager.Player.Energy,
                    WowClass.Warrior => WowInterface.ObjectManager.Player.Rage,
                    _ => WowInterface.ObjectManager.Player.Mana,
                };
            }

            if (Spells[spellName] != null &&
                !CooldownManager.IsSpellOnCooldown(spellName) &&
                (!needsResource || Spells[spellName].Costs < currentResourceAmount) &&
                (target == null || IsInRange(Spells[spellName], target.Position)))
            {
                if (guid != 0 && WowInterface.ObjectManager.TargetGuid != guid)
                {
                    WowInterface.HookManager.TargetGuid(guid);
                }

                CastSpell(spellName);
                return(true);
            }

            return(false);
        }
示例#23
0
 private bool HandleDpsMovement(WowUnit target, Vector3 targetPosition)
 {
     // handle special movement needs
     if (WowInterface.CombatClass.WalkBehindEnemy &&
         WowInterface.ObjectManager.Target.TargetGuid != WowInterface.ObjectManager.PlayerGuid ||
         WowInterface.ObjectManager.Target.Type == WowObjectType.Player)    // prevent spinning
     {
         // walk behind enemy
         Vector3 positionToGoTo = BotMath.CalculatePositionBehind(target.Position, target.Rotation);
         return(WowInterface.MovementEngine.SetMovementAction(MovementAction.Move, positionToGoTo));
     }
     else
     {
         // just move to the enemies
         return(WowInterface.MovementEngine.SetMovementAction(MovementAction.Move, targetPosition));
     }
 }
示例#24
0
        public void TargetselectionTank()
        {
            if (TargetSelectEvent.Run())
            {
                WowUnit nearTargetToTank = WowInterface.ObjectManager.GetEnemiesTargetingPartymembers <WowUnit>(WowInterface.Player.Position, 60)
                                           .Where(e => e.IsInCombat && !e.IsNotAttackable && e.Type != WowObjectType.Player && e.Name != "The Lich King" && e.Name != "Anub'Rekhan" && !(WowInterface.ObjectManager.MapId == WowMapId.DrakTharonKeep && e.CurrentlyChannelingSpellId == 47346))
                                           .OrderBy(e => e.Position.GetDistance(WowInterface.Player.Position))
                                           .FirstOrDefault();

                if (nearTargetToTank != null)
                {
                    WowInterface.HookManager.WowTargetGuid(nearTargetToTank.Guid);

                    if (!TargetInLineOfSight)
                    {
                        return;
                    }
                    else
                    {
                        AttackTarget();
                    }
                }
                else
                {
                    WowUnit nearTarget = WowInterface.ObjectManager.GetNearEnemies <WowUnit>(WowInterface.Player.Position, 80)
                                         .Where(e => e.IsInCombat && !e.IsNotAttackable && e.Type == WowObjectType.Player)
                                         .OrderBy(e => e.Position.GetDistance(WowInterface.Player.Position))
                                         .FirstOrDefault();//&& e.Type(Player)

                    if (nearTarget != null)
                    {
                        WowInterface.HookManager.WowTargetGuid(nearTarget.Guid);

                        if (!TargetInLineOfSight)
                        {
                            return;
                        }
                    }
                    else
                    {
                        AttackTarget();
                    }
                }
            }
        }
示例#25
0
        public Descriptor.eUnitReaction GetUnitRelation(WowUnit u1, WowUnit u2)
        {
            if (u1 == null || u2 == null)
            {
                return(Descriptor.eUnitReaction.Unknown);
            }
            if (u1.ObjectPointer == ProcessManager.Player.ObjectPointer && RelationCache.ContainsKey(u2.Guid))
            {
                return(RelationCache[u2.Guid]);
            }

            ProcessManager.SuspendMainWowThread();

            uint codecave = wow.AllocateMemory();
            uint result   = 0;

            wow.Asm.Clear();
            AsmUpdateCurMgr();
            wow.Asm.AddLine("mov ecx, {0}", u1.ObjectPointer);
            wow.Asm.AddLine("push {0}", u2.ObjectPointer);
            wow.Asm.AddLine("call {0}", Globals.Functions.GetUnitRelation);

            AsmSendResumeMessage();
            wow.Asm.AddLine("retn");

            try
            {
                result = wow.Asm.InjectAndExecute(codecave);
            }
            catch (Exception e)
            {
                ProcessManager.ResumeMainWowThread();
                throw e;
            }
            finally
            {
                wow.FreeMemory(codecave);
            }

            if (u1.ObjectPointer == ProcessManager.Player.ObjectPointer)
            {
                RelationCache.Add(u2.Guid, (Descriptor.eUnitReaction)result);
            }
            return((Descriptor.eUnitReaction)result);
        }
示例#26
0
        /// <summary>
        /// Checks if a unit has a given buff by ID
        /// </summary>
        /// <param name="unit">Unit to check for buffs</param>
        /// <param name="BuffToCheck">Spell ID of the buff to check</param>
        /// <returns>True if unit has the given buff.</returns>
        public bool HasBuffById(WowUnit unit, uint BuffToCheck)
        {
            uint CurrentBuff = unit.ObjectPointer + Globals.FirstBuff;

            uint Buff = 1;

            while (Buff != 0 && BuffToCheck != 0)
            {
                Buff = wow.ReadUInt(CurrentBuff);
                if (Buff == BuffToCheck)
                {
                    return(true);
                }

                CurrentBuff += Globals.NextBuff;
            }
            return(false);
        }
示例#27
0
        public override void ExecuteCC()
        {
            // after 1 seconds of no healing and no freidns around us we are going to attack stuff
            if (!NeedToHealSomeone() &&
                DateTime.Now - LastHealAction > TimeSpan.FromSeconds(1) &&
                WowInterface.ObjectManager.GetNearPartymembers(WowInterface.ObjectManager.Player.Position, 48).Count <= 1)
            {
                // basic auto attack defending
                if (WowInterface.ObjectManager.TargetGuid == 0 || WowInterface.HookManager.GetUnitReaction(WowInterface.ObjectManager.Player, WowInterface.ObjectManager.Target) == WowUnitReaction.Friendly)
                {
                    List <WowUnit> nearEnemies = WowInterface.ObjectManager.GetNearEnemies <WowUnit>(WowInterface.ObjectManager.Player.Position, 10).Where(e => e.IsInCombat).ToList();

                    if (nearEnemies.Count > 0)
                    {
                        WowUnit target = nearEnemies.FirstOrDefault();
                        if (target != null)
                        {
                            WowInterface.HookManager.TargetGuid(target.Guid);
                            WowInterface.MovementEngine.Reset();
                        }
                    }
                }
                else
                {
                    if (WowInterface.ObjectManager.Target.Position.GetDistance(WowInterface.ObjectManager.Player.Position) > 4)
                    {
                        WowInterface.MovementEngine.SetState(MovementEngineState.Moving, WowInterface.ObjectManager.Target.Position);
                        WowInterface.MovementEngine.Execute();
                    }
                    else
                    {
                        if (!WowInterface.ObjectManager.Player.IsAutoAttacking && AutoAttackEvent.Run())
                        {
                            WowInterface.HookManager.StartAutoAttack(WowInterface.ObjectManager.Target);
                        }

                        if (FaceEvent.Run())
                        {
                            WowInterface.HookManager.FacePosition(WowInterface.ObjectManager.Player, WowInterface.ObjectManager.Target.Position);
                        }
                    }
                }
            }
        }
        public void Execute()
        {
            if (Finished)
            {
                WowInterface.MovementEngine.Reset();
                WowInterface.HookManager.WowStopClickToMove();
                return;
            }

            WowUnit = WowInterface.ObjectManager.GetClosestWowUnitByDisplayId(UnitDisplayIds);

            if (WowUnit != null)
            {
                if (WowUnit.Position.GetDistance2D(WowInterface.ObjectManager.Player.Position) > Distance)
                {
                    WowInterface.MovementEngine.SetMovementAction(MovementAction.Moving, WowUnit.Position);
                }
            }
        }
示例#29
0
        private void RenderUnits(int halfWidth, int halfHeight, Graphics graphics, double scale, Vector3 playerPosition, double playerRotation)
        {
            List <WowUnit> wowUnits = AmeisenBot.WowInterface.ObjectManager.WowObjects
                                      .OfType <WowUnit>()
                                      .ToList();

            for (int i = 0; i < wowUnits.Count; ++i)
            {
                WowUnit unit = wowUnits[i];

                Brush selectedBrush = unit.IsDead ? DeadBrush : (AmeisenBot.WowInterface.HookManager.WowGetUnitReaction(AmeisenBot.WowInterface.ObjectManager.Player, unit)) switch
                {
                    WowUnitReaction.HostileGuard => EnemyBrush,
                    WowUnitReaction.Hostile => EnemyBrush,
                    WowUnitReaction.Neutral => NeutralBrush,
                    WowUnitReaction.Friendly => FriendBrush,
                    _ => DefaultEntityBrush,
                };

                Point positionOnMap = GetRelativePosition(playerPosition, unit.Position, playerRotation, halfWidth, halfHeight, scale);

                if (unit.GetType() == typeof(WowPlayer))
                {
                    if (AmeisenBot.Config.MapRenderPlayers)
                    {
                        string playerName  = AmeisenBot.Config.MapRenderPlayerNames ? unit.Name : string.Empty;
                        string playerExtra = AmeisenBot.Config.MapRenderPlayerExtra ? $"<{unit.Level} {unit.Race} {unit.Class}>" : string.Empty;

                        RenderUnit(positionOnMap.X, positionOnMap.Y, playerName, playerExtra, selectedBrush, WowColorsDrawing.GetClassPrimaryBrush(unit.Class), TextFont, SubTextFont, SubTextBrush, graphics, 7);
                    }
                }
                else
                {
                    if (AmeisenBot.Config.MapRenderUnits)
                    {
                        string unitName  = AmeisenBot.Config.MapRenderUnitNames ? unit.Name : string.Empty;
                        string unitExtra = AmeisenBot.Config.MapRenderPlayerExtra ? $"<{unit.Level}>" : string.Empty;

                        RenderUnit(positionOnMap.X, positionOnMap.Y, unitName, unitExtra, selectedBrush, TextBrush, TextFont, SubTextFont, SubTextBrush, graphics);
                    }
                }
            }
        }
示例#30
0
        private bool HandleTankMovement(WowUnit target, Vector3 targetPosition)
        {
            // handle special movement needs
            if (WowInterface.CombatClass.WalkBehindEnemy &&
                WowInterface.CombatClass.Role == CombatClassRole.Tank &&
                WowInterface.ObjectManager.Partymembers.Any())    // no need to rotate
            {
                // rotate the boss away from the group
                // Vector3 meanGroupPosition = WowInterface.ObjectManager.MeanGroupPosition;
                // Vector3 positionToGoTo = BotMath.CalculatePositionBehind(target.Position, BotMath.GetFacingAngle(target.Position, meanGroupPosition));

                return(WowInterface.MovementEngine.SetMovementAction(MovementAction.Move, targetPosition));
            }
            else
            {
                // just move to the enemies
                return(WowInterface.MovementEngine.SetMovementAction(MovementAction.Move, targetPosition));
            }
        }
示例#31
0
文件: AHunter.cs 项目: KohaPE/Combats
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var Focus = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Focus);
            var IsCasting = ObjectManager.LocalPlayer.IsCasting;
            var Pet = ObjectManager.Pet;

            if (TARGET.Health >= 1 && ME.InCombat && !IsCasting)
            { //Combat Check

            if (ME.UnitsAttackingMe.Count >= 1 && AI.Controllers.Spell.CanCast((int)Spells.Misdirect) && !ME.HasAuraById((int)Auras.Misdirection) && Environment.TickCount - lastMDTick > 2000 && Pet.Health >= 1)
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Casting Misdirect!!!");
              lastMDTick = Environment.TickCount;
              return;
              }

                                                ///////////////////////////Beast Master////////////////////
            if (ME.HasAuraById((int)Auras.BMCheck))
            { //Spec Check

            ///Pet Controls

            if (!WoW.Internals.ObjectManager.Pet.IsValid ||
                WoW.Internals.ObjectManager.Pet.IsDead)
            {
                PleaseBringMyPetBack();
            }
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.Etrap)
                         && !IsCasting)
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Etrap);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if (Pet.HealthPercent < 80 && !Pet.HasAuraById((int)Auras.MendPet) && AI.Controllers.Spell.CanCast((int)Spells.MendPet) && Pet.IsAlive)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MendPet);
            return;
            }

            //	if (ME.UnitsAttackingMe >= 1 && !ME.HasAuraById((int)Auras.Misdirection) && AI.Controllers.Spell.CanCast((int)Spells.Misdirect))
            //			{
            //               Anthrax.WoW.Internals.Chat.SendMessage("/click BT4Button9");
            //               return;
            //            }

            if (ME.HasAuraById((int)Auras.T162P) && AI.Controllers.Spell.CanCast((int)Spells.RapidFire))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RapidFire);
                return;
            }
            if (TARGET.MaxHealth >= 30000000 && AI.Controllers.Spell.CanCast((int)Spells.Stampede))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Stampede);
                return;
            }
                //Arcane Shot Capp
            if(Focus >= 90 && AI.Controllers.Spell.CanCast((int)Spells.ArcaneShot))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ArcaneShot);
                return;
            }
            //Serpent Sting
            if(!TARGET.HasAuraById((int)Auras.SerpentSting) && AI.Controllers.Spell.CanCast((int)Spells.SerpentSting) && Environment.TickCount - lastSSTick > 2000)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SerpentSting);
                lastSSTick = Environment.TickCount;
                return;
            }

            //Focus Fire
            if(!ME.HasAuraById((int)Auras.FocusFire) && AI.Controllers.Spell.CanCast((int)Spells.FocusFire) && ME.Auras.Where(x => x.SpellId == (int)Auras.Frenzy && x.StackCount >= 5).Any())
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FocusFire);
                return;
            }
            //KillCommand
            if(AI.Controllers.Spell.CanCast((int)Spells.KillCommand))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.KillCommand);
                return;
            }

            //KillShot
            if(TARGET.HealthPercent < 20 && AI.Controllers.Spell.CanCast((int)Spells.KillShot))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.KillShot);
                return;
            }

            //Glaive Toss
            if(AI.Controllers.Spell.CanCast((int)Spells.GlaiveToss))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.GlaiveToss);
                return;
            }
            //Dire Beast
            if(AI.Controllers.Spell.CanCast((int)Spells.DireBeast))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DireBeast);
                return;
            }

            //Arcane Shot
            if(AI.Controllers.Spell.CanCast((int)Spells.ArcaneShot) && !AI.Controllers.Spell.CanCast((int)Spells.AMurderOfCrows) && !AI.Controllers.Spell.CanCast((int)Spells.KillCommand)
            && !AI.Controllers.Spell.CanCast((int)Spells.DireBeast) && !AI.Controllers.Spell.CanCast((int)Spells.GlaiveToss) && Focus > 35)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ArcaneShot);
                return;
            }

                //CobraShot
            if(Focus <= 40 && AI.Controllers.Spell.CanCast((int)Spells.CobraShot) && Environment.TickCount - lastCSTick > 1800)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CobraShot);
                lastCSTick = Environment.TickCount;
                return;
            }

            }//Spec Check
                                                ///////////////////////////Survival////////////////////////
            if (ME.HasAuraById((int)Auras.SurvivalCheck))
            { //Spec Check

            ///Pet Controls

            if (!WoW.Internals.ObjectManager.Pet.IsValid ||
                WoW.Internals.ObjectManager.Pet.IsDead)
            {
                PleaseBringMyPetBack();
            }
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.Etrap)
                         && !IsCasting)
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Etrap);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if (Pet.HealthPercent < 80 && !Pet.HasAuraById((int)Auras.MendPet) && AI.Controllers.Spell.CanCast((int)Spells.MendPet) && Pet.IsAlive)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MendPet);
            return;
            }

            if (ME.HasAuraById((int)Auras.T162P) && AI.Controllers.Spell.CanCast((int)Spells.RapidFire))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RapidFire);
                return;
            }

            if (TARGET.MaxHealth >= 30000000 && AI.Controllers.Spell.CanCast((int)Spells.Stampede))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Stampede);
                return;
            }
            //A Murder Of Crows
            if(AI.Controllers.Spell.CanCast((int)Spells.AMurderOfCrows))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AMurderOfCrows);
                return;
            }
            //Serpent Sting
            if(!TARGET.HasAuraById((int)Auras.SerpentSting) && AI.Controllers.Spell.CanCast((int)Spells.SerpentSting) && Environment.TickCount - lastSSTick > 2000)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SerpentSting);
                lastSSTick = Environment.TickCount;
                return;
            }

            //Arcane Shot Capp
            if(Focus >= 90 && AI.Controllers.Spell.CanCast((int)Spells.ArcaneShot))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ArcaneShot);
                return;
            }

            //Explosive Shot
            if(ME.HasAuraById((int)Auras.ES) && AI.Controllers.Spell.CanCast((int)Spells.ExplosiveShot)
            || Focus >= 25 && AI.Controllers.Spell.CanCast((int)Spells.ExplosiveShot))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ExplosiveShot);
                return;
            }
            //Glaive Toss
            if(Focus >= 15 && AI.Controllers.Spell.CanCast((int)Spells.GlaiveToss))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.GlaiveToss);
                return;
            }
            //KillShot
            if(TARGET.HealthPercent < 20 && AI.Controllers.Spell.CanCast((int)Spells.KillShot))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.KillShot);
                return;
            }
            //Dire Beast
            if(AI.Controllers.Spell.CanCast((int)Spells.DireBeast))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DireBeast);
                return;
            }
            //Black Arrow
            if(Focus >= 35 && AI.Controllers.Spell.CanCast((int)Spells.BlackArrow))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BlackArrow);
                return;
            }
            //Arcane Shot
            if(AI.Controllers.Spell.CanCast((int)Spells.ArcaneShot) && !AI.Controllers.Spell.CanCast((int)Spells.AMurderOfCrows) && !AI.Controllers.Spell.CanCast((int)Spells.BlackArrow)
            && !AI.Controllers.Spell.CanCast((int)Spells.DireBeast) && !AI.Controllers.Spell.CanCast((int)Spells.GlaiveToss) && !AI.Controllers.Spell.CanCast((int)Spells.ExplosiveShot) && Focus > 35)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ArcaneShot);
                return;
            }

            //CobraShot
            if(Focus <= 60 && AI.Controllers.Spell.CanCast((int)Spells.CobraShot) && Environment.TickCount - lastCSTick > 1700)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CobraShot);
                lastCSTick = Environment.TickCount;
                return;
            }

            } //End of Spec Check
            } //Combat Check
        }
示例#32
0
        private void castNextSpellbyAOEPriority(WowUnit TARGET)
        {
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }

            if (TARGET.Health >= 1 && ME.InCombat)
            {

                    if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }
                            //Engineering Gloves
            if (!ME.HasAuraById((int)Auras.SSprings) && Environment.TickCount - lastSSTick > 20000 )
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Synapse Srpings Used!!!");
              lastSSTick = Environment.TickCount;
              return;
              }

            /////////////////////////////////////////////////////////////////////////////////////Unholy////////////////////////////////////////////////////////////////////////////////////////

            //Out Of Combat Pet Revive

            if (!WoW.Internals.ObjectManager.Pet.IsAlive && ME.HasAuraById((int)Auras.UnholyCheck) && !ME.IsMounted)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SummonPet);
                return;
            }

                            ///Death and Decay on Alt Press
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            //Rotation
            if (TARGET.Health >= 1 && ME.InCombat)
            {
            if (ME.HasAuraById((int)Auras.UnholyCheck))
            {

            ///Death and Decay on Alt Press
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }
                if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }
            //Dots//

            if (!TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike)
            || TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && ME.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft <= 3000).Any() )
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                return;
            }

            //Dark Transformation
            if (AI.Controllers.Spell.CanCast((int)Spells.DarkT) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) >= 1)
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DarkT);
                    return;
                }

            //BloodBoil Spam

            if (AI.Controllers.Spell.CanCast((int)Spells.BloodBoil))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodBoil);
                    return;
                }

            //Runic Power Cap
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 &&
                    AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathCoil);
                    return;
                }

            //Death Coil
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 32 &&
                    AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathCoil);
                    return;
                }

            //Horn of Winter
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) < 90 &&
                    AI.Controllers.Spell.CanCast((int)Spells.HoW))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                    return;
                }

            //BloodTap
            if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodTap))
            {
            if (ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) <= 1
            || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Frost) <= 1
            || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) <= 1
            || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Death) < 1)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
            return;
            }
            }
            //Death Coil
            if (AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathCoil);
                    return;
                }

            //Scourge Strike if less then 90 runic power
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) < 90 &&
                    AI.Controllers.Spell.CanCast((int)Spells.IcyTouch) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Frost) >= 1)
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.IcyTouch);
                    return;
                }

            //Scourge Strike if less then 90 runic power
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) < 90
            && AI.Controllers.Spell.CanCast((int)Spells.ScourgeStrike) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) > 1
            || Anthrax.WoW.Internals.Cooldown.GetCooldowns().Where(x => x.SpellId == (int)Spells.DnD).First().TimeLeft >= 7000
            && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) < 90
            && AI.Controllers.Spell.CanCast((int)Spells.ScourgeStrike)
            && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) >= 1)
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ScourgeStrike);
                    return;
                }

            }//end Combat
            }//end spec check

            ////////////////////////////////////////////////////////////////////////////////////Blood Spec//////////////////////////////////////////////////////////////////////////////////////
            if (TARGET.Health >= 1 && ME.InCombat)
            {
            if (ME.HasAuraById((int)Auras.BloodCheck))
            {

            if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }

            // Bone Shield
            if ((!ME.HasAuraById((int)Auras.BoneShield) ||
                ME.Auras.Where(x => x.SpellId == (int)Auras.BoneShield && x.StackCount <= 1).Any()) &&
            AI.Controllers.Spell.CanCast((int)Spells.BoneShield))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BoneShield);
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

                // Rune Strike
                if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 &&
                    AI.Controllers.Spell.CanCast((int)Spells.RuneStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RuneStrike);
                    return;
                }

            // Horn of Winter
            if (!ME.HasAuraById((int)Auras.HoW) &&
            AI.Controllers.Spell.CanCast((int)Spells.HoW))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
            }

             // Deseases
            if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak) || !TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Outbreak);
                return;
                }
            //Icy Touch
                if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.IcyTouch)
                && !TARGET.Auras.Where(x => x.SpellId == ((int)Auras.FrostFever) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.IcyTouch);
                            return;
                        }
            //Plague Strike
                 if (!TARGET.HasAuraById((int)Auras.BloodPlague)
                 && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike)
                 && !TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                            return;
                        }

            //DeathStrike
                if (!ME.HasAuraById((int)Auras.BloodShield) && TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.DeathStrike)
                || ME.HasAuraById((int)Auras.BloodShield) && ME.Auras.Where(x => x.SpellId == (int)Auras.BloodShield && x.TimeLeft <= 7000).Any() && AI.Controllers.Spell.CanCast((int)Spells.DeathStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathStrike);
                    return;
                }

            //Blood Boil
                if ((TARGET.Auras.Where(x => x.SpellId == (int)Auras.FrostFever && x.TimeLeft < 8000).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodBoil)
                && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.FrostFever) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
                || TARGET.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft < 8000).Any()) && AI.Controllers.Spell.CanCast((int)Spells.BloodBoil)
                && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
                || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 2 && TARGET.HasAuraById((int)Auras.BloodPlague)
                || ME.HasAuraById((int)Auras.CS) && TARGET.Position.Distance3DFromPlayer < 13
                && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()//CS Proc
                || AI.Controllers.Spell.CanCast((int)Spells.BloodBoil) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 1
                && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodBoil);
                    return;
                }

            //SoulReaper
                if (TARGET.HealthPercent <= 35 && AI.Controllers.Spell.CanCast((int)Spells.SoulReaperBlood)
                && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 1
                && !TARGET.HasAuraById((int)Auras.SRB))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulReaperBlood);
                    return;
                }

            //Bloodtap
            if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodTap))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
            return;
            }

            // Rune Strike
                if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) > 29 &&
                    AI.Controllers.Spell.CanCast((int)Spells.RuneStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RuneStrike);
                    return;
                }

            // Horn of Winter
            if (AI.Controllers.Spell.CanCast((int)Spells.HoW))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
            }
            }
            }
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////FROST SPEC//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.FrostCheck))
            {

                ///Death and Decay on Alt Press
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }
                if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }

            //Frost Strike if over 89 Runic Power
            if (ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike) ||
            ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 20 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike) && ME.HasAuraById((int)Auras.KillingM))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                return;
                }
            //Pillar Of Frost
                if (!ME.HasAuraById((int)Auras.PoF) && AI.Controllers.Spell.CanCast((int)Spells.PoF))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PoF);
                }

            if (TARGET.Position.Distance3DFromPlayer < 15 && AI.Controllers.Spell.CanCast((int)Spells.UnholyBlight))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.UnholyBlight);
                    return;
                }
            //Howling Blast on Cooldown
            if (AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast)
            || ME.HasAuraById((int)Auras.Rime))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                    return;
                }

            //Blood Plague Check
            if (AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && !TARGET.HasAuraById((int)Auras.BloodPlague)
            || AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && ME.GetReadyRuneCountByType (WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) > 1)
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                return;
                }

            //Howling Blast
            if (AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                    return;
                }

            //Frost Strike
                if (ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 20 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                return;
                }
            //Horn of Winter
                if (AI.Controllers.Spell.CanCast((int)Spells.HoW))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
                }
            if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any())
            {
            //AI.Controllers.Spell.Cast((int)Spells.BloodTap, TARGET);
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
            return;
            }

            }
            }
        }
示例#33
0
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            /////////////////////////////////////////////////////////////////////////////////////Unholy////////////////////////////////////////////////////////////////////////////////////////

            //Out Of Combat Pet Revive

            if (!WoW.Internals.ObjectManager.Pet.IsAlive && ME.HasAuraById((int)Auras.UnholyCheck) && !ME.IsMounted)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SummonPet);
                return;
            }

            if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }

                ///Death and Decay on Alt Press
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            //Rotation
            if (TARGET.Health >= 1 && ME.InCombat)
            {

            //Engineering Gloves
            if (!ME.HasAuraById((int)Auras.SSprings) && Environment.TickCount - lastSSTick > 20000 )
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Synapse Srpings Used!!!");
              lastSSTick = Environment.TickCount;
              return;
              }
            if (ME.HasAuraById((int)Auras.UnholyCheck))
            {

            ///Death and Decay on Alt Press
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }

            //Unholy Strengh for Massive Dot Dps!
            if (ME.HasAuraById((int)Auras.Str1) && ME.HasAuraById((int)Auras.Str2) && AI.Controllers.Spell.CanCast((int)Spells.UnholyFrenzy))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.UnholyFrenzy);
                    return;
                }

            //GARGOYLE!!!
            if (ME.HasAuraById((int)Auras.Str1) && ME.HasAuraById((int)Auras.Str2) && AI.Controllers.Spell.CanCast((int)Spells.Garg) && ME.HasAuraById((int)Auras.UnholyF))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Garg);
                    return;
                }

            //Dots//
            if (TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
            && AI.Controllers.Spell.CanCast((int)Spells.Outbreak) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft <= 6000).Any())
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Outbreak);
                return;
            }

            if (!TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike)
            && !TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
            || TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft <= 3000).Any()
            && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                return;
            }

            //Rebuffing Dots if Higher DPS
            if (TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && ME.HasAuraById((int)Auras.UnholyF) && Environment.TickCount - lastDeathSTick > 8000
            && ME.HasAuraById((int)Auras.Str1) && ME.HasAuraById((int)Auras.Str2)
            || ME.HasAuraById((int)Auras.Str1) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && Environment.TickCount - lastDeathSTick > 8000
            || ME.HasAuraById((int)Auras.Str2) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && Environment.TickCount - lastDeathSTick > 8000
            || ME.HasAuraById((int)Auras.Str1) && ME.HasAuraById((int)Auras.Str2) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && Environment.TickCount - lastDeathSTick > 8000
            || ME.Auras.Where(x => x.SpellId == (int)Auras.DeathS && x.StackCount >= 8).Any() && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && Environment.TickCount - lastDeathSTick > 8000)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                lastDeathSTick = Environment.TickCount;
                return;
            }
            //Dark Transformation
            if (AI.Controllers.Spell.CanCast((int)Spells.DarkT) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) >= 1)
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DarkT);
                    return;
                }

            //Runic Power Cap
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 &&
                    AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathCoil);
                    return;
                }

            //Soul Reaper if target health at or below 35%
            if (TARGET.HealthPercent <= 35 && AI.Controllers.Spell.CanCast((int)Spells.SoulReaperUnholy) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) >= 1 )
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulReaperUnholy);
                    return;
                }

            //Death Coil
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 32 &&
                    AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathCoil);
                    return;
                }

            //Scourge Strike if less then 90 runic power
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) < 90 &&
                    AI.Controllers.Spell.CanCast((int)Spells.ScourgeStrike) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.FrostFever && x.TimeLeft >= 3000).Any()
            || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) >= 2 && AI.Controllers.Spell.CanCast((int)Spells.ScourgeStrike)
            || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Death) >= 1)
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ScourgeStrike);
                    return;
                }

            //Festering Strike if less the 90 Runic Power
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) < 90 && AI.Controllers.Spell.CanCast((int)Spells.FesteringStrike)
            && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
            && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 1
            && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Frost) >= 1)
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FesteringStrike);
                    return;
                }
            //Festering Strike if less the 90 Runic Power
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) < 90 &&
                    AI.Controllers.Spell.CanCast((int)Spells.HoW))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                    return;
                }

            //BloodTap
            if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodTap))
            {
            if (ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) <= 1
            || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Frost) <= 1
            || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) <= 1
            || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Death) < 1)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
            return;
            }
            }
            //Death Coil
            if (AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathCoil);
                    return;
                }

            //end Combat
            }//end spec check
            ////////////////////////////////////////////////////////////////////////////////////Blood Spec//////////////////////////////////////////////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.BloodCheck))
            {
            //Conversion
            if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }

            //RuneTap
            if (ME.HealthPercent <= CCSettings.RuneTap && AI.Controllers.Spell.CanCast((int)Spells.RuneTap) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 1
            && Environment.TickCount - lastRuneTapTick > 2000
            || ME.HealthPercent <= CCSettings.RuneTap && AI.Controllers.Spell.CanCast((int)Spells.RuneTap) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Death) >= 3
            && Environment.TickCount - lastRuneTapTick > 2000)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RuneTap);
                lastRuneTapTick = Environment.TickCount;
                return;
            }

            // Bone Shield
            if ((!ME.HasAuraById((int)Auras.BoneShield) ||
                ME.Auras.Where(x => x.SpellId == (int)Auras.BoneShield && x.StackCount <= 1).Any()) &&
            AI.Controllers.Spell.CanCast((int)Spells.BoneShield))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BoneShield);
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

                // Rune Strike
                if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 &&
                    AI.Controllers.Spell.CanCast((int)Spells.RuneStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RuneStrike);
                    return;
                }

            // Horn of Winter
            if (!ME.HasAuraById((int)Auras.HoW) &&
            AI.Controllers.Spell.CanCast((int)Spells.HoW))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
            }

             // Deseases
            if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak) || !TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Outbreak);
                return;
                }
            //Icy Touch
                if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.IcyTouch)
                && !TARGET.Auras.Where(x => x.SpellId == ((int)Auras.FrostFever) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.IcyTouch);
                            return;
                        }
            //Plague Strike
                 if (!TARGET.HasAuraById((int)Auras.BloodPlague)
                 && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike)
                 && !TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                            return;
                        }

                if (!ME.HasAuraById((int)Auras.BloodShield) && TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.DeathStrike)
                || ME.HasAuraById((int)Auras.BloodShield) && ME.Auras.Where(x => x.SpellId == (int)Auras.BloodShield && x.TimeLeft <= 7000).Any() && AI.Controllers.Spell.CanCast((int)Spells.DeathStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathStrike);
                    return;
                }

            //Bloodtap
            if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodTap) && Environment.TickCount - lastBTTick > 2000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
            lastBTTick = Environment.TickCount;
            return;
            }
            //Blood Boil
                if ((TARGET.Auras.Where(x => x.SpellId == (int)Auras.FrostFever && x.TimeLeft < 8000).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodBoil)
                && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.FrostFever) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
                || TARGET.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft < 8000).Any()) && AI.Controllers.Spell.CanCast((int)Spells.BloodBoil)
                && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
                || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 2 && TARGET.HasAuraById((int)Auras.BloodPlague)
                || ME.HasAuraById((int)Auras.CS) && TARGET.Position.Distance3DFromPlayer < 13) //CS Proc
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodBoil);
                    return;
                }

            //Blood Boil
                if (ME.UnitsAttackingMe.Count >= 4)
                {
                    if ((TARGET.Auras.Where(x => x.SpellId == (int)Auras.FrostFever && x.TimeLeft < 8000).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodBoil)
                    && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.FrostFever) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
                    || TARGET.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft < 8000).Any()) && AI.Controllers.Spell.CanCast((int)Spells.BloodBoil)
                    && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
                    || ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 2 && TARGET.HasAuraById((int)Auras.BloodPlague)
                    || ME.HasAuraById((int)Auras.CS) && TARGET.Position.Distance3DFromPlayer < 13
                    && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()//CS Proc
                    || AI.Controllers.Spell.CanCast((int)Spells.BloodBoil) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 1
                    && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.BloodPlague) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodBoil);
                        return;
                    }
                }
                //SoulReaper
                if (TARGET.HealthPercent <= 35 && AI.Controllers.Spell.CanCast((int)Spells.SoulReaperBlood)
                && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 1
                && !TARGET.HasAuraById((int)Auras.SRB))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulReaperBlood);
                    return;
                }
                // Heart Strike
                if (ME.UnitsAttackingMe.Count <= 3)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.HS) && ME.GetReadyRuneCountByType(WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Blood) >= 1)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HS);
                        return;
                    }
                }

            // Rune Strike
                if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) > 29 &&
                    AI.Controllers.Spell.CanCast((int)Spells.RuneStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RuneStrike);
                    return;
                }

            // Horn of Winter
            if (AI.Controllers.Spell.CanCast((int)Spells.HoW))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
            }

            }
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////FROST 2Hn SPEC//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.FrostCheck) && !TARGET.HasAuraById((int)Auras.DWCheck))
            {
            // Horn of Winter
            if (!ME.HasAuraById((int)Auras.HoW) &&
            AI.Controllers.Spell.CanCast((int)Spells.HoW))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }

            // We always want to face the target
            //WoW.Internals.Movements.Face(TARGET.Position);

            if (ME.HealthPercent < 30)
            {
                // Death Strike
                if (AI.Controllers.Spell.CanCast((int)Spells.DeathStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeathStrike);
                    return;
                }

            }

            if (TARGET.Position.Distance3DFromPlayer > 10)
            {
                if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak) || !TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Outbreak);
                return;
                }
            }

                // Frost Strike
                if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 &&
                    AI.Controllers.Spell.CanCast((int)Spells.FrostStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                    return;
                }

                //Pillar Of Frost
                if (!ME.HasAuraById((int)Auras.PoF) && AI.Controllers.Spell.CanCast((int)Spells.PoF))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PoF);
                }
                // Deseases

                if (ME.HasAuraById((int)Auras.Rime))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                    return;
                }

                if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast)
                || TARGET.HasAuraById((int)Auras.FrostFever) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.FrostFever && x.TimeLeft <= 5000).Any())
                    {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                    return;
                    }

                    if (!TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike)
                    ||  TARGET.HasAuraById((int)Auras.BloodPlague) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft <= 5000).Any() )
                    {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                    return;
                    }

                 // Obliterate
                if (AI.Controllers.Spell.CanCast((int)Spells.Obliterate))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Obliterate);
                    return;
                }

            //Soul Reaper if Target Health below 35%
            if (AI.Controllers.Spell.CanCast((int)Spells.SoulReaperFrost) && TARGET.HealthPercent < 35)
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulReaperFrost);
                return;
                }

                // Frost Strike
                if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 20 &&
                    AI.Controllers.Spell.CanCast((int)Spells.FrostStrike))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                    return;
                }

                // Horn of Winter
            if (AI.Controllers.Spell.CanCast((int)Spells.HoW))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
            }

            if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any() && AI.Controllers.Spell.CanCast((int)Spells.BloodTap))
            {
            //AI.Controllers.Spell.Cast((int)Spells.BloodTap, TARGET);
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
            return;
            }

            else
            {
                // Death Coil
                if (TARGET.HealthPercent < 10 &&
                    AI.Controllers.Spell.CanCast((int)Spells.DeathCoil))
                {
                    AI.Controllers.Spell.UseShapeshiftForm((int)Spells.DeathCoil);
                    return;
                }

               // AI.Controllers.Mover.MoveToObject(TARGET);
            }

            AI.Controllers.Spell.AttackTarget();
            // No cast processed
            // We should do a "Right Click" on the TARGET here if we are not in combat
            // in order to auto attack it.

            }
            ////////////////////////////////DW FROST  Written By schmiddi/////////////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.FrostCheck) && TARGET.HasAuraById((int)Auras.DWCheck))
            {

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.DnD))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DnD);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

                        if(ME.HealthPercent <= CCSettings.Conversion && AI.Controllers.Spell.CanCast((int)Spells.Conversion) && ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 10
            && Environment.TickCount - lastConversionTick > 2000 && !ME.HasAuraById((int)Auras.Conversion))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conversion);
                lastConversionTick = Environment.TickCount;
                return;
            }
            //Frost Strike if over 89 Runic Power
            if (ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 89 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike) ||
            ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 20 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike) && ME.HasAuraById((int)Auras.KillingM))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                return;
                }

                if (!TARGET.HasAuraById((int)Auras.FrostFever) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak) || !TARGET.HasAuraById((int)Auras.BloodPlague) && AI.Controllers.Spell.CanCast((int)Spells.Outbreak))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Outbreak);
                return;
                }

            //Pillar Of Frost
                if (!ME.HasAuraById((int)Auras.PoF) && AI.Controllers.Spell.CanCast((int)Spells.PoF)
                && ME.GetReadyRuneCountByType (WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Frost) >= 1
                || !ME.HasAuraById((int)Auras.PoF) && AI.Controllers.Spell.CanCast((int)Spells.PoF)
                && ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) > 15)
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PoF);
                }

                //Engineering Gloves
            if (!ME.HasAuraById((int)Auras.SSprings) && Environment.TickCount - lastSSTick > 20000 )
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Synapse Srpings Used!!!");
              lastSSTick = Environment.TickCount;
              return;
              }

            //Howling Blast on Cooldown
            if (AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                    return;
                }
            //Soul Reaper if Target Health below 35%
            if (AI.Controllers.Spell.CanCast((int)Spells.SoulReaperFrost) && TARGET.HealthPercent < 35)
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulReaperFrost);
                return;
                }
            //Blood Plague Check
            if (AI.Controllers.Spell.CanCast((int)Spells.PlagueStrike) && !TARGET.HasAuraById((int)Auras.BloodPlague)
            || TARGET.HasAuraById((int)Auras.BloodPlague) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.BloodPlague && x.TimeLeft <= 5000).Any()
            || ME.GetReadyRuneCountByType (WoW.Classes.ObjectManager.WowLocalPlayer.WowRuneType.Unholy) >= 1)
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PlagueStrike);
                return;
                }

            if (AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast) && !TARGET.HasAuraById((int)Auras.FrostFever)
            || TARGET.HasAuraById((int)Auras.FrostFever) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.FrostFever && x.TimeLeft <= 5000).Any() )
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                return;
                }

            //Howling Blast
            if (AI.Controllers.Spell.CanCast((int)Spells.HowlingBlast))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HowlingBlast);
                    return;
                }
            //Frost Strike
                if (ME.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.RunicPower) >= 20 && AI.Controllers.Spell.CanCast((int)Spells.FrostStrike))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrostStrike);
                return;
                }
            //Horn of Winter
                if (AI.Controllers.Spell.CanCast((int)Spells.HoW))
                {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
                }
            if (ME.Auras.Where(x => x.SpellId == (int)Auras.BloodTap && x.StackCount >= 5).Any())
            {
            //AI.Controllers.Spell.Cast((int)Spells.BloodTap, TARGET);
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BloodTap);
            return;
            }
              }
            }
        }
示例#34
0
文件: ADruid.cs 项目: KohaPE/Combats
        private void castNextSpellbyAOEPriority(WowUnit TARGET)
        {
            var MyRage = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Rage);
            var MyEnergy = ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Energy);

            if (!ME.InCombat && !ME.HasAuraById((int)Auras.Prowl) && Environment.TickCount - lastStealthTick > 2000 && ME.HasAuraById((int)Auras.FeralCheck) && !ObjectManager.LocalPlayer.IsMounted && !ME.HasAuraById((int)Auras.FForm))
             {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Prowl);
            lastStealthTick = Environment.TickCount;
            return;
            }

            if (ME.HasAuraById((int)Auras.GlyphofS) && TARGET.Position.Distance3DFromPlayer < 20 && AI.Controllers.Spell.CanCast((int)Spells.SavageRoar) && !ME.HasAuraById((int)Auras.SavageRoar)
            && ME.HasAuraById((int)Auras.CatForm))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageRoar);
                    return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.Pounce) && !WoW.Internals.ObjectManager.LocalPlayer.IsBehindUnit(WoW.Internals.ObjectManager.Target) && TARGET.Position.Distance3DFromPlayer < 8)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Pounce);
                    return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.Ravage) && WoW.Internals.ObjectManager.LocalPlayer.IsBehindUnit(WoW.Internals.ObjectManager.Target) && TARGET.Position.Distance3DFromPlayer < 8)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Ravage);
                    return;
            }

            if (TARGET.Health >= 1 && ME.InCombat)
            {

                    //Engineering Gloves
            if (!ME.HasAuraById((int)Auras.SSprings) && Environment.TickCount - lastSSTick > 20000 )
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Synapse Srpings Used!!!");
              lastSSTick = Environment.TickCount;
              return;
              }

            if (ME.HasAuraById((int)Auras.TankCheck))
            {
            //Healing & Survival
            {
            if (ME.HealthPercent < CCSettings.FrenzyRegen && AI.Controllers.Spell.CanCast((int)Spells.FrenzyRegen))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrenzyRegen);
                return;
            }

            if (ME.HealthPercent < CCSettings.Barkskin && AI.Controllers.Spell.CanCast((int)Spells.Barkskin))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Barkskin);
                return;
            }
            if (MyRage >= 60 && AI.Controllers.Spell.CanCast((int)Spells.SavageD) && !ME.HasAuraById((int)Auras.SavageD))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageD);
                return;
            }
            if (ME.HasAuraById((int)Auras.DoC))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealingTouch);
                return;
            }

            if (TARGET.Position.Distance3DFromPlayer < 5)
            {
            if (AI.Controllers.Spell.CanCast((int)Spells.Thrash) && !TARGET.HasAuraById((int)Auras.Thrash))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Thrash);
                return;
            }

            //Swipe
            if (AI.Controllers.Spell.CanCast((int)Spells.Swipe))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Swipe);
                return;
            }

            //Mangle!!!
            if (AI.Controllers.Spell.CanCast((int)Spells.MangleBear))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MangleBear);
                return;
            }

            //Maul With Procs
            if (AI.Controllers.Spell.CanCast((int)Spells.Maul))
            {
            if (ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Rage) >= 90 || ME.HasAuraById((int)Auras.TAC) && ME.HasAuraById((int)Auras.SavageD))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Maul);
                return;
            }
            }

            //Thrash Debuff
            if (AI.Controllers.Spell.CanCast((int)Spells.Thrash))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Thrash);
                return;
            }

            }
            }
            }
            /////////////////////////////////////////////////////////////////////////////////Boomkin///////////////////////////////////////////////////////////////////////////////////////////////
            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.BoomkinCheck))
            {
            //Healing & Survival
            if(TARGET.Position.Distance3DFromPlayer <= 40 && !ME.IsCasting)
            {
                // Rejuvenation
                if (ME.HealthPercent <= 50 &&
                    !ME.HasAuraById((int)Auras.Rejuvenation) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Rejuvenation))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rejuvenation);
                    return;
                }

                if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 80 && AI.Controllers.Spell.CanCast((int)Spells.Innervate))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Innervate);
                        return;
                    }

                if (ME.HasAuraById((int)Auras.ShootingStars) && AI.Controllers.Spell.CanCast((int)Spells.Starsurge))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Starsurge);
                    return;
                }

                                                // Moonfire
                if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 9000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                    return;
                }

                // Sunfire
                if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 9000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                    return;
                }

                // StarFall
                if (AI.Controllers.Spell.CanCast((int)Spells.StarFall))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFall);
                    return;
                }

                if (ME.HasAuraById((int)Auras.AstralInsight) && AI.Controllers.Spell.CanCast((int)Spells.AstralC))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AstralC);
                    return;
                }

                // Starsurge
                if (AI.Controllers.Spell.CanCast((int)Spells.Starsurge))
                {

                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Starsurge);

                    return;
                }

                 // Solar
            if (ME.HasAuraById((int)Auras.EclipseSolar))
            {

                if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 9000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                    return;
                }

                if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 9000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                    return;
                }

                if (AI.Controllers.Spell.CanCast((int)Spells.Wrath))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Wrath);
                    return;
                }
            }
                // Lunar
            if (ME.HasAuraById((int)Auras.EclipseLunar))
            {
                if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 9000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                    return;
                }

                if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 9000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                    return;
                }

                if (AI.Controllers.Spell.CanCast((int)Spells.StarFire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                    return;
                }
            }
                // Wrath
                if(AI.Controllers.Spell.CanCast((int)Spells.Wrath) && ME.HasAuraById((int)Auras.EMSolar))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Wrath);
                    return;
                }
                // Starfire
                if(AI.Controllers.Spell.CanCast((int)Spells.StarFire) && ME.HasAuraById((int)Auras.EMLunar))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                    return;
                }

                if(AI.Controllers.Spell.CanCast((int)Spells.StarFire) && !ME.HasAuraById((int)Auras.EMLunar) && !ME.HasAuraById((int)Auras.EMLunar))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                    return;
                }

            }
            }

            ////////////////////////////////////////////////////////////////FERAL//////////////////////////////////////////////
            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.FeralCheck))
            {

            if (ME.HasAuraById((int)Auras.Prowl))
            {

            if (AI.Controllers.Spell.CanCast((int)Spells.Ravage) && WoW.Internals.ObjectManager.LocalPlayer.IsBehindUnit(WoW.Internals.ObjectManager.Target))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Ravage);
                    return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.Pounce))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Pounce);
                    return;
            }
            }

            if (ME.HasAuraById((int)Auras.GlyphofS) && !ME.HasAuraById((int)Auras.SavageRoar) && AI.Controllers.Spell.CanCast((int)Spells.SavageRoar))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageRoar);
                    return;
            }

            if (!ME.HasAuraById((int)Auras.SavageRoar) && AI.Controllers.Spell.CanCast((int)Spells.SavageRoar) && ME.ComboPoints > 1)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageRoar);
                    return;
            }

            if (ME.HasAuraById((int)Auras.PredSwiftness) && AI.Controllers.Spell.CanCast((int)Spells.HealingTouch))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealingTouch);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.Thrash) && AI.Controllers.Spell.CanCast((int)Spells.ThrashFeral)
            || ME.HasAuraById((int)Auras.DoC) && AI.Controllers.Spell.CanCast((int)Spells.ThrashFeral) && ME.Auras.Where(x => x.SpellId == (int)Auras.DoC && x.StackCount >= 4).Any())
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ThrashFeral);
            }

            if (MyEnergy <= 30 && AI.Controllers.Spell.CanCast((int)Spells.TigerFury))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerFury);
            }

            if (ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.SwipeFeral) && MyEnergy > 45
            || ME.HasAuraById((int)Auras.CC) && AI.Controllers.Spell.CanCast((int)Spells.SwipeFeral))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SwipeFeral);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.Rip) && AI.Controllers.Spell.CanCast((int)Spells.Rip) && ME.ComboPoints > 4)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rip);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.Rake) && AI.Controllers.Spell.CanCast((int)Spells.Rake) && ME.ComboPoints <= 4
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rake && x.TimeLeft < 4000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Rake))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rake);
                    return;
            }

            }
            }
        }
示例#35
0
文件: ADruid.cs 项目: KohaPE/Combats
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var MyRage = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Rage);
            var MyEnergy = ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Energy);

             if (!ME.InCombat && !ME.HasAuraById((int)Auras.Prowl) && Environment.TickCount - lastStealthTick > 2000 && ME.HasAuraById((int)Auras.FeralCheck) && !ObjectManager.LocalPlayer.IsMounted && !ME.HasAuraById((int)Auras.FForm))
             {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Prowl);
            lastStealthTick = Environment.TickCount;
            return;
            }

            if (ME.HasAuraById((int)Auras.GlyphofS) && TARGET.Position.Distance3DFromPlayer < 15 && AI.Controllers.Spell.CanCast((int)Spells.SavageRoar) && !ME.HasAuraById((int)Auras.SavageRoar)
            && ME.HasAuraById((int)Auras.CatForm))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageRoar);
                    return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.Pounce) && !WoW.Internals.ObjectManager.LocalPlayer.IsBehindUnit(WoW.Internals.ObjectManager.Target) && TARGET.Position.Distance3DFromPlayer < 8)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Pounce);
                    return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.Ravage) && WoW.Internals.ObjectManager.LocalPlayer.IsBehindUnit(WoW.Internals.ObjectManager.Target) && TARGET.Position.Distance3DFromPlayer < 8)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Ravage);
                    return;
            }

            if (TARGET.Health >= 1 && ME.InCombat)
            {

            /////////////////////////////////////////////////////////////////////////////TANK SPEC////////////////////////////////////////////////////////////////////////////////
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                        ///////////Cat Form In Tank Spec//////////////
            if (ME.HasAuraById((int)Auras.CatForm) && ME.HasAuraById((int)Auras.TankCheck))
            {
            if (ME.HasAuraById((int)Auras.Prowl))
            {
            if (AI.Controllers.Spell.CanCast((int)Spells.Pounce) && Anthrax.WoW.Internals.Movements.IsFacingHeading(ObjectManager.Target.Position) && TARGET.Position.Distance3DFromPlayer < 8)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Pounce);
                    return;
            }
            else
            if (AI.Controllers.Spell.CanCast((int)Spells.Ravage) && TARGET.Position.Distance3DFromPlayer < 8)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Ravage);
                    return;
            }

            }

            if (!ME.HasAuraById((int)Auras.Prowl))
            {
            if (ME.HasAuraById((int)Auras.PredSwiftness) && AI.Controllers.Spell.CanCast((int)Spells.HealingTouch))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealingTouch);
                    return;
            }

            //Engineering Gloves
            if (!ME.HasAuraById((int)Auras.SSprings) && Environment.TickCount - lastSSTick > 20000 )
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Synapse Srpings Used!!!");
              lastSSTick = Environment.TickCount;
              return;
              }

            if (TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rip && x.TimeLeft > 6000).Any() && AI.Controllers.Spell.CanCast((int)Spells.FeroBite) && ME.ComboPoints > 4
            || TARGET.HealthPercent < 25 && ME.ComboPoints > 4 && TARGET.HasAuraById((int)Auras.Rip) && AI.Controllers.Spell.CanCast((int)Spells.FeroBite))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FeroBite);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.Rip) && AI.Controllers.Spell.CanCast((int)Spells.Rip) && ME.ComboPoints > 4
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rip && x.TimeLeft < 3000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Rip) && ME.ComboPoints > 4 && AI.Controllers.Spell.CanCast((int)Spells.Rip)
            || ME.HasAuraById((int)Auras.DoC) && ME.Auras.Where(x => x.SpellId == (int)Auras.DoC && x.StackCount <= 2).Any() && ME.ComboPoints > 4 && AI.Controllers.Spell.CanCast((int)Spells.Rip)
            )
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rip);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.Rake) && AI.Controllers.Spell.CanCast((int)Spells.Rake) && ME.ComboPoints <= 4
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rake && x.TimeLeft < 4000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Rake)
            || ME.HasAuraById((int)Auras.DoC) && ME.Auras.Where(x => x.SpellId == (int)Auras.DoC && x.StackCount >= 2).Any() && ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.Rake))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rake);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.Thrash) && AI.Controllers.Spell.CanCast((int)Spells.ThrashFeral) && TARGET.HasAuraById((int)Auras.Rip) && TARGET.HasAuraById((int)Auras.Rake) && ME.ComboPoints > 3)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ThrashFeral);
            }

            if (!TARGET.HasAuraById((int)Auras.FF) && AI.Controllers.Spell.CanCast((int)Spells.FF))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FF);
            }

            if (ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.MangleFeral))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MangleFeral);
                    return;
            }
            }
            }

                    /////////////////////////////Bear Form///////////////////////////////
            if (ME.HasAuraById((int)Auras.TankCheck))
            {

                //Auto Taunt Code
            //5.3 Raids

            if (AI.Controllers.Spell.CanCast((int)Spells.Growl) && ME.HasAuraById((int)Auras.TankCheck))
            {
            if (!ME.HasAuraById((int)Auras.FengTheAccursed) && TARGET.Name == "Feng the Accursed"
            || TARGET.Name == "Raider's Training Dummy"
            || !ME.HasAuraById((int)Auras.BladeLord) && TARGET.Name == "Blade Lord Ta'yak"
            || !ME.HasAuraById((int)Auras.GrandEmpress) && TARGET.Name == "Grand Empress Shek'zeer"
            || !ME.HasAuraById((int)Auras.Tsulong) && TARGET.Name == "Tsulong"
            || !ME.HasAuraById((int)Auras.LeiShi) && TARGET.Name == "Lei Shi"
            //5.4
            || !ME.HasAuraById((int)Auras.Jinrokh) && TARGET.Name == "Jin'rokh the Breaker"
            || !ME.HasAuraById((int)Auras.JiKun) && TARGET.Name == "Ji-Kun"
            || !ME.HasAuraById((int)Auras.Durumu) && TARGET.Name == "Durumu the Forgotten"
            || !ME.HasAuraById((int)Auras.Primordius) && TARGET.Name == "Primordius"
            || !ME.HasAuraById((int)Auras.IronQon) && TARGET.Name == "Iron Qon"
            || !ME.HasAuraById((int)Auras.TwinConsorts) && TARGET.Name == "Suen"
            || !ME.HasAuraById((int)Auras.LeiShen) && TARGET.Name == "Lei Shen"
            || !ME.HasAuraById((int)Auras.LeiShen2) && TARGET.Name == "Lei Shen"
            || !ME.HasAuraById((int)Auras.LeiShen3) && TARGET.Name == "Lei Shen"
            || !ME.HasAuraById((int)Auras.LieShen4) && TARGET.Name == "Lei Shen"
            //SoO
            || !ME.HasAuraById((int)Auras.Immerseus) && TARGET.Name == "Immerseus"
            || !ME.HasAuraById((int)Auras.Norushen) && TARGET.Name == "Norushen"
            || !ME.HasAuraById((int)Auras.ShaofPride) && TARGET.Name == "Sha of Pride"
            || !ME.HasAuraById((int)Auras.IronJuggernaut) && TARGET.Name == "Iron Juggernaut"
            || !ME.HasAuraById((int)Auras.DarkShamens) && TARGET.Name == "Earthbreaker Haromm"
            || !ME.HasAuraById((int)Auras.DarkShamens) && TARGET.Name == "Wavebinder Kardris"
            || !ME.HasAuraById((int)Auras.Nazgrim) && TARGET.Name == "General Nazgrim"
            || !ME.HasAuraById((int)Auras.Malkorok) && TARGET.Name == "Malkorok"
            || !ME.HasAuraById((int)Auras.BlackFuse) && TARGET.Name == "Siegecrafter Blackfuse"
            || !ME.HasAuraById((int)Auras.Thok) && TARGET.Name == "Thok the Bloodthirsty"
            || !ME.HasAuraById((int)Auras.Thok2) && TARGET.Name == "Thok the Bloodthirsty"
            || !ME.HasAuraById((int)Auras.Thok3) && TARGET.Name == "Thok the Bloodthirsty"
            || !ME.HasAuraById((int)Auras.Garrosh) && TARGET.Name == "Garrosh Hellscream"
            || !ME.HasAuraById((int)Auras.Garrosh2) && TARGET.Name == "Garrosh Hellscream"
            )
            {
              WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Growl);
              Logger.WriteLine("Auto Taunting!!!");
            }
            }
            //Healing & Survival
            {
            if (ME.HealthPercent < CCSettings.CWard && AI.Controllers.Spell.CanCast((int)Spells.CWard) && !ME.HasAuraById((int)Auras.CWard))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CWard);
                return;
            }

            if (ME.HealthPercent < CCSettings.FrenzyRegen && AI.Controllers.Spell.CanCast((int)Spells.FrenzyRegen) && MyRage >= 20)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FrenzyRegen);
                return;
            }

            if (ME.HealthPercent < CCSettings.Barkskin && AI.Controllers.Spell.CanCast((int)Spells.Barkskin))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Barkskin);
                return;
            }

            if (ME.HasAuraById((int)Auras.DoC) && ME.HealthPercent < CCSettings.HealingTouch && AI.Controllers.Spell.CanCast((int)Spells.HealingTouch)
            || ME.Auras.Where(x => x.SpellId == (int)Auras.DoC && x.TimeLeft <= 5000).Any() && AI.Controllers.Spell.CanCast((int)Spells.HealingTouch))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealingTouch);
                return;
            }

            //Engineering Gloves
            if (!ME.HasAuraById((int)Auras.SSprings) && Environment.TickCount - lastSSTick > 20000 )
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Synapse Srpings Used!!!");
              lastSSTick = Environment.TickCount;
              return;
              }

            if (MyRage < CCSettings.Enrage && AI.Controllers.Spell.CanCast((int)Spells.Enrage) && !ME.HasAuraById((int)Auras.CatForm) && ME.HasAuraById((int)Auras.BearForm))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Enrage);
                return;
            }

            if (MyRage >= 60 && AI.Controllers.Spell.CanCast((int)Spells.SavageD) && !ME.HasAuraById((int)Auras.SavageD) && Environment.TickCount - lastSDTick > 3000)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageD);
                lastSDTick = Environment.TickCount;
                return;
            }

                //Maul With Procs
            if (MyRage > 90 && AI.Controllers.Spell.CanCast((int)Spells.Maul) || ME.HasAuraById((int)Auras.TAC) && AI.Controllers.Spell.CanCast((int)Spells.Maul) && ME.HasAuraById((int)Auras.SavageD))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Maul);
                return;
            }

            //Mangle!!!
            if (AI.Controllers.Spell.CanCast((int)Spells.MangleBear))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MangleBear);
                return;
            }

            // Keep Lacerate Debuff on so it doesnt drop off
            if (AI.Controllers.Spell.CanCast((int)Spells.Lacerate) && !TARGET.HasAuraById((int)Auras.Lacerate)
            || AI.Controllers.Spell.CanCast((int)Spells.Lacerate) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.Lacerate && x.TimeLeft <= 4000).Any() )
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Lacerate);
                return;
            }

            //Thrash Debuff
            if (AI.Controllers.Spell.CanCast((int)Spells.Thrash) && !AI.Controllers.Spell.CanCast((int)Spells.Lacerate) && !AI.Controllers.Spell.CanCast((int)Spells.MangleBear))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Thrash);
                return;
            }
            //FaerieFire
            if (!TARGET.HasAuraById((int)Auras.FF) && AI.Controllers.Spell.CanCast((int)Spells.FF) || AI.Controllers.Spell.CanCast((int)Spells.FF))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FF);
                return;
            }

            //Lacerate
            if (AI.Controllers.Spell.CanCast((int)Spells.Lacerate))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Lacerate);
                return;
            }

            }
            }

            /////////////////////////////////////////////////////////////////////////////////Boomkin///////////////////////////////////////////////////////////////////////////////////////////////
            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.BoomkinCheck))
            {
            //Healing & Survival
            if(TARGET.Position.Distance3DFromPlayer <= 40 && !ME.IsCasting)
            {
                // Rejuvenation
                if (ME.HealthPercent <= 50 &&
                    !ME.HasAuraById((int)Auras.Rejuvenation) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Rejuvenation))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rejuvenation);
                    return;
                }

                if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 80 && AI.Controllers.Spell.CanCast((int)Spells.Innervate))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Innervate);
                        return;
                    }
                                //Engineering Gloves
            if (!ME.HasAuraById((int)Auras.SSprings) && Environment.TickCount - lastSSTick > 20000 )
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Synapse Srpings Used!!!");
              lastSSTick = Environment.TickCount;
              return;
              }

                if (ME.HasAuraById((int)Auras.ShootingStars) && AI.Controllers.Spell.CanCast((int)Spells.Starsurge))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Starsurge);
                    return;
                }

                                                // Moonfire
                if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 6000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                    return;
                }

                // Sunfire
                if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 6000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                    return;
                }

                // StarFall
                if (AI.Controllers.Spell.CanCast((int)Spells.StarFall))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFall);
                    return;
                }

                // Starsurge
                if (AI.Controllers.Spell.CanCast((int)Spells.Starsurge))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Starsurge);
                    return;
                }

                if (ME.HasAuraById((int)Auras.AstralInsight) && AI.Controllers.Spell.CanCast((int)Spells.AstralC))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AstralC);
                    return;
                }

                 // Solar
            if (ME.HasAuraById((int)Auras.EclipseSolar))
            {

                if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 6000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                    return;
                }

                if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 6000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                    return;
                }

                if (AI.Controllers.Spell.CanCast((int)Spells.FoN))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FoN);
                    return;
                }

                if (AI.Controllers.Spell.CanCast((int)Spells.Wrath))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Wrath);
                    return;
                }

            }
                // Lunar
            if (ME.HasAuraById((int)Auras.EclipseLunar))
            {
                if ((!TARGET.HasAuraById((int)Auras.Moonfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Moonfire && x.TimeLeft <= 6000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Moonfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Moonfire);
                    return;
                }

                if ((!TARGET.HasAuraById((int)Auras.Sunfire) ||
                    TARGET.Auras.Where(x => x.SpellId == (int)Auras.Sunfire && x.TimeLeft <= 6000).Any()) &&
                    AI.Controllers.Spell.CanCast((int)Spells.Sunfire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Sunfire);
                    return;
                }

                if (AI.Controllers.Spell.CanCast((int)Spells.FoN))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FoN);
                    return;
                }

                if (AI.Controllers.Spell.CanCast((int)Spells.StarFire))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                    return;
                }

            }
                // Wrath
                if(AI.Controllers.Spell.CanCast((int)Spells.Wrath) && ME.HasAuraById((int)Auras.EMSolar))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Wrath);
                    return;
                }
                // Starfire
                if(AI.Controllers.Spell.CanCast((int)Spells.StarFire) && ME.HasAuraById((int)Auras.EMLunar))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                    return;
                }

                if (AI.Controllers.Spell.CanCast((int)Spells.FoN))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FoN);
                    return;
                }

                if(AI.Controllers.Spell.CanCast((int)Spells.StarFire) && !ME.HasAuraById((int)Auras.EMLunar) && !ME.HasAuraById((int)Auras.EMLunar))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StarFire);
                    return;
                }

            }
            }

            ////////////////////////////////////////////////////////////////Feral/////////////////////////////////////////////////////////////////////////
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.FeralCheck))
            {

            //	if (!ME.InCombat && ME.UnitsAttackingMeOrPet.Count == 0 && AI.Controllers.Spell.CanCast((int)Spells.Prowl) && !ME.HasAuraById((int)Auras.Prowl))
              //          {
             //               Logger.WriteLine("Enter stealth ...");
             //               WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Prowl);
             //           }

             //New Combat simcraft 5.4.8

            if (ME.HasAuraById((int)Auras.Prowl))
            {

            if (AI.Controllers.Spell.CanCast((int)Spells.Ravage) && WoW.Internals.ObjectManager.LocalPlayer.IsBehindUnit(WoW.Internals.ObjectManager.Target)
            && TARGET.Position.Distance3DFromPlayer < 8)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Ravage);
                    return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.Pounce))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Pounce);
                    return;
            }
            }

            //Boss Cooldowns Auto.

            if(ObjectManager.Target.CreatureCache.Classification == WoW.Classes.WowCreatureCache.WowUnitClassification.WorldBoss && TARGET.Position.Distance3DFromPlayer < 8 && !ME.HasAuraById((int)Auras.TigerFury) && AI.Controllers.Spell.CanCast((int)Spells.Berserk)
            || ObjectManager.Target.CreatureCache.Classification == WoW.Classes.WowCreatureCache.WowUnitClassification.RareElite && TARGET.Position.Distance3DFromPlayer < 8 && !ME.HasAuraById((int)Auras.TigerFury) && AI.Controllers.Spell.CanCast((int)Spells.Berserk))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Berserk);
                    return;
            }

            if(ObjectManager.Target.CreatureCache.Classification == WoW.Classes.WowCreatureCache.WowUnitClassification.WorldBoss && TARGET.Position.Distance3DFromPlayer < 8 && AI.Controllers.Spell.CanCast((int)Spells.NaturesVigil))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.NaturesVigil);
                    return;
            }

             //Keep Rip From Falling Off
             //if rip timeleft Less then 3 secs and target's health is below 25%
             	if (TARGET.HasAuraById((int)Auras.Rip) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rip && x.TimeLeft < 5000).Any() && AI.Controllers.Spell.CanCast((int)Spells.FeroBite) && TARGET.HealthPercent <= 25
            &&(TARGET.Auras.Where(x => x.SpellId == 1079 && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() ))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FeroBite);
                    return;
            }

            //Proc Dearm of Cenarious @ 4+ Combo Points or when Preadatory Swiftness is about to expire.

             		if (ME.HasAuraById((int)Auras.PredSwiftness) && AI.Controllers.Spell.CanCast((int)Spells.HealingTouch) && ME.ComboPoints >= 4
            || ME.HasAuraById((int)Auras.PredSwiftness) && AI.Controllers.Spell.CanCast((int)Spells.HealingTouch) && ME.Auras.Where(x => x.SpellId == (int)Auras.PredSwiftness && x.TimeLeft < 2000).Any())
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealingTouch);
            }

            //Faerie Fire

            if (!TARGET.HasAuraById((int)Auras.WA) && AI.Controllers.Spell.CanCast((int)Spells.FF) && !ME.HasAuraById((int)Auras.Prowl))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FF);
            }

            //Savage Roar if buff less then 3secs and Dosent Exist

            if (ME.HasAuraById((int)Auras.GlyphofS) && !ME.HasAuraById((int)Auras.SavageRoar) && AI.Controllers.Spell.CanCast((int)Spells.SavageRoar)
            || !ME.HasAuraById((int)Auras.SavageRoar) && AI.Controllers.Spell.CanCast((int)Spells.SavageRoar) && ME.ComboPoints < 3
            || ME.HasAuraById((int)Auras.SavageRoar) && AI.Controllers.Spell.CanCast((int)Spells.SavageRoar) && ME.ComboPoints >=5 && ME.Auras.Where(x => x.SpellId == (int)Auras.SavageRoar && x.TimeLeft < 3000).Any() )
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SavageRoar);
                    return;
            }

            if (TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rip && x.TimeLeft > 6000).Any() && AI.Controllers.Spell.CanCast((int)Spells.FeroBite) && ME.ComboPoints >= 5 && MyEnergy >= 40
            && (TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Rip) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() )
            || TARGET.HealthPercent < 25 && ME.ComboPoints >= 4 && TARGET.HasAuraById((int)Auras.Rip) && AI.Controllers.Spell.CanCast((int)Spells.FeroBite) && MyEnergy >= 40
            && (TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Rip) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() ))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FeroBite);
                    return;
            }

             //overwire rip during Execute Range

             	if (AI.Controllers.Spell.CanCast((int)Spells.Rip) && ME.ComboPoints >= 5
            && !(TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Rip) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() )
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rip && x.TimeLeft < 6000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Rip) && ME.ComboPoints >= 5
            && (TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Rip) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() )
            || ME.HasAuraById((int)Auras.DoC) && ME.Auras.Where(x => x.SpellId == (int)Auras.DoC && x.StackCount <= 1).Any() && ME.ComboPoints >= 4 && AI.Controllers.Spell.CanCast((int)Spells.Rip))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rip);
                    return;
            }

             //Thrash with Omen of Clarity
            if (!TARGET.HasAuraById((int)Auras.Thrash) && AI.Controllers.Spell.CanCast((int)Spells.ThrashFeral) && ME.HasAuraById((int)Auras.CC) && TARGET.Position.Distance3DFromPlayer < 8)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ThrashFeral);
            }

            if (!(TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Rake) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() ) && AI.Controllers.Spell.CanCast((int)Spells.Rake) && ME.ComboPoints < 4
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rake && x.TimeLeft < 5000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Rake) && ME.ComboPoints < 4
            && (TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Rake) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() )
            || ME.HasAuraById((int)Auras.DoC) && ME.Auras.Where(x => x.SpellId == (int)Auras.DoC && x.StackCount <= 2).Any() && ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.Rake)
            || ME.HasAuraById((int)Auras.Vis) && AI.Controllers.Spell.CanCast((int)Spells.Rake) && ME.ComboPoints < 4)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rake);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.Thrash) && AI.Controllers.Spell.CanCast((int)Spells.ThrashFeral) && ME.HasAuraById((int)Auras.CC))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ThrashFeral);
            }

             //Tigers Fury if Less then or equal to 35 energy
             		if (!ME.HasAuraById((int)Auras.CC) && AI.Controllers.Spell.CanCast((int)Spells.TigerFury) && MyEnergy <= 35 && !ME.HasAuraById((int)Auras.Berserk))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerFury);
            }

            if (WoW.Internals.ObjectManager.LocalPlayer.IsBehindUnit(WoW.Internals.ObjectManager.Target) && ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.Shred) && MyEnergy >= 40 && TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rake && x.TimeLeft >= 5000).Any())
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Shred);
                    return;
            }

            if (!WoW.Internals.ObjectManager.LocalPlayer.IsBehindUnit(WoW.Internals.ObjectManager.Target) && ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.MangleFeral) && MyEnergy >= 40 && TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rake && x.TimeLeft >= 5000).Any())
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MangleFeral);
                    return;
            }

            }
            //Anthrax.WoW.Classes.ObjectManager.WowUnitAura.IsPlayerCasted((int)Aura.Rip
            //Anthrax.WoW.Classes.ObjectManager.WowUnitAura.WowAuraFlags.PlayerCasted
            //Anthrax.WoW.Classes.ObjectManager.WowUnitAura.TimeLeft

            ////////////////////////////////////////////////////////////////RESTO/////////////////////////////////////////////////////////////////////////
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.RestoCheck))
            {
            if (!ME.IsCasting)
            {

            //Lifebloom Code
            if (TARGET.HealthPercent <= CCSettings.Lifebloom && TARGET.Auras.Where(x => x.SpellId == (int)Auras.Lifebloom && x.StackCount < 3).Any() && AI.Controllers.Spell.CanCast((int)Spells.Lifebloom)
            || TARGET.HealthPercent <= CCSettings.Lifebloom && !TARGET.HasAuraById((int)Auras.Lifebloom) && AI.Controllers.Spell.CanCast((int)Spells.Lifebloom)
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Lifebloom && x.TimeLeft <= 4000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Lifebloom))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Lifebloom);
                    return;
            }
            // innervate
            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 80 && AI.Controllers.Spell.CanCast((int)Spells.Innervate))
            {
                Anthrax.WoW.Internals.Chat.SendMessage("/target Player");
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Innervate);
                return;
            }
            //Wild Growth
            if (TARGET.HealthPercent <= CCSettings.WildGrowth && AI.Controllers.Spell.CanCast((int)Spells.WildGrowth))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.WildGrowth);
                    return;
            }

            //Regrowth with proc
            if (TARGET.HealthPercent <= 50 && AI.Controllers.Spell.CanCast((int)Spells.Regrowth) && !TARGET.HasAuraById((int)Auras.Regrowth)
            || ME.HasAuraById((int)Auras.CCResto) && AI.Controllers.Spell.CanCast((int)Spells.Regrowth) && !TARGET.HasAuraById((int)Auras.Regrowth))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Regrowth);
                    return;
            }
            //rejuvenation
            if (TARGET.HealthPercent <= CCSettings.Rejuvenation && AI.Controllers.Spell.CanCast((int)Spells.Rejuvenation) && !TARGET.HasAuraById((int)Auras.Rejuvenation))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rejuvenation);
                    return;
            }
            //Wild Mushroom
            if (TARGET.HealthPercent <= CCSettings.WildMushroom && AI.Controllers.Spell.CanCast((int)Spells.WildMushroom))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.WildMushroom);
                    return;
            }

            //Wrath
            if (AI.Controllers.Spell.CanCast((int)Spells.Wrath))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Wrath);
                    return;
            }
            }
            }

            //////////////////////////////////////////////////////////////////////3
            }////////////////////////End Single Target Rotation///////////////////
        }
示例#36
0
 public override void OnCombat(WowUnit TARGET)
 {
     /* Performance tests
     stopwatch.Stop();
     averageScanTimes.Add(stopwatch.ElapsedMilliseconds);
     SPQR.Logger.WriteLine("Elapsed:  " + stopwatch.ElapsedMilliseconds.ToString() + " miliseconds, average:" + (averageScanTimes.Sum() / averageScanTimes.Count()).ToString() + ",Max:" + averageScanTimes.Max());
     stopwatch.Restart();
      */
     if (!Cooldown.IsGlobalCooldownActive && TARGET.IsValid)
     {
         if (isAOE) { castNextSpellbyAOEPriority(TARGET); } else { castNextSpellbySinglePriority(TARGET); }
     }
     if ((GetAsyncKeyState(90) == -32767))
     {
         changeRotation();
     }
 }
示例#37
0
        private void ReadObjectCreateUpdate(StreamHandler Reader)
        {
            var guid = Reader.ReadPackedGuid();
            var type = (ObjectTypeId)Reader.ReadByte();

            WowObject obj;

            switch (type)
            {
                case ObjectTypeId.Container:
                    obj = new WowContainer();
                    break;
                case ObjectTypeId.Corpse:
                    obj = new WowCorpse();
                    break;
                case ObjectTypeId.DynamicObject:
                    obj = new WowDynamicObject();
                    break;
                case ObjectTypeId.GameObject:
                    obj = new WowGameObject();
                    break;
                case ObjectTypeId.Item:
                    obj = new WowItem();
                    break;
                case ObjectTypeId.Object:
                default:
                    throw new Exception("Cannot instantiate an object with TypeId=" + type);
                case ObjectTypeId.Player:
                    obj = new WowPlayer();
                    break;
                case ObjectTypeId.Unit:
                    obj = new WowUnit();
                    break;
                case ObjectTypeId.AreaTrigger:
                    obj = new WowAreaTrigger();
                    break;
            }

            obj.Guid = guid;
            obj.MovementData = new MovementInfo(Reader);
            obj.SetValues(ReadValues(Reader));
            obj.ResetUpdatedFields();

            if (!m_createdObjects.ContainsKey(guid))
                m_createdObjects.Add(guid, obj);
            else
                Console.WriteLine("Error: Created object duplicate guid {0}", guid);
        }
示例#38
0
文件: nrgdRET.cs 项目: nrgd/nrgdret
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            // Vars
            decimal inqTimeLeft;
            if (ME.HasAuraById((int)Spells.Inquisition))
            {

                inqTimeLeft = ME.Auras.Where(a => a.SpellId == (int)Spells.Inquisition).First().TimeLeft/1000;
            }
            else
            {
                inqTimeLeft = 3;
            }
            int hp = ME.GetPower(WowUnit.WowPowerType.HolyPower); // may change during execution, seems more efficient this way

            if (inqTimeLeft <= CCSettings.RefreshInquisition)
            {
                if (hp > 2 || inqTimeLeft <= CCSettings.ForceRefreshInquisition)
                {
                    if (Spell.CanCast((int)Spells.Inquisition))
                    {
                        ActionBar.ExecuteSpell((int)Spells.Inquisition);
                    }
                }
            }
            if (CCSettings.HasT164PB && ME.HasAuraById((int)Auras.T164PB))
            {
                ActionBar.ExecuteSpell((int)Spells.DivineStorm);
            }
            if (ME.HasAuraById((int)Auras.DivinePurpose) || hp == 5)
            {
                ActionBar.ExecuteSpell((int)Spells.TemplarsVerdict);
            }
            if (((TARGET.HealthPercent < 20) || avengingWrathActive()) && Spell.CanCast((int)Spells.HammerOfWrath))
            {
                ActionBar.ExecuteSpell((int)Spells.HammerOfWrath);
            }
            if (Spell.CanCast((int)Spells.Exorcism))
            {
                ActionBar.ExecuteSpell((int)Spells.Exorcism);
            }
            if (Spell.CanCast((int)Spells.MassExorcism))
            {
                ActionBar.ExecuteSpell((int)Spells.MassExorcism);
            }
            if (Spell.CanCast((int)Spells.CrusaderStrike))
            {
                ActionBar.ExecuteSpell((int)Spells.CrusaderStrike);
            }
            if (Spell.CanCast((int)Spells.Judgement))
            {
                ActionBar.ExecuteSpell((int)Spells.Judgement);
            }
            if (hp >= 3)
            {
                ActionBar.ExecuteSpell((int)Spells.TemplarsVerdict);
            }
        }
示例#39
0
文件: AShaman.cs 项目: KohaPE/Combats
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var IsCasting = ObjectManager.LocalPlayer.IsCasting;
            Random rnd = new Random();
            int seed = rnd.Next(250,1000);
            TimeSpan timeDiff = DateTime.Now - start_time;

            if (ME.HasAuraById((int)Auras.EnhanceCheck))
            {
            if (!ME.HasAuraById((int)Auras.FTW))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FTW);
            return;
            }

            if (!ME.HasAuraById((int)Auras.WFW))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.WFW);
            return;
            }

            if (!ME.HasAuraById((int)Auras.LightningShield))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LightningShield);
            return;
            }
            }

            if (ME.HasAuraById((int)Auras.EleCheck))
            {
            if (!ME.HasAuraById((int)Auras.FTW))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FTW);
            return;
            }

            if (!ME.HasAuraById((int)Auras.LightningShield))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LightningShield);
            return;
            }
            }

            if (ME.HasAuraById((int)Auras.RestoCheck))
            {
            if (!ME.HasAuraById((int)Auras.ELW))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ELW);
            return;
            }

            if (!ME.HasAuraById((int)Auras.WaterS))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.WaterS);
            return;
            }
            }

            if (TARGET.Health >= 1 && ME.InCombat)
            { //Combat Check

                                                ///////////////////////////ELEMENTAL////////////////////////
            if (ME.HasAuraById((int)Auras.EleCheck))
            { //Spec Check

            //Totem Codes

            //Mouseover Light's Hammer while Pressing Alt
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.EQ)
                         && !IsCasting)
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.EQ);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if( ((int)timeDiff.TotalMilliseconds > 60000+seed)  || !flag)
            {
                //SPQR.Logger.WriteLine("Casting searing totem, seconds= "+(int)timeDiff.TotalMilliseconds);
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SearingTotem);

                while(!AI.Controllers.Spell.CanCast((int)Spells.SearingTotem))
                    System.Threading.Thread.Sleep(30);

                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SearingTotem);

                start_time = DateTime.Now;
                flag=true;
            }

                if (AI.Controllers.Spell.CanCast((int)Spells.LavaBurst) && ME.HasAuraById((int)Auras.LavaS))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LavaBurst);
                            return;
                        }
                        if (AI.Controllers.Spell.CanCast((int)Spells.LavaBurst))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LavaBurst);
                            return;
                        }

             if (!TARGET.HasAuraById((int)Auras.FlameShock) && AI.Controllers.Spell.CanCast((int)Spells.FlameShock)
                || TARGET.Auras.Where(x => x.SpellId == (int)Auras.FlameShock && x.TimeLeft < 8000).Any())
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FlameShock);
                            return;
                        }

            if (AI.Controllers.Spell.CanCast((int)Spells.ElementalBlast))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ElementalBlast);
                            return;
                        }

            if (AI.Controllers.Spell.CanCast((int)Spells.UnleashE))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.UnleashE);
                            return;
                        }

            if (AI.Controllers.Spell.CanCast((int)Spells.HearthShock) && ME.HasAuraById((int)Auras.Full) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.FlameShock && x.TimeLeft > 8000).Any() )
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HearthShock);
                            return;
                        }

            if(AI.Controllers.Spell.CanCast((int)Spells.LightingBolt) && Environment.TickCount - lastLBTick > 1850)
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LightingBolt);
                            lastLBTick = Environment.TickCount;
                            return;
                        }

            } //End of Spec Check
                                                ///////////////////////////Enhancement////////////////////////
            if (ME.HasAuraById((int)Auras.EnhanceCheck))
            { //Spec Check

            //Totem Codes

            if (TARGET.Position.Distance3DFromPlayer < 7)
            {
            if( ((int)timeDiff.TotalMilliseconds > 60000+seed)  || !flag)
            {
                //SPQR.Logger.WriteLine("Casting searing totem, seconds= "+(int)timeDiff.TotalMilliseconds);
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SearingTotem);

                while(!AI.Controllers.Spell.CanCast((int)Spells.SearingTotem))
                    System.Threading.Thread.Sleep(30);

                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SearingTotem);

                start_time = DateTime.Now;
                flag=true;
            }
            }

            if (ME.Auras.Where(x => x.SpellId == (int)Auras.MWeapon && x.StackCount >= 5).Any() && AI.Controllers.Spell.CanCast((int)Spells.ElementalBlast))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ElementalBlast);
                            return;
                        }

            if (AI.Controllers.Spell.CanCast((int)Spells.UnleashE))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.UnleashE);
                            return;
                        }

            if (ME.Auras.Where(x => x.SpellId == (int)Auras.MWeapon && x.StackCount >= 5).Any() && AI.Controllers.Spell.CanCast((int)Spells.LightingBolt))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LightingBolt);
                            return;
                        }

                        if (AI.Controllers.Spell.CanCast((int)Spells.LavaLash) && ME.Auras.Where(x => x.SpellId == (int)Auras.SearingFlame && x.StackCount >= 5).Any())
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LavaLash);
                            return;
                        }

            if (AI.Controllers.Spell.CanCast((int)Spells.StormStrike))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StormStrike);
                            return;
                        }
            if (AI.Controllers.Spell.CanCast((int)Spells.StormBlast))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.StormBlast);
                            return;
                        }

             if (!TARGET.HasAuraById((int)Auras.FlameShock) && AI.Controllers.Spell.CanCast((int)Spells.FlameShock)
                || AI.Controllers.Spell.CanCast((int)Spells.FlameShock) && !TARGET.HasAuraById((int)Auras.FlameShock) && ME.HasAuraById((int)Auras.UnleashF))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FlameShock);
                            return;
                        }

            if (AI.Controllers.Spell.CanCast((int)Spells.LavaLash))
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LavaLash);
                            return;
                        }

            if (AI.Controllers.Spell.CanCast((int)Spells.HearthShock) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.FlameShock && x.TimeLeft >= 6000).Any())
                        {

                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HearthShock);
                            return;
                        }

            } //End of Spec Check

            /////////////////////////////////////////////////////Resto//////////////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.RestoCheck))
            {
            //Mouseover Light's Hammer while Pressing Alt
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.Hrain)
                         && !IsCasting)
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Hrain);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if (ME.HealthPercent <= 95 && TARGET.HealthPercent <= 95 && AI.Controllers.Spell.CanCast((int)Spells.HealingStreamTotem))
               {
               WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealingStreamTotem);
               return;
               }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Shift) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.ES)
                         && !IsCasting)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ES);
                    }

                    return;

                }
            if (TARGET.HealthPercent <= CCSettings.Riptide && AI.Controllers.Spell.CanCast((int)Spells.Riptide) && !TARGET.HasAuraById((int)Auras.Riptide))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Riptide);
                    }

                    if (TARGET.HealthPercent <= CCSettings.GHW)
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.GHW);
                    }

            if (TARGET.HealthPercent <= CCSettings.ChainHeal && ME.HealthPercent <= CCSettings.ChainHeal && AI.Controllers.Spell.CanCast((int)Spells.ChainHeal))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ChainHeal);
                    }
            if (TARGET.HealthPercent <= CCSettings.HW && AI.Controllers.Spell.CanCast((int)Spells.HW))
                    {
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HW);
                    }

            } //Spec Check Resto
            } //Combat Check
        }
示例#40
0
文件: ARogue.cs 项目: KohaPE/Combats
        private void castNextSpellbyAOEPriority(WowUnit TARGET)
        {
            var MyEnergy = ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Energy);

             if (!ME.InCombat && !ME.HasAuraById((int)Auras.Stealth) && Environment.TickCount - lastStealthTick > 2000 && !ObjectManager.LocalPlayer.IsMounted)
             {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Stealth);
            lastStealthTick = Environment.TickCount;
            return;
            }

            if (ME.HasAuraById((int)Auras.Stealth) && TARGET.Position.Distance3DFromPlayer < 8)
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Ambush);
                    return;
            }

            if (TARGET.Health >= 1 && ME.InCombat)
            {

            /////////////////////////////////////////////////////////////////////////////Combat SPEC////////////////////////////////////////////////////////////////////////////////
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.CombatCheck))
            {

            if (!ME.HasAuraById((int)Auras.Stealth))
            {

            if (ME.ComboPoints >= 5 && AI.Controllers.Spell.CanCast((int)Spells.CT))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CT);
                    return;
            }

            if (ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.FoK))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FoK);
                    return;
            }

            }
            } //Combat Check
            }
        }
示例#41
0
        //public override void OnCombat(WoW.Classes.ObjectManager.WowUnit unit)
        //{}
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var HolyPower = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.HolyPower);
            var IsCasting = ObjectManager.LocalPlayer.IsCasting;

            if (!ME.HasAuraById((int)Auras.SealI) && AI.Controllers.Spell.CanCast((int)Spells.SealI))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SealI);
                return;
            }

            if (TARGET.Health >= 1 && ME.InCombat)
            { //Combat Check
                                                ///////////////////////////Protection////////////////////////
            if (ME.HasAuraById((int)Auras.ProtCheck))
            { //Spec Check
            //Mouseover Light's Hammer while Pressing Alt
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.LHammer)
                         && !IsCasting)
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LHammer);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if (!ME.HasAuraById((int)Auras.RF) && AI.Controllers.Spell.CanCast((int)Spells.RF))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RF);
                return;
            }

            if (!ME.HasAuraById((int)Auras.SealI) && AI.Controllers.Spell.CanCast((int)Spells.SealI))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SealI);
                return;
            }

            if (!ME.HasAuraById((int)Auras.GC) && AI.Controllers.Spell.CanCast((int)Spells.AS))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AS);
                return;
            }

            if (HolyPower >= 4 && AI.Controllers.Spell.CanCast((int)Spells.SoR) && ME.HasAuraById((int)Auras.EFlame))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoR);
                return;
            }
            if (HolyPower >= 3 && AI.Controllers.Spell.CanCast((int)Spells.EFlame) && !ME.HasAuraById((int)Auras.EFlame))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.EFlame);
                return;
            }

            if (HolyPower < 5 && AI.Controllers.Spell.CanCast((int)Spells.CS))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CS);
                return;
            }
            if (HolyPower < 5 && AI.Controllers.Spell.CanCast((int)Spells.Jud))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Jud);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.AS))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AS);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.HW))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HW);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.HoW) && TARGET.HealthPercent < 20)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.Con))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Con);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.HolyP))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HolyP);
                return;
            }

            } //End of Spec Check

            //////////////////////////////////////////////////////////Holy/////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.HolyCheck))
            {
            //Mouseover Light's Hammer while Pressing Alt
            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.LHammer)
                         && !IsCasting)
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LHammer);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            //////Holy Power Spending
            if (AI.Controllers.Spell.CanCast((int)Spells.HolyShock) && TARGET.HealthPercent <= 99)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HolyShock);
                return;
            }
            //Eternal Flame
            if (AI.Controllers.Spell.CanCast((int)Spells.EFlame) && TARGET.HealthPercent <= 90)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.EFlame);
                return;
            }

            //DivineLight
            if (AI.Controllers.Spell.CanCast((int)Spells.DivineL) && TARGET.HealthPercent <= 60)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DivineL);
                return;
            }

            //Holy Light
            if (AI.Controllers.Spell.CanCast((int)Spells.HolyL) && TARGET.HealthPercent <= 95)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HolyL);
                return;
            }

                //Flash of Light
            if (AI.Controllers.Spell.CanCast((int)Spells.FoL) && TARGET.HealthPercent <= 55)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FoL);
                return;
            }

            } // End of Spec Check

            } //Combat Check
        }
示例#42
0
文件: ARogue.cs 项目: KohaPE/Combats
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var MyEnergy = ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Energy);

            if (!ME.InCombat && !ME.HasAuraById((int)Auras.DeadlyPoison))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DeadlyPoison);
            return;
            }
            if (!ME.InCombat && !ME.HasAuraById((int)Auras.LeechingPoison))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LeechingPoison);
            return;
            }

             if (!ME.InCombat && !ME.HasAuraById((int)Auras.Stealth) && Environment.TickCount - lastStealthTick > 2000 && !ObjectManager.LocalPlayer.IsMounted)
             {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Stealth);
            lastStealthTick = Environment.TickCount;
            return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0 && AI.Controllers.Spell.CanCast((int)Spells.BF))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BF);
                    return;
            }

            //	if (ME.HasAuraById((int)Auras.Stealth) && TARGET.Position.Distance3DFromPlayer < 8)
            //			{
            //                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Ambush);
            //                    return;
            //            }

            if (ME.HealthPercent <= CCSettings.Recup && !ME.HasAuraById((int)Auras.Recup) && AI.Controllers.Spell.CanCast((int)Spells.Recup))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Recup);
                    return;
            }

            if (TARGET.Health >= 1 && ME.InCombat)
            {

            /////////////////////////////////////////////////////////////////////////////Combat SPEC////////////////////////////////////////////////////////////////////////////////
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.CombatCheck))
            {

            if (!ME.HasAuraById((int)Auras.Stealth))
            {

            if (ME.HealthPercent <= CCSettings.Recup && !ME.HasAuraById((int)Auras.Recup) && AI.Controllers.Spell.CanCast((int)Spells.Recup))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Recup);
                    return;
            }

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0 && AI.Controllers.Spell.CanCast((int)Spells.BF))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BF);
                    return;
            }

            if (!ME.HasAuraById((int)Auras.SnD) && AI.Controllers.Spell.CanCast((int)Spells.SnD)
            || ME.HasAuraById((int)Auras.SnD) && AI.Controllers.Spell.CanCast((int)Spells.SnD) && ME.Auras.Where(x => x.SpellId == (int)Auras.SnD && x.TimeLeft < 3000).Any())
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SnD);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.Rup) && AI.Controllers.Spell.CanCast((int)Spells.Rup) && ME.ComboPoints >= 5 && !ME.HasAuraById((int)Auras.BF)
            || TARGET.HasAuraById((int)Auras.Rup) && AI.Controllers.Spell.CanCast((int)Spells.Rup) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rup && x.TimeLeft < 3000).Any() && !ME.HasAuraById((int)Auras.BF))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Rup);
                    return;
            }

            if (TARGET.HasAuraById((int)Auras.Rup) && ME.ComboPoints >= 5 && AI.Controllers.Spell.CanCast((int)Spells.Evis) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.Rup && x.TimeLeft > 8000).Any() && ME.Auras.Where(x => x.SpellId == (int)Auras.SnD && x.TimeLeft > 8000).Any()
            || ME.ComboPoints >= 5 && AI.Controllers.Spell.CanCast((int)Spells.Evis) && ME.Auras.Where(x => x.SpellId == (int)Auras.SnD && x.TimeLeft > 8000).Any() && ME.HasAuraById((int)Auras.BF))
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Evis);
                    return;
            }

            if (!TARGET.HasAuraById((int)Auras.RS) && AI.Controllers.Spell.CanCast((int)Spells.RS)
            || TARGET.HasAuraById((int)Auras.RS) && AI.Controllers.Spell.CanCast((int)Spells.RS) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.RS && x.TimeLeft < 3000).Any())
            {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RS);
                    return;
            }

            if (ME.ComboPoints < 5 && AI.Controllers.Spell.CanCast((int)Spells.SS))
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SS);
                    return;
            }
            }
            } //Combat Check

            //////////////////////////////////////////////////////////////////////3
            }////////////////////////End Single Target Rotation///////////////////
        }
示例#43
0
文件: AMonk.cs 项目: KohaPE/Combats
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var MyChi = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.MonkChi);
            var MyEnergy = ObjectManager.LocalPlayer.GetPower(Anthrax.WoW.Classes.ObjectManager.WowUnit.WowPowerType.Energy);
            var IsCasting = ObjectManager.LocalPlayer.IsCasting;

            if (TARGET.Health >= 1 && ME.InCombat)
            {

                //Engineering Gloves
            if (!ME.HasAuraById((int)Auras.SSprings) && Environment.TickCount - lastSSTick > 20000 )
            {
              Anthrax.WoW.Internals.ActionBar.PressSlot(0, 0);
              Logger.WriteLine("Synapse Srpings Used!!!");
              lastSSTick = Environment.TickCount;
              return;
              }

            ////////////////////////////////////////////////////Brewmaster///////////////////////////////////
            /////////////////////////////////////////////////////////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.TankCheck))
            {
            //Healing & Survival

                if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.OxStatue))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.OxStatue);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if (ME.HealthPercent <= 95 && MyChi >= 3 && AI.Controllers.Spell.CanCast((int)Spells.Guard) && ME.HasAuraById((int)Auras.PG) && !ME.HasAuraById((int)Auras.Guard))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Guard);
                return;
            }

            if (ME.HealthPercent <= 99 && AI.Controllers.Spell.CanCast((int)Spells.ZP) && !ME.HasAuraById((int)Auras.ZP))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ZP);
                return;
            }
            else
            if (AI.Controllers.Spell.CanCast((int)Spells.ChiWave))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ChiWave);
                return;
            }

            if (ME.HealthPercent <= 80 && MyChi < 4 && AI.Controllers.Spell.CanCast((int)Spells.ExpelHarm))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ExpelHarm);
                return;
            }

            if (MyChi <= 1 && MyEnergy <= 30 && AI.Controllers.Spell.CanCast((int)Spells.ChiBrew))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ChiBrew);
                return;
            }
            //Defensive

            if (MyChi >= 1 && ME.HasAuraById((int)Auras.StagM) || ME.HasAuraById((int)Auras.StagH)
            || MyChi >= 1 && ME.HasAuraById((int)Auras.StagL) && ME.Auras.Where(x => x.SpellId == (int)Auras.StagL && x.TimeLeft <= 8000).Any()
            || ME.HealthPercent <= 80 && MyChi >= 1 && ME.HasAuraById((int)Auras.StagL) && ME.Auras.Where(x => x.SpellId == (int)Auras.StagL && x.TimeLeft <= 8000).Any())
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.PureBrew);
                return;
            }

            if (ME.Auras.Where(x => x.SpellId == (int)Auras.ElusiveBrew && x.StackCount >= 10).Any() &&
            AI.Controllers.Spell.CanCast((int)Spells.ElusiveBrew) && !ME.HasAuraById((int)Auras.Elusive))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ElusiveBrew);
                return;
            }

            if (ME.HealthPercent <= 94 && AI.Controllers.Spell.CanCast((int)Spells.Guard) && ME.HasAuraById((int)Auras.PG) && !ME.HasAuraById((int)Auras.Guard))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Guard);
                return;
            }

            //Rotation!!!

            if (MyChi < 3 && AI.Controllers.Spell.CanCast((int)Spells.KegSmash))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.KegSmash);
                return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.BOK) && !ME.HasAuraById((int)Auras.Shuffle)
            || AI.Controllers.Spell.CanCast((int)Spells.BOK) && ME.Auras.Where(x => x.SpellId == (int)Auras.Shuffle && x.TimeLeft < 12000).Any())
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && ME.Auras.Where(x => x.SpellId == (int)Auras.TP && x.TimeLeft < 3000).Any()
            || AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && !ME.HasAuraById((int)Auras.TP))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerPalm);
                return;
            }

            if (MyChi < 4 && AI.Controllers.Spell.CanCast((int)Spells.Jab))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Jab);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.BOK) && MyChi > 2)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.TigerPalm))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerPalm);
                return;
            }

            }

            //////////////////////////////////////////////////FistWeaving/////////////////////////////////////////
            //////////////////////////////////////////////////////////////////////////////////////////////////////

            if (ME.HasAuraById((int)Auras.HealingCheck))
            {
            if (!IsCasting)
            {

            if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.JadeStatue))
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.JadeStatue);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            //Chi Capping Code
            if (MyChi >= 4 && AI.Controllers.Spell.CanCast((int)Spells.BOK) && ME.HasAuraById((int)Auras.MM))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                return;
            }
            if (MyChi >= 4 && AI.Controllers.Spell.CanCast((int)Spells.Uplift) && ME.HasAuraById((int)Auras.RM) && ME.HealthPercent <= 70)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Uplift);
                return;
            }

            //Mana Tea Code.
            if (ME.Auras.Where(x => x.SpellId == (int)Auras.ManaTea && x.StackCount >= 2).Any() && ME.HasAuraById((int)Auras.GlyphofMT) &&
            AI.Controllers.Spell.CanCast((int)Spells.ManaTea) && ObjectManager.LocalPlayer.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 90
            || ME.HasAuraById((int)Auras.ManaTea) && ObjectManager.LocalPlayer.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 10)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ManaTea);
                return;
            }

            if (ME.Auras.Where(x => x.SpellId == (int)Auras.ManaTea && x.StackCount >= 5).Any() &&
            AI.Controllers.Spell.CanCast((int)Spells.ManaTea) && ObjectManager.LocalPlayer.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 80
            || ME.HasAuraById((int)Auras.ManaTea) && ObjectManager.LocalPlayer.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 10)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ManaTea);
                return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.Renew))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Renew);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.ChiWave))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ChiWave);
                return;
            }

            if (ME.Auras.Where(x => x.SpellId == (int)Auras.VM && x.StackCount >= 5).Any() &&
            AI.Controllers.Spell.CanCast((int)Spells.SurgingMist))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SurgingMist);
                return;
            }

            if (!ME.HasAuraById((int)Auras.SZ) && AI.Controllers.Spell.CanCast((int)Spells.BOK) && MyChi >= 2 && ME.HasAuraById((int)Auras.MM))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.BOK);
                return;
            }
            if (!ME.HasAuraById((int)Auras.TP) && AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && ME.HasAuraById((int)Auras.MM)
            || ME.HasAuraById((int)Auras.MM) && AI.Controllers.Spell.CanCast((int)Spells.TigerPalm) && MyChi > 1)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TigerPalm);
                return;
            }

            if (!ME.HasAuraById((int)Auras.MM) && AI.Controllers.Spell.CanCast((int)Spells.Jab))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Jab);
                return;
            }

            if (TARGET.Position.Distance3DFromPlayer > 10 && AI.Controllers.Spell.CanCast((int)Spells.CJL))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CJL);
                return;
            }

            }
            }

            }
        }
示例#44
0
        private void castNextSpellbyAOEPriority(WowUnit TARGET)
        {
            var HolyPower = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.HolyPower);
            var IsCasting = ObjectManager.LocalPlayer.IsCasting;

            if (TARGET.Health >= 1 && ME.InCombat)
            { //Combat Check
                                                    ///////////////////////////Protection AoE////////////////////////
            if (ME.HasAuraById((int)Auras.ProtCheck))
            { //Spec Check
            if (!ME.HasAuraById((int)Auras.RF) && AI.Controllers.Spell.CanCast((int)Spells.RF))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RF);
                return;
            }

            if (!ME.HasAuraById((int)Auras.SealI) && AI.Controllers.Spell.CanCast((int)Spells.SealI))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SealI);
                return;
            }

            if (HolyPower >= 4 && AI.Controllers.Spell.CanCast((int)Spells.SoR) && ME.HasAuraById((int)Auras.EFlame))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoR);
                return;
            }
            if (HolyPower >= 3 && AI.Controllers.Spell.CanCast((int)Spells.EFlame) && !ME.HasAuraById((int)Auras.EFlame) || ME.HealthPercent < 60 && HolyPower >= 3 && AI.Controllers.Spell.CanCast((int)Spells.EFlame))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.EFlame);
                return;
            }

            if (!ME.HasAuraById((int)Auras.GC) && AI.Controllers.Spell.CanCast((int)Spells.AS))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AS);
                return;
            }

            if (HolyPower < 5 && AI.Controllers.Spell.CanCast((int)Spells.HoR))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoR);
                return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.Con) && TARGET.Position.Distance3DFromPlayer < 8)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Con);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.AS))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.AS);
                return;
            }
            if (AI.Controllers.Spell.CanCast((int)Spells.HW))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HW);
                return;
            }

            if (HolyPower < 5 && AI.Controllers.Spell.CanCast((int)Spells.Jud))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Jud);
                return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.HoW) && TARGET.HealthPercent < 20)
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HoW);
                return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.HolyP))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HolyP);
                return;
            }

            } //End of Spec Check

            } //Combat Check
        }
示例#45
0
        private void castNextSpellbySinglePriority(WowUnit TARGET)
        {
            var DemonicFury = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.DemonicFury);
            var Embers = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.BurningEmbers);
            var Shards = ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.SoulShards);
            var IsCasting = ObjectManager.LocalPlayer.IsCasting;
            var Pet = ObjectManager.Pet;

            if (ME.HasAuraById((int)Auras.Meto) && !ME.InCombat && Environment.TickCount - lastMetoTick > 2000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Meto);
            lastShadowFlameTick = Environment.TickCount;
            return;
            }
            if (TARGET.Health >= 1 && ME.InCombat)
            { //Combat Check

            /////////////////////////////////////////////////////////////Destruction//////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.DestroCheck) && !IsCasting)
            { //Spec Check

                if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.RainofFire)
                         && !IsCasting)
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RainofFire);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 70 && AI.Controllers.Spell.CanCast((int)Spells.LifeTap) && ME.HealthPercent >= 50)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LifeTap);
            return;
            }

            if (Pet.HealthPercent <= 80 && AI.Controllers.Spell.CanCast((int)Spells.HealthFunnel) && Pet.IsAlive && TARGET.HasAuraById((int)Auras.Corruption))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealthFunnel);
            return;
            }

            if (ME.HasAuraById((int)Auras.GlyphofHF) && Pet.HealthPercent <= 80 && AI.Controllers.Spell.CanCast((int)Spells.HealthFunnel) && Pet.IsAlive && TARGET.HasAuraById((int)Auras.Corruption))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealthFunnel);
            return;
            }

            //Fireand Brim
            if (ME.HasAuraById((int)Auras.FandBrim) && Environment.TickCount - lastFandBTick > 2000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.FandBrim);
            lastFandBTick = Environment.TickCount;
            return;
            }

            //ExecutePhase
            if (Embers >= 1 && TARGET.HealthPercent < 20 && Environment.TickCount - lastSBTick > 5000 || TARGET.Health <= 100000 && Embers >= 1 && Environment.TickCount - lastSBTick > 2000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ShadowBurn);
            lastSBTick = Environment.TickCount;
            return;
            }

            //ChaosBolt
            if (Embers >= 3.2 && AI.Controllers.Spell.CanCast((int)Spells.ChaosBolt) && Environment.TickCount - lastChaosBoltTick > 3000 && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0)
            || Embers >= 1 && AI.Controllers.Spell.CanCast((int)Spells.ChaosBolt) && Environment.TickCount - lastChaosBoltTick > 3000 && ME.HasAuraById((int)Auras.DS) && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ChaosBolt);
            lastChaosBoltTick = Environment.TickCount;
            return;
            }

            //Immolate
            if (!TARGET.HasAuraById((int)Auras.Immolate) && Environment.TickCount - lastImmolateTick > 2000 && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0) && !TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Immolate) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Immolate && x.TimeLeft <= 7000).Any() && Environment.TickCount - lastImmolateTick > 2000 && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Immolate) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any()
            && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Immolate);
            lastImmolateTick = Environment.TickCount;
            return;
            }

            //conflag on 2 Charges
            if (Environment.TickCount - lastConflagTick > 8000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Conflag);
            lastConflagTick = Environment.TickCount;
            return;
            }

            //Incinerate
            if (AI.Controllers.Spell.CanCast((int)Spells.Incinerate) && Environment.TickCount - lastIncTick > 2000
            && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Immolate) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Incinerate);
            lastIncTick = Environment.TickCount;
            return;
            }

            }

            /////////////////////////////////////////////////////////////Affliction//////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.AffCheck))
            { //Spec Check

                if (DetectKeyPress.GetKeyState(DetectKeyPress.Alt) < 0)
                {
                    if (AI.Controllers.Spell.CanCast((int)Spells.RainofFire)
                         && !IsCasting)
                    {
                        WoW.Internals.MouseController.RightClick();
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.RainofFire);
                        WoW.Internals.MouseController.LockCursor();
                        WoW.Internals.MouseController.MoveMouse(System.Windows.Forms.Cursor.Position.X, System.Windows.Forms.Cursor.Position.Y);
                        WoW.Internals.MouseController.LeftClick();
                        WoW.Internals.MouseController.UnlockCursor();
                    }

                    return;

                }

            if(!ME.HasAuraById((int)Auras.CurseOfElements) &&
                    !ME.HasAuraById((int)Auras.FireBreath) &&
                    !ME.HasAuraById((int)Auras.LightningBreath) &&
                    !ME.HasAuraById((int)Auras.MasterPoisoner) &&
                    AI.Controllers.Spell.CanCast((int)Spells.CoE) &&
                    ME.Level > 92 &&
                    Environment.TickCount - lastCoE > 2000 )
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CoE);
                    lastCoE = Environment.TickCount;
                    return;
                }

            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 70 && AI.Controllers.Spell.CanCast((int)Spells.LifeTap) && ME.HealthPercent >= 50)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LifeTap);
            return;
            }

            if (Pet.HealthPercent <= 80 && AI.Controllers.Spell.CanCast((int)Spells.HealthFunnel) && Pet.IsAlive && TARGET.HasAuraById((int)Auras.Corruption))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealthFunnel);
            return;
            }

            if (ME.HasAuraById((int)Auras.GlyphofHF) && Pet.HealthPercent <= 80 && AI.Controllers.Spell.CanCast((int)Spells.HealthFunnel) && Pet.IsAlive && TARGET.HasAuraById((int)Auras.Corruption))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealthFunnel);
            return;
            }

                 // Drain Life
                    if (ME.HealthPercent < 50 && AI.Controllers.Spell.CanCast((int)Spells.DrainLife) && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0))
                    {
             						if (!ME.HasAuraById((int)Auras.Soulburn) &&
                            Shards > 0 )
                        {
                            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Soulburn);
                        }
                        //AI.Controllers.Spell.Cast((int)Spells.DrainLife, unit);
                        WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DrainLife);
                        return;
                    }

            //Agony
            if (!TARGET.HasAuraById((int)Auras.Agony) && Environment.TickCount - lastAgony > 1000
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Agony
            && x.TimeLeft < 4000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Agony) && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Agony)
            && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() && Environment.TickCount - lastAgony > 1000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Agony);
            lastAgony = Environment.TickCount;
            return;
            }

            //Corrupton
            if (!TARGET.HasAuraById((int)Auras.Corruption)
            && Environment.TickCount - lastCorruption > 1000
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Corruption && x.TimeLeft < 4000).Any() && AI.Controllers.Spell.CanCast((int)Spells.Corruption)
            && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Corruption) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() && Environment.TickCount - lastCorruption > 1000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Corruption);
            lastCorruption = Environment.TickCount;
            return;
            }

            //Unstable Affliction
            if (!TARGET.HasAuraById((int)Auras.UnstableAffliction) && Environment.TickCount - lastUnstableAffliction > 2000 && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0)
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.UnstableAffliction && x.TimeLeft <= 4000).Any()
            && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.UnstableAffliction) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() && Environment.TickCount - lastUnstableAffliction > 2000
            && !(ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.UnstableAffliction);
            lastUnstableAffliction = Environment.TickCount;
            return;
            }

            //Haunt
            if (!TARGET.HasAuraById((int)Auras.Haunt) && Environment.TickCount - lastHaunt > 2000 && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0 && Shards > 0)
            || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Haunt && x.TimeLeft <= 4000).Any()
            && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Haunt) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any() && Environment.TickCount - lastHaunt > 2000
            && !(ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0) && Shards > 0)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Haunt);
            lastHaunt = Environment.TickCount;
            return;
            }

            //Drain Soul
            if (ME.HealthPercent >= 20 && TARGET.Health <= 20 && AI.Controllers.Spell.CanCast((int)Spells.DrainSoul) && Environment.TickCount - lastDrainSoul > 300 && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0) && !IsCasting
            || ME.HealthPercent >= 20 && Shards < 1 && AI.Controllers.Spell.CanCast((int)Spells.DrainSoul) && Environment.TickCount - lastDrainSoul > 300 && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0) && !IsCasting)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DrainSoul);
            lastMaleficGrasp = Environment.TickCount;
            return;
            }

            //Malefic Grasp
            if (ME.HealthPercent >= 20 && AI.Controllers.Spell.CanCast((int)Spells.MaleficGrasp) && Environment.TickCount - lastMaleficGrasp > 300 && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0) && !IsCasting
            || ME.HasAuraById((int)Auras.KC) && ME.HealthPercent >= 20 && AI.Controllers.Spell.CanCast((int)Spells.MaleficGrasp) && Environment.TickCount - lastMaleficGrasp > 300 && !IsCasting)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.MaleficGrasp);
            lastMaleficGrasp = Environment.TickCount;
            return;
            }

            }

                                            //////////////////////////////////////////////////////////Demonology////////////////////////////////////////////////////////
            if (ME.HasAuraById((int)Auras.DemoCheck) && !IsCasting)
            { //Spec Check

            ///Pet Controls

            if (ME.GetPowerPercent(WoW.Classes.ObjectManager.WowUnit.WowPowerType.Mana) <= 70 && AI.Controllers.Spell.CanCast((int)Spells.LifeTap) && ME.HealthPercent >= 50)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.LifeTap);
            return;
            }

            if (Pet.HealthPercent <= 80 && AI.Controllers.Spell.CanCast((int)Spells.HealthFunnel) && Pet.IsAlive && TARGET.HasAuraById((int)Auras.Corruption))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealthFunnel);
            return;
            }

            if (ME.HasAuraById((int)Auras.GlyphofHF) && Pet.HealthPercent <= 80 && AI.Controllers.Spell.CanCast((int)Spells.HealthFunnel) && Pet.IsAlive && TARGET.HasAuraById((int)Auras.Corruption))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HealthFunnel);
            return;
            }

            if(!ME.HasAuraById((int)Auras.CurseOfElements) &&
                    !ME.HasAuraById((int)Auras.FireBreath) &&
                    !ME.HasAuraById((int)Auras.LightningBreath) &&
                    !ME.HasAuraById((int)Auras.MasterPoisoner) &&
                    AI.Controllers.Spell.CanCast((int)Spells.CoE) &&
                    ME.Level > 92 &&
                    Environment.TickCount - lastCoE > 2000 )
                {
                    WoW.Internals.ActionBar.ExecuteSpell((int)Spells.CoE);
                    lastCoE = Environment.TickCount;
                    return;
                }

            // Dots Corruption
            if (!TARGET.HasAuraById((int)Auras.Corruption)
            || TARGET.HasAuraById((int)Auras.Corruption) && TARGET.Auras.Where(x => x.SpellId == (int)Auras.Corruption && x.TimeLeft <= 3000).Any() && !ME.HasAuraById((int)Auras.Meto)
            && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Corruption) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Corruption);
            return;
            }

             // Turn into Demon
            if (ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.DemonicFury) >= 900 &&
            AI.Controllers.Spell.CanCast((int)Spells.Meto) && Environment.TickCount - lastMetoTick > 3000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Meto);
            lastMetoTick = Environment.TickCount;
            return;
            }

            // Leave Demon
            if (ObjectManager.LocalPlayer.GetPower(WoW.Classes.ObjectManager.WowUnit.WowPowerType.DemonicFury) <= 150 && Environment.TickCount - lastMetoTick > 3000  && ME.HasAuraById((int)Auras.Meto))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Meto);
            lastMetoTick = Environment.TickCount;
            return;
            }

            //Demon Rotation
            if (ME.HasAuraById((int)Auras.Meto))
            {

            if (AI.Controllers.Spell.CanCast((int)Spells.DarkSoul))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DarkSoul);
            return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.ImpSwarm))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ImpSwarm);
            return;
            }

            if (TARGET.Auras.Where(x => x.SpellId == (int)Auras.Corruption && x.TimeLeft <= 10000).Any() && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Corruption) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TouchofChaos);
            return;
            }

            if (!TARGET.HasAuraById((int)Auras.Doom) || TARGET.Auras.Where(x => x.SpellId == (int)Auras.Doom && x.TimeLeft <= 60000).Any() && TARGET.Auras.Where(x => x.SpellId == ((int)Auras.Doom) && x.CasterGUID == ObjectManager.LocalPlayer.GUID).Any())
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.Doom);
            return;
            }

            if (ME.Auras.Where(x => x.SpellId == (int)Auras.MoltenCore && x.StackCount <= 0).Any() )
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.TouchofChaos);
            return;
            }

            if (ME.Auras.Where(x => x.SpellId == (int)Auras.MoltenCore && x.StackCount >= 1).Any() && (ObjectManager.LocalPlayer.MovementField.CurrentSpeed == 0))
            {
                WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulFireMeto);
            return;
            }

            }
            //End Demo Rotation

            //Drain Life
            if (ME.HealthPercent <= 50)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.DrainLife);
            return;
            }

            //Out of Meto Rotation
            if (!ME.HasAuraById((int)Auras.Meto))
            {
            if (AI.Controllers.Spell.CanCast((int)Spells.HandofG) && !TARGET.HasAuraById((int)Auras.ShadowFlame) && Environment.TickCount - lastShadowFlameTick > 2000)
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.HandofG);
            lastShadowFlameTick = Environment.TickCount;
            return;
            }

            if (ME.HasAuraById((int)Auras.MoltenCore) && ME.Auras.Where(x => x.SpellId == (int)Auras.MoltenCore && x.StackCount >= 9).Any())
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.SoulFire);
            return;
            }

            if (AI.Controllers.Spell.CanCast((int)Spells.ShadowBolt))
            {
            WoW.Internals.ActionBar.ExecuteSpell((int)Spells.ShadowBolt);
            return;
            }
            }

            } //End of Spec Check
            } //Combat Check
        }