Ejemplo n.º 1
0
        public static void UpdateParty()
        {
            if (StatusChecker.BasicConditions())
            {
                lock (_groupLock)
                {
                    _groupAndRaid.Clear();

                    List <WoWPlayer> allMembersList = new List <WoWPlayer>();
                    allMembersList.AddRange(Party.GetRaidMembers());
                    allMembersList.AddRange(Party.GetParty());

                    // Add me
                    _groupAndRaid.Add(new AIOPartyMember(ObjectManager.Me.GetBaseAddress));

                    // Add party/raid players
                    foreach (WoWPlayer player in allMembersList)
                    {
                        if (!_groupAndRaid.Exists(m => m.GetBaseAddress == player.GetBaseAddress))
                        {
                            _groupAndRaid.Add(new AIOPartyMember(player.GetBaseAddress));
                        }
                    }

                    if (ActivateSpecRecord)
                    {
                        RecordPartySpecs();
                    }

                    DoRaidUpdate();
                }
            }
        }
 public static void Pulse(object sender, DoWorkEventArgs args)
 {
     _isRunning = true;
     while (Main.isLaunched && _isRunning)
     {
         try
         {
             if (StatusChecker.BasicConditions())
             {
                 lock (_radarLock)
                 {
                     _allUnits   = ObjectManager.GetObjectWoWUnit();
                     _closeUnits = _allUnits.FindAll(e => e.GetDistance < 50);
                 }
             }
         }
         catch (Exception arg)
         {
             Logger.LogError("AIORadar -> " + string.Concat(arg));
         }
         Thread.Sleep(3000);
     }
     _isRunning = false;
 }
        public void DoRacialsPulse(object sender, DoWorkEventArgs args)
        {
            _isRunning = true;
            while (Main.isLaunched && _isRunning)
            {
                try
                {
                    if (StatusChecker.BasicConditions())
                    {
                        if (StatusChecker.OutOfCombat(RotationRole.None))
                        {
                            RacialCannibalize();
                        }

                        if (StatusChecker.InCombat())
                        {
                            RacialManaTap();
                            RacialWillOfTheForsaken();
                            RacialEscapeArtist();
                            RacialBerserking();
                            RacialArcaneTorrent();
                            RacialStoneForm();
                            RacialGiftOfTheNaaru();
                            RacialWarStomp();
                            RacialBloodFury();
                        }
                    }
                }
                catch (Exception arg)
                {
                    Logger.LogError(string.Concat(arg));
                }
                Thread.Sleep(500);
            }
            _isRunning = false;
        }