public override void DoWork() { GrindingEngine.Navigator.Stop(); CombatHandler.StartCombat(_unit); GrindingEngine.UpdateStats(0, 1, 0); GrindingEngine.Navigation.UseNextNearestWaypoint(); }
internal static void Pulse() { if (CorpsePosition.X == 0 && CorpsePosition.Y == 0 && CorpsePosition.Z == 0) { GrindingEngine.Navigator.Stop(); MoveHelper.ReleaseKeys(); CorpsePosition = ObjectManager.MyPlayer.Location; GrindingEngine.UpdateStats(0, 0, 1); } while (!ObjectManager.MyPlayer.IsGhost) { Thread.Sleep(1000); Frame staticPopup1Button1 = InterfaceHelper.GetFrameByName("StaticPopup1Button1"); if (staticPopup1Button1 != null && staticPopup1Button1.IsVisible) { staticPopup1Button1.LeftClick(); Thread.Sleep(2000); } Thread.Sleep(100); } if (GrindingEngine.Navigation.SpotToHit != CorpsePosition) { GrindingEngine.Navigation.SetNewSpot(CorpsePosition); } GrindingEngine.Navigation.Pulse(); if (GrindingEngine.Navigation.IsLastWaypoints || CorpsePosition.DistanceToSelf2D < 20) { Logging.Write("Move to our corpse"); GrindingEngine.Navigator.Stop(); MoveHelper.ReleaseKeys(); MoveHelper.MoveToLoc(CorpsePosition, 3); Logging.Write("Lets ress"); Frame staticPopup1Button1 = InterfaceHelper.GetFrameByName("StaticPopup1Button1"); var clickTimeout = new Ticker(5 * 1000); bool firstClick = false; while (ObjectManager.MyPlayer.IsGhost) { if (!firstClick || clickTimeout.IsReady) { if (staticPopup1Button1 != null && staticPopup1Button1.IsVisible) { staticPopup1Button1.LeftClick(); firstClick = true; clickTimeout.Reset(); } } Thread.Sleep(1000); } Logging.Write("Ress worked"); Reset(); GrindingEngine.Navigator.Stop(); GrindingEngine.Navigation = new GrindingNavigation(GrindingEngine.CurrentProfile); return; } Thread.Sleep(10); }
public override void DoWork() { if (ObjectManager.ShouldDefend) { Logging.Write("Not pulling, 正在战斗状态"); return; } GrindingEngine.Navigator.Stop(); if (ObjectManager.ShouldDefend) { Logging.Write("Not pulling, 正在战斗状态"); return; } CombatHandler.StartCombat(_unit); GrindingEngine.UpdateStats(0, 1, 0); GrindingEngine.Navigation.UseNextNearestWaypoint(); }
public static void DoWork(PUnit unit) { MoveHelper.ReleaseKeys(); if (!unit.IsLootable) { return; } Logging.Write("Looting: " + unit.Name); if (unit.DistanceToSelf > 5) { MoveHelper.MoveToLoc(unit.Location, 4, false, true); } if (ObjectManager.ShouldDefend) { Logging.Write("Skipping loot, we got into combat"); return; } Thread.Sleep(200); if (ObjectManager.MyPlayer.HasLivePet) { Thread.Sleep(700); } if (ObjectManager.MyPlayer.Target != unit) { unit.Interact(false); } else { KeyHelper.SendKey("InteractTarget"); } if (ObjectManager.ShouldDefend) { return; } TimeOut.Reset(); while (!ObjectManager.MyPlayer.LootWinOpen && !TimeOut.IsReady) { Thread.Sleep(100); } TimeOut.Reset(); if (GrindingSettings.Skin || GrindingSettings.WaitForLoot) { while (ObjectManager.MyPlayer.LootWinOpen && !TimeOut.IsReady) { Thread.Sleep(100); } Thread.Sleep(1300); } else { Thread.Sleep(200); } GrindingEngine.UpdateStats(1, 0, 0); PBlackList.Blacklist(unit, 300, false); if (unit.IsSkinnable && GrindingSettings.Skin) { Logging.Write("Skinning"); KeyHelper.SendKey("TargetLastTarget"); Thread.Sleep(1000); if (!ObjectManager.MyPlayer.Target.IsValid) { unit.Interact(false); } else { KeyHelper.SendKey("InteractTarget"); } TimeOut.Reset(); while (!ObjectManager.MyPlayer.LootWinOpen && !TimeOut.IsReady) { Thread.Sleep(100); } if (GrindingSettings.WaitForLoot) { Thread.Sleep(500); } GrindingEngine.UpdateStats(1, 0, 0); } }
public static void DoWork(PUnit unit) { MoveHelper.ReleaseKeys(); if (unit.IsLootable) { Logging.Write("Looting: " + unit.Name, new object[0]); if (unit.DistanceToSelf > 5.0) { MoveHelper.MoveToLoc(unit.Location, 4.0, false, true); } if (LazyLib.Wow.ObjectManager.ShouldDefend) { Logging.Write("Skipping loot, we got into combat", new object[0]); return; } Thread.Sleep(200); if (LazyLib.Wow.ObjectManager.MyPlayer.HasLivePet) { Thread.Sleep(700); } if (LazyLib.Wow.ObjectManager.MyPlayer.Target != unit) { unit.Interact(false); } else { KeyHelper.SendKey("InteractTarget"); } if (LazyLib.Wow.ObjectManager.ShouldDefend) { return; } TimeOut.Reset(); while (!LazyLib.Wow.ObjectManager.MyPlayer.LootWinOpen && !TimeOut.IsReady) { Thread.Sleep(100); } if (GrindingSettings.WaitForLoot) { Latency.Sleep(500); } GrindingEngine.UpdateStats(1, 0, 0); if (!GrindingSettings.Skin) { PBlackList.Blacklist(unit, 300, false); } } if ((unit.IsSkinnable && GrindingSettings.Skin) && (unit.GetSkinnableType() == Constants.SkinnableType.Skining)) { Logging.Write("Skinning: " + unit.Name, new object[0]); if (unit.DistanceToSelf > 5.0) { MoveHelper.MoveToLoc(unit.Location, 4.0, false, true); } KeyHelper.SendKey("TargetLastTarget"); Thread.Sleep(0x3e8); if (!LazyLib.Wow.ObjectManager.MyPlayer.Target.IsValid) { unit.Interact(false); } else { KeyHelper.SendKey("InteractTarget"); } TimeOut.Reset(); while (!LazyLib.Wow.ObjectManager.MyPlayer.LootWinOpen && !TimeOut.IsReady) { Thread.Sleep(100); } if (GrindingSettings.WaitForLoot) { Latency.Sleep(500); } GrindingEngine.UpdateStats(1, 0, 0); PBlackList.Blacklist(unit, 300, false); } }