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(); }
private static void stopGrind() { if (Grindbot.engine != null) { Grindbot.engine.StopEngine(); Grindbot.Dispose(); GrindbotContainer.Reset(); } }
private static void startGrind() { if (Grindbot.engine == null) { bool success = Grindbot.Init(); if (success == true) { Grindbot.engine.StartEngine(Grindbot.name); } } }
public GBReleaseCorpse(Grindbot parent) { _parent = parent; }
public GBCorpseRun(Grindbot parent) { _parent = parent; }
public GBRetrieveCorpse(Grindbot parent) { _parent = parent; }
public GBCombat(Grindbot parent) { _parent = parent; }
public GBLoot(Grindbot parent) { _parent = parent; }
public GBGoto(Grindbot parent) { _parent = parent; }
public GBPatrol(Grindbot parent) { _parent = parent; }
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(); } }