/// <summary> /// returns true if waiting for loot or if successfully looted. /// </summary> /// <returns></returns> public static bool GetLoot() { if (_lootSw.IsRunning && _lootSw.ElapsedMilliseconds < 5000) { // loot everything. if (AutoAngler.LootFrameIsOpen) { for (int i = 0; i < LootFrame.Instance.LootItems; i++) { LootSlotInfo lootInfo = LootFrame.Instance.LootInfo(i); if (AutoAngler.FishCaught.ContainsKey(lootInfo.LootName)) { AutoAngler.FishCaught[lootInfo.LootName] += (uint)lootInfo.LootQuantity; } else { AutoAngler.FishCaught.Add(lootInfo.LootName, (uint)lootInfo.LootQuantity); } } LootFrame.Instance.LootAll(); _lootSw.Reset(); } return(true); } return(false); }
private void LootNPC(WoWUnit lootableUnit) { if (lootableUnit.WithinInteractRange) { if (LootFrame.Instance != null && LootFrame.Instance.IsVisible) { // record all loot info.. for (int i = 0; i < LootFrame.Instance.LootItems; i++) { LootSlotInfo lootInfo = LootFrame.Instance.LootInfo(i); if (AutoAngler.FishCaught.ContainsKey(lootInfo.LootName)) { AutoAngler.FishCaught[lootInfo.LootName] += (uint)lootInfo.LootQuantity; } else { AutoAngler.FishCaught.Add(lootInfo.LootName, (uint)lootInfo.LootQuantity); } } LootFrame.Instance.LootAll(); } else { lootableUnit.Interact(); } } else { Navigator.MoveTo(lootableUnit.Location); } }
private static async Task <bool> CheckLootFrame() { if (!LootTimer.IsFinished) { // loot everything. if (AutoAnglerBot.Instance.LootFrameIsOpen) { for (int i = 0; i < LootFrame.Instance.LootItems; i++) { LootSlotInfo lootInfo = LootFrame.Instance.LootInfo(i); if (AutoAnglerBot.Instance.FishCaught.ContainsKey(lootInfo.LootName)) { AutoAnglerBot.Instance.FishCaught[lootInfo.LootName] += (uint)lootInfo.LootQuantity; } else { AutoAnglerBot.Instance.FishCaught.Add(lootInfo.LootName, (uint)lootInfo.LootQuantity); } } LootFrame.Instance.LootAll(); LootTimer.Stop(); await CommonCoroutines.SleepForLagDuration(); } return(true); } return(false); }