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 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);
            }
        }