Пример #1
0
        protected override void Startup()
        {
            this.InvokeOperationSafely(() =>
            {
                _instance = this;

                this.Core.CharacterFilter.LoginComplete += CharacterFilter_LoginComplete;
                this.Core.CharacterFilter.Logoff += CharacterFilter_Logoff;
                this.CoreManager.PluginInitComplete += CoreManager_PluginInitComplete;
                //CoreManager.Current.PluginInitComplete += Current_PluginInitComplete;

                this._pluginBaseEventsHelper = new PluginBaseEventsHelper();

                this.ClientDispatch += RTWrapperPlugin_ClientDispatch;
                this.ServerDispatch += RTWrapperPlugin_ServerDispatch;

                this._wrappedPlugin = WrapperUtilities.CreateWrappedPluginInstance("RedoxExtensions");
                this._wrappedPlugin.WrappedStartup(this, this._pluginBaseEventsHelper);
            });
        }
Пример #2
0
        protected override void Shutdown()
        {
            this.InvokeOperationSafely(() =>
            {
                this.Core.CharacterFilter.LoginComplete -= CharacterFilter_LoginComplete;
                this.Core.CharacterFilter.Logoff -= CharacterFilter_Logoff;
                this.CoreManager.PluginInitComplete -= CoreManager_PluginInitComplete;

                this.ClientDispatch -= RTWrapperPlugin_ClientDispatch;
                this.ServerDispatch -= RTWrapperPlugin_ServerDispatch;

                this._wrappedPlugin.WrappedShutdown();
                this._wrappedPlugin = null;
                this._pluginBaseEventsHelper = null;

                _instance = null;
            });
        }