Exemplo n.º 1
0
        public void addHealTarget(ulong Guid)
        {
            HealthPrioStruct prio = new HealthPrioStruct();

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



            bool deja = false;

            for (int i = 0; i < HealList.Count; i++)
            {
                if (HealList[i].Target == prio.Target)
                {
                    deja = true;
                }
            }
            if (!deja)
            {
                this.HealList.Add(prio);
                SendConsole(prio.Target.Name + " will be healed ", ConsoleLvl.Medium);
            }



            HealList.Sort();
            // showTargetlist();
        }
Exemplo n.º 2
0
        int IComparable.CompareTo(object obj)
        {
            HealthPrioStruct c2        = (HealthPrioStruct)obj;
            double           percentme = this.Target.Health;
            double           percenthe = c2.Target.Health;

            if (percentme < percenthe)
            {
                return(-1);
            }
            if (percentme > percenthe)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Exemplo n.º 3
0
 public bool FullLife(HealthPrioStruct c)
 {
     return(c.Target.Health == 1.0);
 }