示例#1
0
 private void SettingsLoad(object sender, EventArgs e)
 {
     GrindingSettings.LoadSettings();
     GrinderCBSkin.Checked           = GrindingSettings.Skin;
     GrinderCBLoot.Checked           = GrindingSettings.Loot;
     GrinderCBWaitForLoot.Checked    = GrindingSettings.WaitForLoot;
     GrinderCBStopLootOnFull.Checked = GrindingSettings.StopLootOnFull;
     GrinderCBJumpRandomly.Checked   = GrindingSettings.Jump;
     GrinderIntAppRange.Value        = GrindingSettings.ApproachRange;
     GrinderCBSkipPullOnAdds.Checked = GrindingSettings.SkipMobsWithAdds;
     GrinderIntSkipAddsDis.Value     = GrindingSettings.SkipAddsDistance;
     GrinderIntSkipAddMaxCount.Value = GrindingSettings.SkipAddsCount;
     UseMount.Checked = GrindingSettings.Mount;
     CBTrain.Checked  = GrindingSettings.ShouldTrain;
 }
示例#2
0
        public void Load()
        {
            var dlg = new OpenFileDialog();

            dlg.Filter = "File (*.xml)|*.xml";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                string profileToLoad = dlg.FileName;
                if (profileToLoad.Contains(".xml"))
                {
                    GrindingSettings.Profile = profileToLoad;
                    GrindingSettings.SaveSettings();
                    LoadNoDialog(profileToLoad);
                }
            }
        }
示例#3
0
 private void SaveSettingsClick(object sender, EventArgs e)
 {
     GrindingSettings.Skin             = GrinderCBSkin.Checked;
     GrindingSettings.Loot             = GrinderCBLoot.Checked;
     GrindingSettings.WaitForLoot      = GrinderCBWaitForLoot.Checked;
     GrindingSettings.StopLootOnFull   = GrinderCBStopLootOnFull.Checked;
     GrindingSettings.Jump             = GrinderCBJumpRandomly.Checked;
     GrindingSettings.ApproachRange    = GrinderIntAppRange.Value;
     GrindingSettings.SkipMobsWithAdds = GrinderCBSkipPullOnAdds.Checked;
     GrindingSettings.SkipAddsDistance = GrinderIntSkipAddsDis.Value;
     GrindingSettings.SkipAddsCount    = GrinderIntSkipAddMaxCount.Value;
     GrindingSettings.Mount            = UseMount.Checked;
     GrindingSettings.ShouldTrain      = CBTrain.Checked;
     GrindingSettings.SaveSettings();
     Close();
 }
示例#4
0
        public void Load()
        {
            GrindingSettings.LoadSettings();
            var    executableFileInfo      = new FileInfo(Application.ExecutablePath);
            string executableDirectoryName = executableFileInfo.DirectoryName;

            OurDirectory = executableDirectoryName;
            if (!string.IsNullOrEmpty(GrindingSettings.Profile) && File.Exists(GrindingSettings.Profile))
            {
                CurrentProfile = new PathProfile();
                CurrentProfile.LoadNoDialog(GrindingSettings.Profile);
            }
            else
            {
                CurrentProfile = null;
                Logging.Write(LogType.Error, "Could not load a valid grinding profile");
            }
        }
示例#5
0
 public void Close()
 {
     Navigator.Stop();
     GrindingSettings.SaveSettings();
     CloseWindows();
 }
示例#6
0
        public bool EngineStart()
        {
            GrindingSettings.LoadSettings();
            if (!ObjectManager.InGame)
            {
                Logging.Write(LogType.Info, "【地面战斗】先登录游戏");
                return(false);
            }
            if (ObjectManager.MyPlayer.IsDead && ObjectManager.MyPlayer.IsGhost)
            {
                Logging.Write(LogType.Info, "【地面战斗】先复活吧");
                return(false);
            }
            if (CurrentProfile == null)
            {
                Logging.Write(LogType.Info, "【地面战斗】先读取一个Profile文件");
                return(false);
            }
            Navigator  = new GrindingNavigator();
            Navigation = new GrindingNavigation(CurrentProfile);
            GrindingSettings.LoadSettings();
            ToTown.SetToTown(false);
            switch (CurrentMode)
            {
            case Mode.TestToTown:
                Logging.Write(LogType.Warning,
                              "Starting Grinding engine in TestToTown mode, next start will be in normal mode THIS IS TODO");
                //TODO
                break;

            default:
                _states = new List <MainState>
                {
                    new StatePull(),
                    new StateLoot(),
                    new StateMoving(),
                    new StateTrainer(),
                    new StateResting(),
                    new StateResurrect(),
                    new StateCombat(),
                    new StateToTown(),
                    new StateVendor(),
                };
                break;
            }
            Stuck.Run();
            CurrentMode = Mode.Normal;
            CombatHandler.CombatStatusChanged += CombatChanged;
            CloseWindows();
            loots      = 0;
            _kills     = 0;
            _death     = 0;
            _xpInitial = ObjectManager.MyPlayer.Experience;
            _startTime = DateTime.Now;

            /*
             * if (GrindingSettings.ShouldTrain)
             * {
             *  ShouldTrain = GrindingShouldTrain.ShouldTrain();
             * }*/
            PullController.Start();
            return(true);
        }