Exemplo n.º 1
0
        internal MissionRunner(IConfiguration configuration, IMissionCache missionCache, IAgentCache agentCache, IEveWindowProvider eveWindowProvider)
        {
            _configuration     = configuration;
            _missionCache      = missionCache;
            _agentCache        = agentCache;
            _eveWindowProvider = eveWindowProvider;

            BehaviorManager.BehaviorsToPulse.Add(BotModes.Missioning, this);
            ModuleName = "MissionRunner";
            CanSendCombatAssistanceRequests = true;
            PulseFrequency = 2;
            IsEnabled      = true;

            _betweenMissionsRandomWaitObject = new RandomWaitObject(ModuleName);
            _betweenMissionsRandomWaitObject.AddWait(new KeyValuePair <int, int>(601, 1800), 0.75);
            _betweenMissionsRandomWaitObject.AddWait(new KeyValuePair <int, int>(121, 600), 3.33);
            _betweenMissionsRandomWaitObject.AddWait(new KeyValuePair <int, int>(11, 120), 7.5);
            _betweenMissionsRandomWaitObject.AddWait(new KeyValuePair <int, int>(6, 10), 15);
            _betweenMissionsRandomWaitObject.AddWait(new KeyValuePair <int, int>(3, 5), 33);
            _betweenMissionsRandomWaitObject.AddWait(new KeyValuePair <int, int>(1, 2), 66.67);

            _duringMissionRandomWaitObject = new RandomWaitObject(ModuleName);
            _duringMissionRandomWaitObject.AddWait(new KeyValuePair <int, int>(11, 22), 5);
            _duringMissionRandomWaitObject.AddWait(new KeyValuePair <int, int>(1, 4), 25);
        }
Exemplo n.º 2
0
 public InventoryProvider(ILogging logging, IEveWindowProvider eveWindowProvider, IShipCache shipCache, IEve eve)
 {
     _logging           = logging;
     _eveWindowProvider = eveWindowProvider;
     _shipCache         = shipCache;
     _eve = eve;
 }
Exemplo n.º 3
0
        public MissionProcessor(IEveWindowProvider eveWindowProvider, IMovement movement)
        {
            _eveWindowProvider = eveWindowProvider;
            _movement          = movement;

            ModuleManager.ModulesToPulse.Add(this);
            ModuleName     = "MissionProcessor";
            IsEnabled      = true;
            PulseFrequency = 2;
        }
Exemplo n.º 4
0
        internal MeCache(IIsxeveProvider isxeveProvider, IEveWindowProvider eveWindowProvider)
        {
            _isxeveProvider    = isxeveProvider;
            _eveWindowProvider = eveWindowProvider;

            PulseFrequency = 1;
            ModuleManager.CachesToPulse.Add(this);
            ToEntity        = new MeToEntityCache();
            Ship            = new ShipCache();
            base.ModuleName = "MeCache";
        }
Exemplo n.º 5
0
        public CorporateHangarArray(IEntityWrapper corporateHangarArrayEntity, IEveWindowProvider eveWindowProvider)
            : base(eveWindowProvider)
        {
            ModuleName = "CorporateHangarArray";

            if (corporateHangarArrayEntity == null)
            {
                throw new ArgumentNullException("corporateHangarArrayEntity");
            }

            _corporateHangarArrayEntity = corporateHangarArrayEntity;
        }
Exemplo n.º 6
0
        internal ModuleManager(IIsxeveProvider isxeveProvider, IEveWindowProvider eveWindowProvider)
        {
            _isxeveProvider    = isxeveProvider;
            _eveWindowProvider = eveWindowProvider;

            //Set the object name
            ModuleName = "ModuleManager";
            //Set the pulse frequency, default to fastest until otherwise set
            PulseFrequency = 1;
            //make sure it's enabled
            IsEnabled = true;
            //Don't need to add this to a list of modules to pulse; it's pulsed from StealthBot.
        }
Exemplo n.º 7
0
        internal AgentCache(IFileManager fileManager, IMeCache meCache, IConfiguration configuration, IEveWindowProvider eveWindowProvider)
        {
            _fileManager       = fileManager;
            _meCache           = meCache;
            _configuration     = configuration;
            _eveWindowProvider = eveWindowProvider;

            ModuleName = "AgentCache";

            _readCallback  = FileReadCallback;
            _writeCallback = FileWriteCallback;

            ModuleManager.ModulesToPulse.Add(this);
        }
Exemplo n.º 8
0
        internal Station(IIsxeveProvider isxeveProvider, IEveWindowProvider eveWindowProvider)
        {
            _isxeveProvider    = isxeveProvider;
            _eveWindowProvider = eveWindowProvider;

            IsEnabled  = false;
            ModuleName = "Station";

            _stationTypeIds = new List <int>
            {
                (int)TypeIDs.Concord_Starbase,
                (int)TypeIDs.Minmatar_Trade_Post,
                (int)TypeIDs.Amarr_Trade_Post,
                (int)TypeIDs.Minmatar_Hub
            };
        }
