Beispiel #1
0
        // Constructor
        public FloodExtension(Account account)
        {
            _account      = account;
            Configuration = new FloodConfiguration(account);

            _seekChannelTimer    = new Timer(SeekChannel_Callback, null, Timeout.Infinite, Timeout.Infinite);
            _salesChannelTimer   = new Timer(SalesChannel_Callback, null, Timeout.Infinite, Timeout.Infinite);
            _generalChannelTimer = new Timer(GeneralChannel_Callback, null, Timeout.Infinite, Timeout.Infinite);

            _account.Game.Map.PlayerJoined += Map_PlayerJoined;
            _account.Game.Map.PlayerLeft   += Map_PlayerLeft;
        }
Beispiel #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    Configuration.Dispose();
                    _seekChannelTimer.Dispose();
                    _salesChannelTimer.Dispose();
                    _generalChannelTimer.Dispose();
                }

                Configuration        = null;
                _seekChannelTimer    = null;
                _salesChannelTimer   = null;
                _generalChannelTimer = null;
                _account             = null;

                disposedValue = true;
            }
        }