Beispiel #1
0
        public override void Run()
        {
            if (MasterContainer.engageGuid != ObjectManager.TargetObject.guid)
            {
                blacklistCount             = 0;
                MasterContainer.engageGuid = ObjectManager.TargetObject.guid;
                BlacklistTimer.Reset();
            }
            if (BlacklistTimer.IsReady())
            {
                blacklistCount = blacklistCount + 1;
                if (blacklistCount == 1)
                {
                    MasterContainer.IsStuck = true;
                }
            }
            if (blacklistCount >= 2)
            {
                MasterContainer.blacklistGuid.Add(ObjectManager.TargetObject.guid);
                blacklistCount = 0;
                BlacklistTimer.Reset();
                Calls.SetTarget(0);
            }

            MasterFightMovement.Handle();
            SpellManager.CheckSpells();
            CCManager.FightPulse();
            Ingame.CastFinal();
            MasterContainer.AfterFight = true;
        }
Beispiel #2
0
 internal static void RestMana(bool firstBool)
 {
     if (ObjectManager.PlayerObject.isChanneling == 0 && !ObjectManager.IsCasting)
     {
         SpellManager.CheckSpells();
         ccs[toUse].RestMana(firstBool);
         Ingame.CastFinal();
     }
 }
        public override void Run()
        {
            if (curHealthPercent == (int)ObjectManager.TargetObject.healthPercent)
            {
                if (BlackListTimer.IsReady())
                {
                    BlackListCounter = BlackListCounter + 1;
                    if (BlackListCounter == 2)
                    {
                        GrindbotContainer.blacklistGuid.Add(ObjectManager.TargetObject.guid);
                        BlackListCounter = 0;
                        BlackListTimer.Reset();
                        Calls.SetTarget(0);
                    }
                    else
                    {
                        GrindbotContainer.IsStuck = true;
                    }
                }
            }
            else
            {
                curHealthPercent = (int)ObjectManager.TargetObject.healthPercent;
                BlackListTimer.Reset();
                BlackListCounter = 0;
            }

            if (ObjectManager.TargetObject.healthPercent == 100)
            {
                int curHealth = (int)ObjectManager.TargetObject.healthPercent;
            }

            GrindbotFightMovement.Handle();
            if (ObjectManager.IsTargetOnMe())
            {
                SpellManager.CheckSpells();
                CCManager.FightPulse();
                Ingame.CastFinal();
                GrindbotContainer.AfterFight = true;
            }
            else
            {
                UInt64 guid = 0x0;
                try
                {
                    guid = ObjectManager.AggroMobs()[0];
                }
                catch { }
                Calls.SetTarget(guid);
            }
        }
Beispiel #4
0
 public override void Run()
 {
     {
         if (ObjectManager.IsUnitOnGroup(attTarget.targetGuid, attTarget.isTapped, attTarget.healthPercent))
         {
             clientConnect.requestWait();
         }
         FightMovement.Handle();
         SpellManager.CheckSpells();
         CCManager.FightPulse();
         Ingame.CastFinal();
         AssistContainer.AfterFight = true;
     }
 }
Beispiel #5
0
 internal static bool IsBuffed()
 {
     SpellManager.CheckSpells();
     if (!ccs[toUse].BuffRoutine())
     {
         Ingame.Stand();
         if (!Calls.MovementIsOnly(0) && !Calls.MovementIsOnly((uint)Offsets.movementFlags.Swimming))
         {
             Calls.StopRunning();
         }
         else
         {
             Ingame.CastFinal();
         }
         return(false);
     }
     return(true);
 }
Beispiel #6
0
        public override void Run()
        {
            if (Calls.MovementIsOnly(0x0))
            {
                if (!locationSaved)
                {
                    curPoint      = new Objects.Location(ObjectManager.PlayerObject.Pos.x, ObjectManager.PlayerObject.Pos.y, ObjectManager.PlayerObject.Pos.z);
                    locationSaved = true;
                    IsVendoring   = true;
                    failCounter   = 0;
                    failCounter2  = 0;
                }
                else
                {
                    if (Data.VendorLocation.differenceToPlayer() > 2)
                    {
                        if (ObjectManager.playerClass == (uint)Constants.Offsets.classIds.Warlock || ObjectManager.playerClass == (uint)Constants.Offsets.classIds.Hunter)
                        {
                            if (Ingame.GotPet())
                            {
                                Ingame.DismissPet();
                            }
                            else
                            {
                                Ingame.Tele(Data.VendorLocation, 60, false);
                            }
                        }
                        else
                        {
                            Ingame.Tele(Data.VendorLocation, 60, false);
                        }
                    }
                    else
                    {
                        if (ObjectManager.playerClass == (byte)Constants.Offsets.classIds.Druid)
                        {
                            SpellManager.CheckSpells();
                            if (Ingame.druidIsBear())
                            {
                                Ingame.Cast("Bear Form", false);
                            }
                            if (Ingame.druidIsCat())
                            {
                                Ingame.Cast("Cat Form", false);
                            }
                            Ingame.CastFinal();
                        }

                        if (Ingame.IsVendorFrameOpen())
                        {
                            Ingame.SellAllBut(Data.ProtectedItems);

                            cTimer waitTimer = new cTimer(1000);
                            while (!waitTimer.IsReady())
                            {
                                Thread.CurrentThread.Join(100);
                            }
                            failCounter2 = failCounter2 + 1;

                            if (Data.gotVendor && ObjectManager.FreeBagSlots <= Data.LeaveFreeSlots)
                            {
                                if (failCounter2 >= 20)
                                {
                                    GoBack();
                                }
                            }
                            else
                            {
                                GoBack();
                            }
                        }
                        else
                        {
                            Objects.UnitObject tmpObj = ObjectManager.GetUnitByName(Data.VendorName);
                            if (tmpObj.baseAdd != 0)
                            {
                                Calls.OnRightClickUnit(tmpObj.baseAdd, 1);
                            }
                            else
                            {
                                failCounter = failCounter + 1;
                            }

                            cTimer waitTimer = new cTimer(1000);
                            while (!waitTimer.IsReady())
                            {
                                Thread.CurrentThread.Join(100);
                            }

                            if (failCounter >= 6)
                            {
                                GoBack();
                            }
                        }
                    }
                }
            }
            else
            {
                Calls.StopRunning();
            }
        }