Ejemplo n.º 1
0
        int IComparable.CompareTo(object obj)
        {
            RezPrioStruct face = (RezPrioStruct)obj;

            if (!this.bot.IsBeingRez && face.bot.IsBeingRez)
            {
                return(-1);
            }
            else if (this.bot.IsBeingRez && !face.bot.IsBeingRez)
            {
                return(1);
            }
            else if (this.bot.Healer && !this.bot.Healer)
            {
                return(-1);
            }
            else if (!this.bot.Healer && this.bot.Healer)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Ejemplo n.º 2
0
        public void addRezTarget(ulong Guid, Bot b)
        {
            RezPrioStruct prio = new RezPrioStruct();

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



            bool deja = false;

            for (int i = 0; i < RezList.Count; i++)
            {
                if (RezList[i].Target == prio.Target)
                {
                    deja = true;
                }
            }
            for (int i = 0; i < HealList.Count; i++)
            {
                if (HealList[i].Target == prio.Target)
                {
                    HealList.RemoveAt(i);
                    break;
                }
            }

            if (!deja)
            {
                this.RezList.Add(prio);
                SendConsole(prio.Target.Name + " will be rez ", ConsoleLvl.Medium);
            }



            RezList.Sort();
            // showTargetlist();
        }