Пример #1
0
        public EventCommunications(ILogging logging) : base(logging)
        {
            PulseFrequency = 5;
            ModuleManager.ModulesToDispose.Add(this);
            IsEnabled  = false;
            ModuleName = "EventCommunications";

            ConfigurationFilesUpdatedEvent  = new ConfigurationFilesUpdatedEvent(_logging, RelayGroup, StealthBotEvents.ConfigurationFilesUpdated.ToString());
            FleetAcceptInvitationEvent      = new FleetAcceptInvitationEvent(_logging, RelayGroup, StealthBotEvents.FleetAcceptInvitation.ToString());
            FleetNeedMemberSkillsEvent      = new FleetNotificationEvent(_logging, RelayGroup, StealthBotEvents.FleetNeedMemberSkills.ToString());
            FleetMemberSkillsReceivedEvent  = new FleetMemberSkillsReceivedEvent(_logging, RelayGroup, StealthBotEvents.FleetMemberSkillsReceived.ToString());
            FleetNeedCombatAssistEvent      = new FleetNeedCombatAssistEvent(_logging, RelayGroup, StealthBotEvents.FleetNeedCombatAssist.ToString());
            FleetNeedPickupEvent            = new FleetNeedPickupEvent(_logging, RelayGroup, StealthBotEvents.FleetNeedPickup.ToString());
            FleetNeedPickupConfirmedEvent   = new FleetNeedPickupEvent(_logging, RelayGroup, StealthBotEvents.FleetNeedPickupConfirmed.ToString());
            FleetPickupCompletedEvent       = new FleetNeedPickupEvent(_logging, RelayGroup, StealthBotEvents.FleetPickupCompleted.ToString());
            FleetSendAllPickupRequestsEvent = new FleetNotificationEvent(_logging, RelayGroup, StealthBotEvents.FleetSendAllPickupRequests.ToString());

            AnomalyClaimedEvent = new AnomalyClaimedEvent(_logging, RelayGroup, StealthBotEvents.AnomalyClaimed.ToString());

            JoinRelayGroup();
        }
Пример #2
0
        private void Dispose(bool disposing)
        {
            if (_isDisposed)
            {
                return;
            }

            _isDisposed = true;

            if (disposing)
            {
                ConfigurationFilesUpdatedEvent.Dispose();
                FleetAcceptInvitationEvent.Dispose();
                FleetNeedMemberSkillsEvent.Dispose();
                FleetMemberSkillsReceivedEvent.Dispose();
                FleetNeedCombatAssistEvent.Dispose();
                FleetNeedPickupEvent.Dispose();
                FleetNeedPickupConfirmedEvent.Dispose();
                FleetPickupCompletedEvent.Dispose();
                FleetSendAllPickupRequestsEvent.Dispose();
                AnomalyClaimedEvent.Dispose();
            }
        }