Esempio n. 1
0
 private static void OnGameLeft(object sender, EventArgs e)
 {
     ExplodingPalm.Stop();
     MantraTimer.Stop();
     AllyTimer.Stop();
     PrimarySpamTimer.Stop();
 }
Esempio n. 2
0
 public void Tick()
 {
     if (WorldManager.ZoneId != Constants.SouthShroudZoneId && (!DungeonQueue.IsFinished || _error))
     {
         _error = false;
         DungeonQueue.Stop();
         return;
     }
     if (!DungeonQueue.IsFinished)
     {
         foreach (var x in GamelogManager.CurrentBuffer.Where(i => i.MessageType == (MessageType)2876))
         {
             HandleErrorMessages(x);
         }
     }
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
 private static void ResetTimers(object sender, EventArgs e)
 {
     FamiliarTimer.Stop();
     BlizzardTimer.Stop();
     HydraTimer.Stop();
     MeteorTimer.Stop();
     ExplosiveBlast.Stop();
 }
Esempio n. 5
0
 private void OnPulse(object sender, EventArgs e)
 {
     if (_pulseTimer.IsFinished)
     {
         _pulseTimer.Stop();
         Scans();
         _pulseTimer.Reset();
     }
 }
Esempio n. 6
0
        public C_WoWGameObject(WoWGameObject obj)
            : base(obj)
        {
            RefWoWGameObject = obj;

            switch (SubType)
            {
            case WoWObjectTypes.OreVein:
                ShouldLoot           = TargetManager.CheckLootFlag(TargetManager.LootFlags.Ore);
                IgnoresRemoval       = Player.InsideGarrison;
                InteractRange        = 6f;
                LineofSightWaitTimer = new WaitTimer(new TimeSpan(0, 0, 0, 2, 500));
                LineofSightWaitTimer.Stop();
                break;

            case WoWObjectTypes.Herb:
                ShouldLoot     = TargetManager.CheckLootFlag(TargetManager.LootFlags.Herbs);
                IgnoresRemoval = Player.InsideGarrison;
                InteractRange  = 5f;
                break;

            case WoWObjectTypes.GarrisonCommandTable:
            case WoWObjectTypes.GarrisonCache:
                IgnoresRemoval = true;
                return;

            case WoWObjectTypes.GarrisonShipment:
                InteractRange  = 5.8f;
                IgnoresRemoval = true;
                return;

            case WoWObjectTypes.GarrisonFinalizePlot:
                break;

            case WoWObjectTypes.Mailbox:
                InteractRange  = 6f;
                IgnoresRemoval = true;
                return;

            case WoWObjectTypes.Timber:
                ShouldLoot    = TargetManager.CheckLootFlag(TargetManager.LootFlags.Lumber);
                InteractRange = 5f;
                break;

            case WoWObjectTypes.Unknown:
                RequiresUpdate = false;
                break;
            }

            if (!ObjectCacheManager.LootIds.Contains(Entry))
            {
                return;
            }
            ShouldLoot     = true;
            RequiresUpdate = true;
        }
Esempio n. 7
0
 private static void OnGameLeft(object sender, EventArgs e)
 {
     VaultMovementTimer.Stop();
     MarkTimer.Stop();
     SmokeScreenTimer.Stop();
     CompanionTimer.Stop();
     ShadowPowerTimer.Stop();
     TrapTimer.Stop();
     ShurikenCloudTimer.Stop();
 }
 private void StopButton_Click(object sender, EventArgs e)
 {
     CountdownThread.CancelAsync();
     WaitTimer.Stop();
     StopButton.Enabled = false;
     if (CountdownThread.IsBusy)
     {
         StartButton.Enabled = true;
     }
 }
Esempio n. 9
0
 private void OnPulse(object sender, EventArgs e)
 {
     if (!Adventurer.GetCurrentTag().StartsWith("KeywardensTag"))
     {
         DisablePulse();
         return;
     }
     if (_pulseTimer.IsFinished)
     {
         _pulseTimer.Stop();
         Scans();
         _pulseTimer.Reset();
     }
 }
        private void timer1_Tick(object sender, EventArgs e)
        {
            string  dec1 = XmlReader.GetBackupTime();
            decimal MAX;

            MAX = Convert.ToDecimal(dec1);
            dec = dec + 0.0167M;
#if DEBUG
            dec = MAX;
#endif
            if (dec >= MAX + 0.001M)
            {
                WaitTimer.Stop();
            }
        }
Esempio n. 11
0
        public Vector3 FindNearestHostileUnitLocation()
        {
            if (!HostileSearchTimer.IsFinished)
            {
                return(_hostileLocation);
            }
            HostileSearchTimer.Stop();
            var actor = ZetaDia.Actors.GetActorsOfType <DiaUnit>(true).Where(o => o.IsValid && o.CommonData != null && o.CommonData.IsValid && o.IsAlive && o.CommonData.MinimapVisibilityFlags != 0).OrderBy(o => o.Distance).FirstOrDefault();

            HostileSearchTimer.Reset();

            if (actor == null)
            {
                return(Vector3.Zero);
            }
            Logger.Debug("[ClearLevelArea] Found a hostile unit {0} at {1} distance", ((SNOActor)actor.ActorSnoId).ToString(), actor.Distance);
            return(actor.Position);
        }
Esempio n. 12
0
 private static void OnGameLeft(object sender, EventArgs e)
 {
     SprintTimer.Stop();
     RendTimer.Stop();
     PrimarySpamTimer.Stop();
 }
 void OnWaitTimerTick(object sender, EventArgs e)
 {
     WaitTimer.Stop();
     this.HideWaitForm();
 }
Esempio n. 14
0
 private void WaitTimer_Tick(object sender, EventArgs e)
 {
     WaitTimer.Stop();
 }
 private static void ResetTimers(object sender, EventArgs e)
 {
     LagTimer.Stop();
 }
 public override void Initialize()
 {
     Delay = new WaitTimer(TimeSpan.FromSeconds(1));
     Delay.Stop();
     base.Initialize();
 }
Esempio n. 17
0
 private static void OnGameLeft(object sender, EventArgs e)
 {
     AcidTimer.Stop();
     LocustSwarmTimer.Stop();
     HauntTimer.Stop();
 }
Esempio n. 18
0
 private void WaitTimer_Tick(object sender, EventArgs e)
 {
     tbCommunication.AppendText(string.Format("WaitTimer active for: {0}{1}", WaitTimer.Interval.ToString(), "\r\n"));
     WaitTimer.Stop();
 }
        private void CountdownThread_DoWork(object sender, DoWorkEventArgs e)
        {
            #region Variables

            string  FROM;
            string  TO;
            string  Compression;
            decimal MAX;
            string  MAX1;

            #endregion

            while (CountdownThread.CancellationPending == false)
            {
                FROM        = XmlReader.GetWorld();
                TO          = XmlReader.GetBackupTo();
                Compression = XmlReader.UseCompression();
                MAX1        = XmlReader.GetBackupTime();
                MAX         = Convert.ToDecimal(MAX1);

                #region Do if variables not set

                if (FROM == "" || TO == "" || MAX == 0 || MAX1 == "")
                {
                    while (CountdownThread.CancellationPending == false)
                    {
                        WaitTimer.Stop();
                        Log.MakeLog(null, "required things are blank:  FROM:   " + FROM + "   TO:   " + TO + "  COMPRESSION:" + Compression + "TIMER:   " + MAX.ToString());
                        this.Invoke((MethodInvoker) delegate() { StartButton.Enabled = true; });
                        this.Invoke((MethodInvoker) delegate() { StopButton.Enabled = false; });
                        CountdownThread.CancelAsync();
                        this.Invoke((MethodInvoker) delegate() { HelpLabel.Visible = true; });
                        e.Cancel = true;
                        return;
                    }
                }

                #endregion

                if (dec != 0.00M && !CountdownThread.CancellationPending)  //reset value when thread runs//
                {
                    dec = 0.00M;
                }

                #region Assign variables


                DirFrom = FROM;
                DirTo   = TO;



                if (!DirFrom.EndsWith("\\") && DirFrom != "FTP")
                {
                    DirFrom = DirFrom + "\\";
                }
                if (!DirTo.EndsWith("\\") && DirTo != "FTP")
                {
                    DirTo = DirTo + "\\";
                }

                #endregion

                while (dec < MAX && !CountdownThread.CancellationPending)  //Checks the time left is less than the total time
                {
                    //do nothing//
                }

                DateNTime = DateTime.Now.ToString("MM.dd.yyyy  hh-mm-ss");

                #region Create directory and copy world

                if (Directory.Exists(DirTo) && DirTo != "FTP")
                {
                    if (!Directory.Exists(DirTo + DateNTime))  //create the directory for the current time if it does not exist
                    {
                        Directory.CreateDirectory(DirTo + DateNTime);
                    }

                    if (DirFrom == "FTP")  //if the from directory is FTP, start FTP downloading
                    {
                        Ftp_Download FTP = new Ftp_Download();
                        FTP.main(DateNTime);
                        if (Compression == "yes")
                        {
                            CompressionBackground.RunWorkerAsync();
                        }
                    }
                    else if (DirTo == "FTP")
                    {
                        Ftp_Upload upload = new Ftp_Upload();
                        upload.Upload(DateNTime);
                    }
                    else if (DirFrom != "FTP")  //if the from directory is not FTP, copy the directory.
                    {
                        #region create directories


                        foreach (string dirPath in Directory.GetDirectories(DirFrom, "*", SearchOption.AllDirectories))
                        {
                            Directory.CreateDirectory(dirPath.Replace(DirFrom, DirTo + DateNTime + "\\"));
                        }


                        foreach (string newPath in Directory.GetFiles(DirFrom, "*.*", SearchOption.AllDirectories))
                        {
                            File.Copy(newPath, newPath.Replace(DirFrom, DirTo + DateNTime + "\\"));
                        }


                        #endregion



                        if (Compression == "yes")
                        {
                            CompressionBackground.RunWorkerAsync();
                        }
                    }
                    else
                    {
                        //error
                    }
                }
                else if (!Directory.Exists(DirTo) && DirTo != "FTP")
                {
                    Directory.CreateDirectory(DirTo);
                    if (DirFrom == "FTP")
                    {
                        Ftp_Download FTP = new Ftp_Download();
                        FTP.main(DateNTime);
                        if (Compression == "yes")
                        {
                            CompressionBackground.RunWorkerAsync();
                        }
                    }
                    else
                    {
                        foreach (string CreateDir in Directory.GetDirectories(DirFrom, "*", SearchOption.AllDirectories))
                        {
                            Directory.CreateDirectory(CreateDir.Replace(DirFrom, DirTo + DateNTime + "\\"));  //create each sub directory
                        }
                        foreach (string file in Directory.GetFiles(DirFrom, "*", SearchOption.AllDirectories))
                        {
                            File.Copy(file, file.Replace(DirFrom, DirTo + DateNTime + "\\"));  //copy each file in sub directories, and in main directory
                        }

                        if (Compression == "yes")
                        {
                            CompressionBackground.RunWorkerAsync();
                        }
                    }
                }
                else if (DirTo == "FTP")
                {
                    Ftp_Upload Upload = new Ftp_Upload();
                    Upload.Upload(DateNTime);
                }
                else
                {
                    //Error//
                    MessageBox.Show("ERROR");
                }
                #endregion
            }
        }