public override void Initialize() { base.Initialize(); base.ConsoleInterface = new WorldConsole(); this.VirtualConsoleInterface = new WorldVirtualConsole(); ConsoleBase.SetTitle("#Stump World Server : " + WorldServer.ServerInformation.Name); this.logger.Info("Initializing Database..."); base.DBAccessor = new DatabaseAccessor(WorldServer.DatabaseConfiguration); base.DBAccessor.RegisterMappingAssembly(System.Reflection.Assembly.GetExecutingAssembly()); base.InitializationManager.Initialize(InitializationPass.Database); base.DBAccessor.Initialize(); this.logger.Info("Opening Database..."); base.DBAccessor.OpenConnection(); DataManager.DefaultDatabase = base.DBAccessor.Database; DataManagerAllocator.Assembly = System.Reflection.Assembly.GetExecutingAssembly(); this.logger.Info("Register Messages..."); MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); this.logger.Info("Register Packet Handlers..."); this.HandlerManager = Singleton <WorldPacketHandler> .Instance; this.HandlerManager.RegisterAll(System.Reflection.Assembly.GetExecutingAssembly()); this.logger.Info("Register Commands..."); base.CommandManager.RegisterAll(System.Reflection.Assembly.GetExecutingAssembly()); base.InitializationManager.InitializeAll(); base.IsInitialized = true; }
public static void InitializeSSync() { SSyncCore.Initialize(Assembly.GetAssembly(typeof(RawDataMessage)), WorldAssembly, WorldConfiguration.Instance.ShowProtocolMessages); ProtocolTypeManager.Initialize(); }
/// <summary> /// Initializes a new instance of the <see cref = "Sniffer" /> class. /// </summary> public Sniffer(FormMain form) { m_form = form; m_form.cBSendTo.DataSource = new List <IdentifiedClient> { m_player, m_server }; m_form.cBSendTo.DisplayMember = "Name"; //m_form.cbMessageType.DataSource = MessageReceiver.GetMessages().ToList(); _moduleProvider.LoadModules(); AppDomain.CurrentDomain.GetAssemblies().ToDictionary(entry => entry.GetName().Name); MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); Port = DefaultPortToSniff; form.toolStripTextBoxPort.Text = Port.ToString(); form.toolStripTextBoxPort.TextChanged += (sender, e) => { int port; if (int.TryParse(form.toolStripTextBoxPort.Text, out port)) { Port = port; } else { form.toolStripTextBoxPort.Text = Port.ToString(); } }; }
static void Main(string[] args) { ProtocolTypeManager.Initialize(); foreach (var type in typeof(Message).Assembly.GetTypes().Where(x => !x.IsAbstract && typeof(Message).IsAssignableFrom(x))) { TestType(type); } }
public override void Initialize() { MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); Handler = new ClientPacketHandler(); Handler.RegisterAll(Context.PluginAssembly); NetworkClient = new NetworkClient(); NetworkClient.Initialize(); }
private static void Main() { Program.AlreadyExit = false; Control.CheckForIllegalCrossThreadCalls = false; Program.StartTime = Environment.TickCount; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ProtocolTypeManager.Initialize(); MessageReceiver.Initialize(); ServersManager.StartAllServers(); Application.Run((Form) new MainForm()); }
public override void Initialize() { try { base.Initialize(); ConsoleInterface = new AuthConsole(); ConsoleBase.SetTitle($"#Stump Authentification Server - {Version}"); logger.Info("Initializing Database..."); DBAccessor = new DatabaseAccessor(DatabaseConfiguration); DBAccessor.RegisterMappingAssembly(Assembly.GetExecutingAssembly()); InitializationManager.Initialize(InitializationPass.Database); DBAccessor.Initialize(); logger.Info("Opening Database..."); DBAccessor.OpenConnection(); DataManager.DefaultDatabase = DBAccessor.Database; DataManagerAllocator.Assembly = Assembly.GetExecutingAssembly(); logger.Info("Register Messages..."); MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); logger.Info("Register Packets Handlers..."); HandlerManager = AuthPacketHandler.Instance; HandlerManager.RegisterAll(Assembly.GetExecutingAssembly()); logger.Info("Register Commands..."); CommandManager.RegisterAll(Assembly.GetExecutingAssembly()); logger.Info("Start World Servers Manager"); WorldServerManager.Instance.Initialize(); logger.Info("Initialize Account Manager"); AccountManager.Instance.Initialize(); logger.Info("Initialize IPC Server.."); IpcHost = new IPCHost(IpcAddress, IpcPort); InitializationManager.InitializeAll(); IsInitialized = true; if (Environment.GetCommandLineArgs().Contains("-maintenance")) { m_maintenanceMode = true; } } catch (Exception ex) { HandleCrashException(ex); Shutdown(); } }
public static void Initialize(string assemblyName) { if (!IsInitialized) { //initiliaze frame ProtocolTypeManager.Initialize(); Assembly assembly = GetAssemblyByName(assemblyName); foreach (var type in assembly.GetTypes().SelectMany(x => x.GetMethods()).Where(m => m.GetCustomAttributes(typeof(PacketId), false).Length > 0).ToArray()) { PacketId attr = (PacketId)type.GetCustomAttributes(typeof(PacketId), true)[0]; Type stringType = Type.GetType(type.DeclaringType.FullName + ", " + assemblyName); var instance = Activator.CreateInstance(stringType, null); // instance d'une methode Methods.Add(new FrameData(instance, attr.MessageId, type)); } //initialize message assembly = GetAssemblyByName("Burning.DofusProtocol"); foreach (var type in assembly.GetTypes()) { if (type.Namespace == null || !type.Namespace.Contains("Burning.DofusProtocol.Network.Messages")) { continue; } object testInstance = Activator.CreateInstance(type); var getId = type.GetMethod("get_MessageId").Invoke(testInstance, null); if (getId != null) { try { if (!MessageList.ContainsKey((uint)getId)) { MessageList.Add((uint)getId, type); } } catch (Exception ex) {} } } IsInitialized = true; Console.WriteLine("Frame initialized !"); } }
public static void LoadProgram(ContainerLogger logger) { int time = Environment.TickCount; ConsoleManager.InitLogger(logger); logger.Info("#Démarrage de la solution..."); if (!ConfigurationManager.IsFileExists() || ConfigurationManager.GetEntryByName("GamePath") == null) { logger.Warning("Aucun fichier de configuration trouvé."); ConfigurationManager.SerializeConfig(); Application.Run(new PathForm()); if (ConfigurationManager.GetEntryByName("GamePath") == null) { System.Environment.Exit(1); return; } logger.Debug("Configuration définie."); } else { ConfigurationManager.DeserializeConfig(); logger.Debug("Fichier de configuration chargé."); } ProtocolTypeManager.Initialize(); MessageReceiver.Initialize(); try { NetworkManager.StartServers(); logger.Debug("Serveurs démarrés."); } catch (Exception ex) { logger.Error("[SERVERS] " + ex.Message); logger.Error("SERVERS - OFF"); } logger.Debug(string.Format("{0}ms", Environment.TickCount - time)); OnProgramLoaded(null); }
static void Main(string[] args) { MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); NLogHelper.DefineLogProfile(false, true); NLogHelper.EnableLogging(); Handler = new FakeClientPacketHandler(); Handler.RegisterAll(Assembly.GetExecutingAssembly()); var client1 = new FakeClient(1) { AccountName = "loom", AccountPassword = "******" }; client1.Connect("31.220.41.13", 5555); }
static void Main(string[] args) { IntPtr hWnd = Process.GetCurrentProcess().MainWindowHandle; SetWindowPos(hWnd, new IntPtr(HWND_TOPMOST), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); ProtocolTypeManager.Initialize(); MessageReceiver.Initialize(); string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"GamePath.txt"); string gamePath = System.IO.File.ReadAllText(path); ObjectDataManager.Instance.AddReaders(gamePath + @"\app\data\common"); FastD2IReader.Init((gamePath + @"\app\data\i18n\i18n_fr.d2i")); WebService.InitDofusHuntValues(); new Capture(); return; }
public void Initialize() { Instance = this; GCSettings.LatencyMode = GCSettings.IsServerGC ? GCLatencyMode.Batch : GCLatencyMode.Interactive; NLogHelper.DefineLogProfile(true, true); NLogHelper.EnableLogging(); logger.Info("Initializing Database..."); DBAccessor = new DatabaseAccessor(DatabaseConfiguration); DBAccessor.RegisterMappingAssembly(Assembly.GetExecutingAssembly()); DBAccessor.Initialize(); logger.Info("Opening Database..."); DBAccessor.OpenConnection(); DBAccessor.Database.ExecutingCommand += OnExecutingDBCommand; MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); HandlerManager = ServerPacketHandler.Instance; HandlerManager.RegisterAll(Assembly.GetExecutingAssembly()); ClientManager.Instance.Initialize(CreateClient); ClientManager.Instance.Start("x.x.x.x", 9250); WebServer.Initialize(); IOTaskPool = new SelfRunningTaskPool(50, "Main TaskPool"); IOTaskPool.CallPeriodically((int)TimeSpan.FromSeconds(10).TotalMilliseconds, KeepSQLConnectionAlive); IOTaskPool.CallPeriodically((int)TimeSpan.FromSeconds(10).TotalMilliseconds, WriteBufferLogs); IOTaskPool.Start(); logger.Info("Server listening at port 9250"); logger.Info("WebServer listening at port 9251"); // TeknoServer server = new TeknoServer("test", "test"); }
static void Main(string[] args) { MyConsole.Write("Lancement du serveur !"); ProtocolTypeManager.Initialize(); MessageReceiver.Initialize(); BaseServer.Pool = new SelfRunningTaskPool(50, "timer");; AuthServer.Instance.Start(); BaseServer.StartTime = Environment.TickCount; GC.Collect(); GC.WaitForPendingFinalizers(); System.Threading.Thread.Sleep(2500); // Histoire de voir ce que l'emu ecris :) Console.Clear(); ServerStats.SetupStats(); while (true) { } }
public override void Initialize() { base.Initialize(); ConsoleInterface = new WorldConsole(); VirtualConsoleInterface = new WorldVirtualConsole(); ConsoleBase.SetTitle($"#Stump World Server - {Version} : {ServerInformation.Name}"); logger.Info("Initializing Database..."); DBAccessor = new DatabaseAccessor(DatabaseConfiguration); DBAccessor.RegisterMappingAssembly(Assembly.GetExecutingAssembly()); foreach (var plugin in PluginManager.Instance.GetPlugins()) { DBAccessor.RegisterMappingAssembly(plugin.PluginAssembly); } InitializationManager.Initialize(InitializationPass.Database); DBAccessor.Initialize(); logger.Info("Opening Database..."); DBAccessor.OpenConnection(); DataManager.DefaultDatabase = DBAccessor.Database; DataManagerAllocator.Assembly = Assembly.GetExecutingAssembly(); DBAccessor.Database.ExecutingCommand += OnExecutingDBCommand; logger.Info("Register Messages..."); MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); logger.Info("Register Packet Handlers..."); HandlerManager = WorldPacketHandler.Instance; HandlerManager.RegisterAll(Assembly.GetExecutingAssembly()); logger.Info("Register Commands..."); CommandManager.RegisterAll(Assembly.GetExecutingAssembly()); InitializationManager.InitializeAll(); CommandManager.LoadOrCreateCommandsInfo(CommandsInfoFilePath); IsInitialized = true; }
public override void Initialize() { try { base.Initialize(); base.ConsoleInterface = new AuthConsole(); ConsoleBase.SetTitle("#Stump Authentification Server"); this.logger.Info("Initializing Database..."); base.DBAccessor = new DatabaseAccessor(AuthServer.DatabaseConfiguration); base.DBAccessor.RegisterMappingAssembly(Assembly.GetExecutingAssembly()); base.DBAccessor.Initialize(); this.logger.Info("Opening Database..."); base.DBAccessor.OpenConnection(); DataManagerAllocator.Assembly = System.Reflection.Assembly.GetExecutingAssembly(); DataManager.DefaultDatabase = base.DBAccessor.Database; this.logger.Info("Register Messages..."); MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); this.logger.Info("Register Packets Handlers..."); this.HandlerManager = Singleton <AuthPacketHandler> .Instance; this.HandlerManager.RegisterAll(Assembly.GetExecutingAssembly()); this.logger.Info("Register Commands..."); base.CommandManager.RegisterAll(Assembly.GetExecutingAssembly()); this.logger.Info("Start World Servers Manager"); Singleton <WorldServerManager> .Instance.Initialize(); this.logger.Info("Initialize IPC Server.."); IPCHost.Instance.Initialize(); base.InitializationManager.InitializeAll(); base.IsInitialized = true; } catch (Exception ex) { base.HandleCrashException(ex); base.Shutdown(); } }
public static void RegisterMessages() { MessageReceiver.Initialize(); ProtocolTypeManager.Initialize(); }
private void Form1_Load(object sender, EventArgs e) { ProtocolTypeManager.Initialize(); MessageReceiver.Initialize(); }