Exemplo n.º 1
0
        void Update()
        {
            var hits = new List <SelfieTarget>(PossibleTargets.Where(IsInRange));

            var newlyMissed = new List <SelfieTarget>(lastPoints.Except(hits));

            foreach (var missed in newlyMissed)
            {
                missed.OnLeftSelfie();
            }

            var newlyHit = new List <SelfieTarget>(hits.Except(lastPoints));

            foreach (var hit in newlyHit)
            {
                hit.OnEnteredSelfie();
            }

            lastPoints = hits;
        }
Exemplo n.º 2
0
 void Rotation()
 {
     if (!ObjectManager.Player.HasPet || ObjectManager.Pet.IsDead)
     {
         if (ObjectManager.Target.DistanceToPlayer > 11f)
         {
             ShouldMelee = false;
             if (Spell.IsKnown("Hunter's Mark") && !ObjectManager.Target.GotDebuff("Hunter's Mark"))
             {
                 Spell.Cast("Hunter's Mark");
             }
             if (Spell.IsKnown("Concussive Shot") && Spell.IsReady("Concussive Shot") && !ObjectManager.Player.IsInCombat)
             {
                 Spell.Cast("Concussive Shot");
             }
             if (Spell.IsKnown("Serpent Sting") && !ObjectManager.Target.GotDebuff("Serpent Sting"))
             {
                 Spell.Cast("Serpent Sting");
             }
             else if (Spell.IsKnown("Arcane Shot") && Spell.IsReady("Arcane Shot"))
             {
                 Spell.Cast("Arcane Shot");
             }
             else
             {
                 Spell.StartRangedAttack();
             }
         }
         else
         {
             ShouldMelee = true;
             if (Spell.IsKnown("Aspect of the Monkey") && !ObjectManager.Player.GotAura("Aspect of the Monkey"))
             {
                 Spell.Cast("Aspect of the Monkey");
             }
             if (Spell.IsReady("Raptor Strike"))
             {
                 Spell.Cast("Raptor Strike");
             }
             else
             {
                 Spell.Attack();
             }
         }
     }
     else
     {
         var currentTarget    = ObjectManager.Target;
         var targettingPlayer = PossibleTargets.Where(x => x.TargetGuid == ObjectManager.Player.Guid);
         if (targettingPlayer.Any())
         {
             ObjectManager.Player.SetTarget(currentTarget);
             if (ObjectManager.Pet.TargetGuid != targettingPlayer.FirstOrDefault().Guid)
             {
                 ObjectManager.Player.SetTarget(currentTarget);
                 ObjectManager.Player.SetTarget(targettingPlayer.FirstOrDefault());
                 ObjectManager.Pet.Attack();
                 ObjectManager.Player.SetTarget(currentTarget);
             }
         }
         else
         {
             ObjectManager.Pet.Attack();
         }
         if (ObjectManager.Target.DistanceToPlayer > 11f)
         {
             ObjectManager.Player.SetTarget(currentTarget);
             ShouldMelee = false;
             if (Spell.IsKnown("Aspect of the Hawk") && !ObjectManager.Player.GotAura("Aspect of the Hawk"))
             {
                 Spell.Cast("Aspect of the Hawk");
             }
             if (Spell.IsKnown("Hunter's Mark") && !ObjectManager.Target.GotDebuff("Hunter's Mark"))
             {
                 Spell.Cast("Hunter's Mark");
             }
             if (Spell.IsKnown("Rapid Fire") && Spell.IsReady("Rapid Fire") && ObjectManager.Player.IsInCombat)
             {
                 Spell.Cast("Rapid Fire");
             }
             if (Spell.IsKnown("Intimidation") && Spell.IsReady("Intimidation"))
             {
                 Spell.Cast("Intimidation");
             }
             if (Spell.IsKnown("Bestial Wrath") && Spell.IsReady("Bestial Wrath"))
             {
                 Spell.Cast("Bestial Wrath");
             }
             if (Spell.IsKnown("Serpent Sting") && !ObjectManager.Target.GotDebuff("Serpent Sting"))
             {
                 Spell.Cast("Serpent Sting");
             }
             else if (Spell.IsKnown("Arcane Shot") && Spell.IsReady("Arcane Shot"))
             {
                 Spell.Cast("Arcane Shot");
             }
             else
             {
                 Spell.StartRangedAttack();
             }
         }
         else if (ObjectManager.Target.DistanceToPlayer < 11f && ObjectManager.Target.TargetGuid == ObjectManager.Player.Guid)
         {
             ObjectManager.Player.SetTarget(currentTarget);
             ShouldMelee = true;
             if (Spell.IsReady("Raptor Strike"))
             {
                 Spell.Cast("Raptor Strike");
             }
             else
             {
                 Spell.Attack();
             }
         }
         else
         {
             ObjectManager.Player.SetTarget(currentTarget);
             ShouldMelee = false;
             Navigation.Backup(12f);
         }
     }
 }