Example #1
0
 private void CleanMainTargetList()
 {
     if (MainTargetList.Count != 0)
     {
         while (MainTargetList.Peek().Target.IsDead)
         {
             MainTargetList.Pop();
             if (MainTargetList.Count == 0)
             {
                 break;
             }
         }
     }
 }
Example #2
0
        public void AttackTargets(bool Maintarg)
        {
            //SendConsole("first sort", ConsoleLvl.High);

            // showTargetlist();
            //SendConsole("--sort", ConsoleLvl.High);

            if (!Maintarg)
            {
                TargetList.Sort();

                Cible = TargetList[0].Target;
            }
            else
            {
                Cible = MainTargetList.Peek().Target;
            }
            if (Cible != null)
            {
                Cible.Target();
                deplacement(Cible);
                if (Cible.StartedCombat == false)
                {
                    if (waitTimePreCombat != 0)
                    {
                        Thread.Sleep(waitTimePreCombat);
                    }
                    PreCombatRoutine();
                    Thread.Sleep(this.PreCombatTick);
                }
                CombatRoutine(Cible);
            }
            else
            {
                SendConsole("No Cible Selected Error", ConsoleLvl.High);
            }
            Cible  = null;
            CibleI = 9999;
        }
Example #3
0
        public void setMaintarget(ulong Guide)
        {
            PrioStruct prio = new PrioStruct();

            do
            {
                prio.Target = ObjectList.FindUnit(Guide);
                Thread.Sleep(10);
            } while (prio.Target == null);



            if (allowtargetmainstack || MainTargetList.Count == 0)
            {
                MainTargetList.Push(prio);
            }
            else
            {
                MainTargetList.Pop();
                MainTargetList.Push(prio);
            }
        }