Ejemplo n.º 1
0
        public void addTarget(ulong Guid)
        {
            PrioStruct prio = GetStruct();

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

            bool deja = false;

            for (int i = 0; i < TargetList.Count; i++)
            {
                if (TargetList[i].Target == prio.Target)
                {
                    deja = true;
                }
            }
            if (!deja)
            {
                this.TargetList.Add(prio);
            }



            TargetList.Sort();
            showTargetlist();
        }
Ejemplo n.º 2
0
        public override int sort(object obj)
        {
            PrioStruct c2 = (PrioStruct)obj;

            if (!this.Target.TargetingSomeTank && c2.Target.TargetingSomeTank)
            {
                return(-1);
            }
            if (this.Target.TargetingSomeTank && !c2.Target.TargetingSomeTank)
            {
                return(1);
            }
            if (this.Target.TargetingSomeTank && c2.Target.TargetingSomeTank && this.Target.Health < c2.Target.Health)
            {
                return(-1);
            }
            if (this.Target.TargetingSomeTank && c2.Target.TargetingSomeTank && this.Target.Health > c2.Target.Health)
            {
                return(-1);
            }
            if (!this.Target.TargetingSomeTank && !c2.Target.TargetingSomeTank && this.Target.Health < c2.Target.Health)
            {
                return(-1);
            }
            if (!this.Target.TargetingSomeTank && !c2.Target.TargetingSomeTank && this.Target.Health > c2.Target.Health)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
 public bool isDead(PrioStruct c)
 {
     return(c.Target.IsDead);
 }
Ejemplo n.º 5
0
 public bool isDeadandNoCombat(PrioStruct c)
 {
     return(c.Target.IsDead || !(c.Target.inCombat));
 }