Exemple #1
0
        private async Task UseZoneSpecificLure()
        {
            await Task.Delay(SpellManager.GlobalCooldownLeft);

            if (!HasFishingAura() && !ShouldPauseAfterLureUse() && IsInCorrectZone() && !DoingSomethingElse)
            {
                var bagItems = Me.BagItems;
                foreach (var lure in Lures.Where(l => l.ShouldUse))
                {
                    if (lure.Name == "Arcane Lure")
                    {
                        continue;
                    }
                    var itemToUse = bagItems.FirstOrDefault(b => b.ItemInfo.Id == lure.ID && IsInCorrectZone(lure.LocationToUse));
                    if (itemToUse != null)
                    {
                        if (UseItem(itemToUse, true))
                        {
                            _pauseTimer.Restart();
                            infoLog("Will pause lures for " + S.PauseSecondsAfterUseLure + " seconds.");
                        }
                    }
                }
            }
        }
Exemple #2
0
        private void SaveData()
        {
            string json = JsonConvert.SerializeObject(Lures.ToList());

            File.WriteAllText(lureFileName, json);

            json = JsonConvert.SerializeObject(Catches.ToList());
            File.WriteAllText(catchFileName, json);
        }
Exemple #3
0
        private async Task UseArcaneLure()
        {
            await Coroutine.Sleep(SpellManager.GlobalCooldownLeft);

            if (!DoingSomethingElse)
            {
                var lure = Me.BagItems.FirstOrDefault(b => b.ItemInfo.Id == Lures.FirstOrDefault(l => l.Name == "Arcane Lure")?.ID);
                UseItem(lure, IsInCorrectZone(Zones.AllButDalaran) && !Me.HasAura(Auras.ArcaneLure) && S.UseArcaneLure);
            }
            return;
        }
Exemple #4
0
        private void InitializeBasicData()
        {
            Lures.Add(new Lure {
                Style = "Dry Fly", Size = "8", Rank = 1, Pattern = "Quigley’s Hackle Stacker Flag Dun (BWO)",
            });
            Lures.Add(new Lure {
                Style = "Dry Fly", Size = "16", Rank = 2, Pattern = "Tilt Wing Dun – PMD",
            });
            Lures.Add(new Lure {
                Style = "Dry Fly", Size = "20", Rank = 3, Pattern = "CDC Midge Adult (black)",
            });

            SaveData();
        }
Exemple #5
0
        private async Task UseMarkOfAquaos()
        {
            await Coroutine.Sleep(SpellManager.GlobalCooldownLeft);

            if (S.UseMarkOfAquaos)
            {
                if (AquaosBossIsCurrentlySummoned && !_aquaosPauseTimer.IsRunning)
                {
                    WoWUnit aquaos = AquaosBoss;
                    if (aquaos != null)
                    {
                        _aquaosPauseTimer.Restart();
                        infoLog(aquaos.SafeName + " has been summoned by someone! Waiting 3 minutes to cast mark if you have/get one.");
                        if (Me.CurrentTarget != aquaos)
                        {
                            aquaos.Target();
                        }
                    }
                }
                if (_aquaosPauseTimer.IsRunning && _aquaosPauseTimer.ElapsedMilliseconds >= (180 * 1000))
                {
                    _aquaosPauseTimer.Reset();
                    infoLog("Can cast Mark of Aquaos again.");
                }
                //if (!AquaosBossIsCurrentlySummoned && Me.Location != _lastFishingLocation)
                //{
                //    CommonCoroutines.MoveTo(_lastFishingLocation).Wait();
                //}


                if (!DoingSomethingElse)
                {
                    var lure = Me.BagItems.FirstOrDefault(b => b.ItemInfo.Id == Lures.FirstOrDefault(l => l.Name == "Mark of Aquaos")?.ID);
                    if (lure != null && AquaosBossIsCurrentlySummoned && _aquaosPauseTimer.ElapsedMilliseconds < (120 * 1000))
                    {
                        infoLog("Boss already summoned or recently summoned. Trying again when he is not spawned.");
                        return;
                    }
                    if (UseItem(lure, IsInCorrectZone(Zones.DalaranMargossRetreat) && S.UseMarkOfAquaos))
                    {
                        _aquaosPauseTimer.Reset();
                    }
                }
            }
            return;
        }