Пример #1
0
        public GBPull(Grindbot parent)
        {
            _parent = parent;

            MinLevel = _parent.SubProfile.GrindArea[0].TargetMinLevel;
            MaxLevel = _parent.SubProfile.GrindArea[0].TargetMaxLevel;
            Factions = _parent.SubProfile.GrindArea[0].FactionList;
            AvoidMobs = _parent.SubProfile.AvoidMobs.Select(m => m.Name).ToList();
        }
Пример #2
0
 private static void stopGrind()
 {
     if (Grindbot.engine != null)
     {
         Grindbot.engine.StopEngine();
         Grindbot.Dispose();
         GrindbotContainer.Reset();
     }
 }
Пример #3
0
        public GBPull(Grindbot parent)
        {
            _parent = parent;

            MinLevel  = _parent.SubProfile.GrindArea[0].TargetMinLevel;
            MaxLevel  = _parent.SubProfile.GrindArea[0].TargetMaxLevel;
            Factions  = _parent.SubProfile.GrindArea[0].FactionList;
            AvoidMobs = _parent.SubProfile.AvoidMobs.Select(m => m.Name).ToList();
        }
Пример #4
0
        private static void startGrind()
        {
            if (Grindbot.engine == null)
            {
                bool success = Grindbot.Init();

                if (success == true)
                {
                    Grindbot.engine.StartEngine(Grindbot.name);
                }
            }
        }
Пример #5
0
 public GBReleaseCorpse(Grindbot parent)
 {
     _parent = parent;
 }
Пример #6
0
 public GBCorpseRun(Grindbot parent)
 {
     _parent = parent;
 }
Пример #7
0
 public GBRetrieveCorpse(Grindbot parent)
 {
     _parent = parent;
 }
Пример #8
0
 public GBCorpseRun(Grindbot parent)
 {
     _parent = parent;
 }
Пример #9
0
 public GBCombat(Grindbot parent)
 {
     _parent = parent;
 }
Пример #10
0
 public GBLoot(Grindbot parent)
 {
     _parent = parent;
 }
Пример #11
0
 public GBGoto(Grindbot parent)
 {
     _parent = parent;
 }
Пример #12
0
 public GBPatrol(Grindbot parent)
 {
     _parent = parent;
 }
Пример #13
0
 public GBPatrol(Grindbot parent)
 {
     _parent = parent;
 }
Пример #14
0
 public GBReleaseCorpse(Grindbot parent)
 {
     _parent = parent;
 }
Пример #15
0
 public GBLoot(Grindbot parent)
 {
     _parent = parent;
 }
Пример #16
0
 public GBGoto(Grindbot parent)
 {
     _parent = parent;
 }
Пример #17
0
 public GBCombat(Grindbot parent)
 {
     _parent = parent;
 }
Пример #18
0
 public GBRetrieveCorpse(Grindbot parent)
 {
     _parent = parent;
 }
Пример #19
0
        public override void Run()
        {
            if (Calls.MovementIsOnly(0x0))
            {
                if (!locationSaved)
                {
                    GrindbotContainer.StuckTimer.Reset();
                    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)
                                {
                                    GrindbotContainer.StopVendor = true;
                                    if (Data.StopOnVendorFail)
                                    {
                                        Grindbot.engine.StopEngine();
                                        Grindbot.Dispose();
                                    }
                                    else
                                    {
                                        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)
                            {
                                GrindbotContainer.StopVendor = true;
                                GoBack();
                            }
                        }
                    }
                }
            }
            else
            {
                Calls.StopRunning();
            }
        }