Exemplo n.º 9
0
        //Initialize the class
        public Freighter(IEveWindowProvider eveWindowProvider, ICargoConfiguration cargoConfiguration, IMainConfiguration mainConfiguration,
                         IMiningConfiguration miningConfiguration, IMeCache meCache, IShip ship, IStation station, IJettisonContainer jettisonContainer,
                         IEntityProvider entityProvider, IEventCommunications eventCommunications, MoveToDropOffLocationPartialBehavior moveToDropOffLocationPartialBehavior,
                         DropOffCargoPartialBehavior dropOffCargoPartialBehavior, IMovement movement)
        {
            _eveWindowProvider = eveWindowProvider;
            _moveToDropOffLocationPartialBehavior = moveToDropOffLocationPartialBehavior;
            _dropOffCargoPartialBehavior          = dropOffCargoPartialBehavior;
            _movement          = movement;
            _ship              = ship;
            _meCache           = meCache;
            _mainConfiguration = mainConfiguration;

            ModuleName     = "Freighter";
            PulseFrequency = 2;
            BehaviorManager.BehaviorsToPulse.Add(BotModes.Freighting, this);
            IsEnabled = true;
        }
Exemplo n.º 10
0
        public DropOffCargoPartialBehavior(IEveWindowProvider eveWindowProvider, ICargoConfiguration cargoConfiguration, IMainConfiguration mainConfiguration,
                                           IMiningConfiguration miningConfiguration, IMeCache meCache, IShip ship, IStation station, IJettisonContainer jettisonContainer,
                                           IEntityProvider entityProvider, IEventCommunications eventCommunications)
        {
            _eveWindowProvider   = eveWindowProvider;
            _cargoConfiguration  = cargoConfiguration;
            _mainConfiguration   = mainConfiguration;
            _miningConfiguration = miningConfiguration;
            _meCache             = meCache;
            _ship                = ship;
            _station             = station;
            _jettisonContainer   = jettisonContainer;
            _entityProvider      = entityProvider;
            _eventCommunications = eventCommunications;

            ModuleName = "DropOffCargoPartialBehavior";

            _doDropoffRandomWait = new RandomWaitObject(ModuleName);
            _doDropoffRandomWait.AddWait(new KeyValuePair <int, int>(601, 1800), 1.5);
            _doDropoffRandomWait.AddWait(new KeyValuePair <int, int>(121, 600), 6.67);
            _doDropoffRandomWait.AddWait(new KeyValuePair <int, int>(11, 120), 15);
            _doDropoffRandomWait.AddWait(new KeyValuePair <int, int>(6, 10), 30);
            _doDropoffRandomWait.AddWait(new KeyValuePair <int, int>(1, 5), 66.67);
        }
