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(); }
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); } }
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); } }
public bool isDead(PrioStruct c) { return(c.Target.IsDead); }
public bool isDeadandNoCombat(PrioStruct c) { return(c.Target.IsDead || !(c.Target.inCombat)); }