/// <inheritdoc /> /// <remarks> /// The <see cref="CoolFishBot" /> implementation of this method /// does some sanity checking and then starts the <see cref="CoolFishEngine" /> /// </remarks> public void StartBot() { if (!BotManager.IsAttached) { Logger.Warn("Please attach to a WoW process."); return; } if (!BotManager.LoggedIn) { Logger.Warn("Please log into the game first."); return; } if (UserPreferences.Default.DoLoot && (UserPreferences.Default.LootOnlyItems && UserPreferences.Default.DontLootLeft)) { Logger.Warn("You can't \"Loot only items on the left\" and \"Don't loot items on left\" at the same time"); return; } if (UserPreferences.Default.DoLoot && UserPreferences.Default.LootQuality < 0) { Logger.Warn("Please select a minimum loot quality from the drop down."); return; } if (UserPreferences.Default.StopOnTime) { try { var stoptime = DateTime.Now.AddMinutes(UserPreferences.Default.MinutesToStop); } catch (Exception ex) { Logger.Warn("Invalid stop time. Please specify a valid number of minutes to stop after.", ex); return; } } _theEngine.StartEngine(); }
/// <inheritdoc/> /// <remarks> /// The <see cref="CoolFishNS.Bots.CoolFishBot.CoolFishBot"/> implementation of this method /// does some sanity checking and then starts the <see cref="CoolFishEngine"/> /// </remarks> public void StartBot() { if (LocalSettings.Settings["LootOnlyItems"] && LocalSettings.Settings["DontLootLeft"]) { Logging.Write(LocalSettings.Translations["Loot Options Error"]); return; } if (LocalSettings.Settings["LootQuality"] < 0) { Logging.Write(LocalSettings.Translations["SelectLootQuality"]); return; } if (LocalSettings.Settings["StopOnTime"]) { _stopTimer = new Timer(Callback, null, 0, (int)(LocalSettings.Settings["MinutesToStop"].As <double>() * 60 * 1000)); } LocalSettings.DumpSettingsToLog(); _theEngine.StartEngine(); }