Exemplo n.º 11
0
        public override bool Initialize()
        {
            IsCleanedUpOutOfFrame = false;

            _isxeveProvider    = new IsxeveProvider();
            _eveWindowProvider = new EveWindowProvider();

            #region Core object construction
            //Background stuff
            Logging     = new Logging();
            LogCallback = LogIsxeveMessage;
            Tracing.AddCallback(LogCallback);

            _mathUtility        = new MathUtility();
            Statistics          = new Statistics();
            EventCommunications = new EventCommunications(Logging);
            FileManager         = new FileManager();

            //moduleManager and BehaviorManager
            ModuleManager = new ModuleManager(_isxeveProvider, _eveWindowProvider);

            //Me cache. Contains the other caches.
            MeCache = new MeCache(_isxeveProvider, _eveWindowProvider);

            //ConfigurationManager
            Config = new Configuration();
            ConfigurationManager = new ConfigurationManager(Config, MeCache);

            Ship = new Ship(_isxeveProvider, _eveWindowProvider, MeCache, MeCache.Ship, Config.CargoConfig, Statistics, Config.MovementConfig);

            //Entity Populator object
            EntityProvider = new EntityProvider(_isxeveProvider);

            //Other Cache and Data classes
            MissionCache = new MissionCache(_isxeveProvider, _eveWindowProvider);
            AgentCache   = new AgentCache(FileManager, MeCache, Config, _eveWindowProvider);

            BookMarkCache  = new BookMarkCache(MeCache, EntityProvider, Logging, _isxeveProvider);
            NpcBountyCache = new NpcBountyCache();
            //EVEDB modules
            PilotCache       = new PilotCache();
            AllianceCache    = new AllianceCache(FileManager);
            CorporationCache = new CorporationCache();
            MissionDatabase  = new MissionDatabase();
            PossibleEwarNpcs = new PossibleEwarNpcs();

            //Core Functionality Providers, not necessarily caches
            TargetQueue          = new TargetQueue(MeCache, EntityProvider, Config.MiningConfig, Config.MainConfig);
            JetCan               = new JettisonContainer(_eveWindowProvider);
            Social               = new Social(_isxeveProvider);
            Station              = new Station(_isxeveProvider, _eveWindowProvider);
            AsteroidBelts        = new AsteroidBelts(Config, MeCache, EntityProvider, BookMarkCache, Ship);
            Bookmarks            = new Bookmarks(MeCache, Station, Config, BookMarkCache, AsteroidBelts, _isxeveProvider);
            Drones               = new Drones(_isxeveProvider);
            Fleet                = new Fleet();
            Alerts               = new Alerts(Config, MeCache, Logging);
            _anomalyProvider     = new AnomalyProvider(MeCache.Ship);
            _anomalyClaimTracker = new AnomalyClaimTracker(Logging, EventCommunications, MeCache);
            _safespots           = new Safespots(MeCache, BookMarkCache, Config.MovementConfig, MeCache.ToEntity, EntityProvider, _isxeveProvider, Ship, Social, _mathUtility, Logging);

            Attackers = new Attackers(MeCache, Config, Ship, Drones, EntityProvider, Alerts, AsteroidBelts, PossibleEwarNpcs, TargetQueue, ModuleManager);
            #endregion

            #region ActionModule construction
            //Action classes
            Movement     = new Movement(_isxeveProvider, EntityProvider, MeCache, _anomalyProvider, TargetQueue, Ship, Drones);
            Targeting    = new Targeting(Logging, Config.MaxRuntimeConfig, MeCache, Ship, Drones, Alerts, ModuleManager, TargetQueue, EntityProvider, Movement);
            Offensive    = new Offensive(Logging, TargetQueue, EntityProvider);
            NonOffensive = new NonOffensive(MeCache, Config.MiningConfig, Config.DefenseConfig, EntityProvider, TargetQueue, Ship, Drones, Targeting, Movement);
            Defense      = new Defense(_isxeveProvider, EntityProvider, Ship, MeCache, Config.DefenseConfig, Social, Drones, Alerts, _safespots, Movement);
            #endregion

            #region Processor construction
            MissionProcessor = new MissionProcessor(_eveWindowProvider, Movement);
            #endregion

            #region BehaviorModule construction
            _moveToDropOffLocationPartialBehavior = new MoveToDropOffLocationPartialBehavior(Movement, EntityProvider, Config.CargoConfig, BookMarkCache, Bookmarks,
                                                                                             Config.MovementConfig, MeCache, _mathUtility, _isxeveProvider);
            _dropOffCargoPartialBehavior = new DropOffCargoPartialBehavior(_eveWindowProvider, Config.CargoConfig, Config.MainConfig, Config.MiningConfig,
                                                                           MeCache, Ship, Station, JetCan, EntityProvider, EventCommunications);

            //Behavior classes
            BehaviorManager = new BehaviorManager();
            Mining          = new Mining(Config.CargoConfig, Config.MainConfig, MeCache, Ship, EntityProvider,
                                         _safespots, Movement, Social, Config.MovementConfig, AsteroidBelts, _moveToDropOffLocationPartialBehavior, _dropOffCargoPartialBehavior, Config.MiningConfig,
                                         _isxeveProvider, BookMarkCache, TargetQueue);
            Hauler = new Hauler(_eveWindowProvider, Config.CargoConfig, Config.MainConfig, Config.MiningConfig, MeCache, Ship, Station, JetCan, EntityProvider, EventCommunications,
                                _safespots, Movement, BookMarkCache, _moveToDropOffLocationPartialBehavior);
            BoostCanOrca = new BoostCanOrca();
            BoostOrca    = new BoostOrca(BookMarkCache, Config.MiningConfig, Bookmarks, _safespots, Movement, Config.MainConfig, Ship, MeCache);
            Freighter    = new Freighter(_eveWindowProvider, Config.CargoConfig, Config.MainConfig,
                                         Config.MiningConfig, MeCache, Ship, Station, JetCan, EntityProvider, EventCommunications, _moveToDropOffLocationPartialBehavior, _dropOffCargoPartialBehavior, Movement);
            MissionRunner     = new MissionRunner(Config, MissionCache, AgentCache, _eveWindowProvider);
            JumpStabilityTest = new JumpStabilityTest();
            Ratting           = new Ratting(Social, MeCache, Bookmarks, Config.SalvageConfig, Config.RattingConfig, _anomalyProvider, EntityProvider, _anomalyClaimTracker, _safespots,
                                            Movement, Ship, AsteroidBelts, Config.MovementConfig, Alerts, TargetQueue, Attackers);
            #endregion

            //StealthBotUI Interop construction
            //SbUiCommunication = new SbUiCommunication();

#if DEBUG
            LavishScript.ExecuteCommand("ISXEVE:Debug_SetHighPerfLogging[1]");
#endif

            return(true);
        }
Exemplo n.º 12
0
// ReSharper restore InconsistentNaming

        protected CargoContainer(IEveWindowProvider eveWindowProvider)
        {
            _eveWindowProvider = eveWindowProvider;

            ModuleName = "CargoContainer";
        }
Exemplo n.º 13
0
 public JettisonContainer(IEveWindowProvider eveWindowProvider)
     : base(eveWindowProvider)
 {
     CurrentContainerId = -1;
     ModuleName         = "JetCan";
 }