static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "-------------------- Lobby Server ---------------------", ConsoleColor.Blue); Log.Texte("", "---Dawn of Reckoning project since 2008-2019 BY LEO228---", ConsoleColor.Red); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <LobbyConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Client = new RpcClient("LobbyServer", Config.RpcInfo.RpcLocalIp, 1); if (!Client.Start(Config.RpcInfo.RpcServerIp, Config.RpcInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } if (!TCPManager.Listen <TCPServer>(Config.ClientPort, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("LobbyServer"); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ APB-File", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Assembly.Load("Common"); Log.Info("FileServer", "Starting..."); ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <FileServerConfig>(); if (!Log.InitLog(Config.LogLevel, "FileServer")) { ConsoleMgr.WaitAndExit(2000); } Server = new RpcServer(Config.RpcInfo.RpcClientStartingPort, 0); if (!Server.Start(Config.RpcInfo.RpcIp, Config.RpcInfo.RpcPort)) { ConsoleMgr.WaitAndExit(2000); } Log.Success("FileServer", "Server loaded."); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "-------------------- Account Cacher -------------------", ConsoleColor.DarkRed); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <AccountConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "AccountCacher")) { ConsoleMgr.WaitAndExit(2000); } AccountMgr.Database = DBManager.Start(Config.AccountDB.Total(), Config.AccountDB.ConnectionType, "Accounts", Config.AccountDB.Database); if (AccountMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } Server = new RpcServer(Config.RpcInfo.RpcClientStartingPort, 1); if (!Server.Start(Config.RpcInfo.RpcIp, Config.RpcInfo.RpcPort)) { ConsoleMgr.WaitAndExit(2000); } AcctMgr = Server.GetLocalObject <AccountMgr>(); AcctMgr.LoadRealms(); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <LobbyConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Client = new RpcClient("LobbyServer", Config.RpcInfo.RpcLocalIp, 1); if (!Client.Start(Config.RpcInfo.RpcServerIp, Config.RpcInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } if (!TCPManager.Listen <TCPServer>(Config.ClientPort, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("LobbyServer"); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", ",---.o", ConsoleColor.Cyan); Log.Texte("", "`---..,---.,---.,---.,---.", ConsoleColor.Cyan); Log.Texte("", " |||---'| || |,---|", ConsoleColor.Cyan); Log.Texte("", "`---'``---'` '` '`---^ Core", ConsoleColor.Cyan); Log.Texte("", "http://siennacore.com", ConsoleColor.Blue); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading log level from file if (!Log.InitLog("Configs/Characters.log", "Characters")) { WaitAndExit(); } // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <CharacterConfig>(); // Starting Remoting Server if (!RpcServer.InitRpcServer("CharacterServer", Config.RpcKey, Config.RpcPort)) { WaitAndExit(); } // Creating Remote objects new AccountMgr(); AccountMgr.AccountDB = DBManager.Start(Config.AccountsDB.Total(), ConnectionType.DATABASE_MYSQL, "Accounts"); if (AccountMgr.AccountDB == null) { WaitAndExit(); } new CharacterMgr(); CharacterMgr.CharacterDB = DBManager.Start(Config.CharactersDB.Total(), ConnectionType.DATABASE_MYSQL, "Characters"); if (CharacterMgr.CharacterDB == null) { WaitAndExit(); } new CacheMgr(); CacheMgr.CharacterDB = DBManager.Start(Config.CharactersDB.Total(), ConnectionType.DATABASE_MYSQL, "Characters"); if (CacheMgr.CharacterDB == null) { WaitAndExit(); } CharacterMgr.Instance.LoadRealms(); CharacterMgr.Instance.LoadCreation_Names(); // Listening Client if (!TCPManager.Listen <RiftServer>(Config.CharacterServerPort, "CharacterServer")) { WaitAndExit(); } ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Console.CancelKeyPress += new ConsoleCancelEventHandler(OnClose); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <WorldConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "WorldServer")) { ConsoleMgr.WaitAndExit(2000); } CharMgr.Database = DBManager.Start(Config.CharacterDatabase.Total(), ConnectionType.DATABASE_MYSQL, "Characters"); if (CharMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } WorldMgr.Database = DBManager.Start(Config.WorldDatabase.Total(), ConnectionType.DATABASE_MYSQL, "World"); if (WorldMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } AbilityMgr.Database = WorldMgr.Database; Client = new RpcClient("WorldServer-" + Config.RealmId, Config.AccountCacherInfo.RpcLocalIp, 1); if (!Client.Start(Config.AccountCacherInfo.RpcServerIp, Config.AccountCacherInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } Rm = Program.AcctMgr.GetRealm(Config.RealmId); if (Rm == null) { Log.Error("WorldServer", "Realm (" + Config.RealmId + ") not found"); return; } LoaderMgr.Start(); if (!TCPManager.Listen <TCPServer>(Rm.Port, "World")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("World"); AcctMgr.UpdateRealm(Client.Info, Rm.RealmId); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "---------------------------------------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _______ _________ _______ _________ _______ _______ ", ConsoleColor.Cyan); Log.Texte("", "( ____ )\\__ __/( ____ \\__ __/( ____ \\( )|\\ /|", ConsoleColor.Cyan); Log.Texte("", "| ( )| ) ( | ( \\/ ) ( | ( \\/| () () || ) ( |", ConsoleColor.Cyan); Log.Texte("", "| (____)| | | | (__ | | | (__ | || || || | | |", ConsoleColor.Cyan); Log.Texte("", "| __) | | | __) | | | __) | |(_)| || | | |", ConsoleColor.Cyan); Log.Texte("", "| (\\ ( | | | ( | | | ( | | | || | | |", ConsoleColor.Cyan); Log.Texte("", "| ) \\ \\_____) (___| ) | | | (____/\\| ) ( || (___) |", ConsoleColor.Cyan); Log.Texte("", "|/ \\__/\\_______/|/ )_( (_______/|/ \\|(_______)", ConsoleColor.Cyan); Log.Texte("", "www.Strawberry-Pr0jcts.com", ConsoleColor.DarkCyan); Log.Texte("", "---------------------------------------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <CharacterConfig>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "Character")) { ConsoleMgr.WaitAndExit(2000); } AccountMgr.AccountDB = DBManager.Start(Config.AccountDB.Total(), ConnectionType.DATABASE_MYSQL, "Accounts"); if (AccountMgr.AccountDB == null) { ConsoleMgr.WaitAndExit(2000); } // Starting Remote Server Server = new RpcServer(Config.RpcClientStartingPort, 1); if (!Server.Start(Config.RpcIP, Config.RpcPort)) { ConsoleMgr.WaitAndExit(2000); } // Starting Accounts Manager AcctMgr = Server.GetLocalObject <AccountMgr>(); if (AcctMgr == null) { ConsoleMgr.WaitAndExit(2000); } AcctMgr.LoadRealms(); // Listening Client if (!TCPManager.Listen <RiftServer>(Config.CharacterServerPort, "CharacterServer")) { ConsoleMgr.WaitAndExit(2000); } ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ APB-World", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Assembly.Load("Common"); Log.Info("WorldServer", "Starting ..."); ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <WorldServerConfig>(); if (!Log.InitLog(Config.LogLevel, "WorldServer")) { ConsoleMgr.WaitAndExit(2000); } FileServerClient = new RpcClient("WorldServer-File-" + Config.WorldID, Config.FileServerRpc.RpcLocalIp, 0); if (!FileServerClient.Start(Config.FileServerRpc.RpcServerIp, Config.FileServerRpc.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } CharacterServerClient = new RpcClient("WorldServer-Char-" + Config.WorldID, Config.CharacterServerRpc.RpcLocalIp, 0); if (!CharacterServerClient.Start(Config.CharacterServerRpc.RpcServerIp, Config.CharacterServerRpc.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } if (!TCPManager.Listen <TcpServer>(Config.WorldServerPort, "World")) { ConsoleMgr.WaitAndExit(2000); } CharMgr = CharacterServerClient.GetServerObject <CharacterMgr>(); FileMgr = FileServerClient.GetServerObject <FileManager>(); CharMgr.RegisterWorld(CharacterServerClient.Info.RpcID, Config.WorldID, Config.WorldName, Config.WorldServerPort, Config.WorldServerIp); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ Rift", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <CharacterConfig>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "Character")) { ConsoleMgr.WaitAndExit(2000); } AccountMgr.AccountDB = DBManager.Start(Config.AccountDB.Total(), ConnectionType.DATABASE_MYSQL, "Accounts"); if (AccountMgr.AccountDB == null) { ConsoleMgr.WaitAndExit(2000); } // Starting Remote Server Server = new RpcServer(Config.RpcClientStartingPort, 1); if (!Server.Start(Config.RpcIP, Config.RpcPort)) { ConsoleMgr.WaitAndExit(2000); } // Starting Accounts Manager AcctMgr = Server.GetLocalObject <AccountMgr>(); if (AcctMgr == null) { ConsoleMgr.WaitAndExit(2000); } AcctMgr.LoadRealms(); // Listening Client if (!TCPManager.Listen <RiftServer>(Config.CharacterServerPort, "CharacterServer")) { ConsoleMgr.WaitAndExit(2000); } ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ Rift", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <MapConfig>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "Map")) { ConsoleMgr.WaitAndExit(2000); } FileStream Str = File.Open("player.cache", FileMode.Open); BuildPlayer = new byte[Str.Length]; Str.Read(BuildPlayer, 0, BuildPlayer.Length); // Starting Remote Client Client = new RpcClient("Map-" + Config.ServerInfo.MapAdress, Config.ClientInfo.RpcLocalIp, 2); if (!Client.Start(Config.ClientInfo.RpcServerIp, Config.ClientInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } // Listening Client if (!TCPManager.Listen <GameRiftServer>(Config.ServerInfo.MapPort, "CharacterServer")) { ConsoleMgr.WaitAndExit(2000); } MapMgr.Client = Client; MapMgr.MapInfo = Config.ServerInfo; MapMgr.MapInfo.RpcInfo = Client.Info; Rm = Client.GetServerObject <CharactersMgr>().GetRealm(); Log.Success("Realm", "Connected to : " + Rm.Name); World.RegisterMaps(Config.ServerInfo, Client.Info); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "------------------- Launcher Server -------------------", ConsoleColor.DarkRed); Log.Texte("", " █ █░ ▄▄▄ ██▀███ ▓█████ ███▄ ▄███▓ █ ██ ", ConsoleColor.Red); Log.Texte("", "▓█░ █ ░█░▒████▄ ▓██ ▒ ██▒▓█ ▀ ▓██▒▀█▀ ██▒ ██ ▓██▒", ConsoleColor.Red); Log.Texte("", "▒█░ █ ░█ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▓██░▓██ ▒██░", ConsoleColor.Red); Log.Texte("", "░█░ █ ░█ ░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄ ▒██ ▒██ ▓▓█ ░██░", ConsoleColor.Red); Log.Texte("", "░░██▒██▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒▒██▒ ░██▒▒▒█████▓ ", ConsoleColor.Red); Log.Texte("", "░ ▓░▒ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░░ ▒░ ░ ░░▒▓▒ ▒ ▒ ", ConsoleColor.Red); Log.Texte("", " ▒ ░ ░ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░░ ░ ░░░▒░ ░ ░ ", ConsoleColor.Red); Log.Texte("", " ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░░░ ░ ░ ", ConsoleColor.Red); Log.Texte("", " ░ ░ ░ ░ ░ ░ ░ ░ ", ConsoleColor.Red); Log.Texte("", "-------------------http://WarEmu.com-------------------", ConsoleColor.DarkRed); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <LauncherConfig>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "LauncherServer")) { ConsoleMgr.WaitAndExit(2000); } Client = new RpcClient("LauncherServer", Config.RpcInfo.RpcLocalIp, 1); if (!Client.Start(Config.RpcInfo.RpcServerIp, Config.RpcInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } Info = new FileInfo("Configs/mythloginserviceconfig.xml"); if (!Info.Exists) { Log.Error("Configs/mythloginserviceconfig.xml", "Config file missing !"); ConsoleMgr.WaitAndExit(5000); } StrInfo = Info.OpenText().ReadToEnd(); if (!TCPManager.Listen <TCPServer>(Config.LauncherServerPort, "LauncherServer")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("LauncherServer"); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Info("", "------------------- Launcher Server -------------------", ConsoleColor.DarkRed); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <LauncherConfig>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "LauncherServer")) { ConsoleMgr.WaitAndExit(2000); } ServerState previousState = Config.ServerState; Config.ServerState = ServerState.PATCH; LoaderMgr.Start(); Client = new RpcClient("LauncherServer", Config.RpcInfo.RpcLocalIp, 1); Config.ServerState = previousState; if (!Client.Start(Config.RpcInfo.RpcServerIp, Config.RpcInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } Info = new FileInfo("Configs/mythloginserviceconfig.xml"); if (!Info.Exists) { Log.Error("Configs/mythloginserviceconfig.xml", "Config file missing !"); ConsoleMgr.WaitAndExit(5000); } StrInfo = Info.OpenText().ReadToEnd(); if (!TCPManager.Listen <TCPServer>(Config.LauncherServerPort, "LauncherServer")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("LauncherServer"); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", ",---.o", ConsoleColor.Cyan); Log.Texte("", "`---..,---.,---.,---.,---.", ConsoleColor.Cyan); Log.Texte("", " |||---'| || |,---|", ConsoleColor.Cyan); Log.Texte("", "`---'``---'` '` '`---^ Core", ConsoleColor.Cyan); Log.Texte("", "http://siennacore.com", ConsoleColor.Blue); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading log level from file if (!Log.InitLog("Configs/World.log", "World")) { WaitAndExit(); } // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <WorldConfig>(); // Starting Remoting Server if (!RpcClient.InitRpcClient("WorldServer", Config.RpcKey, Config.RpcIp, Config.RpcPort)) { WaitAndExit(); } // Creating Remote objects AccountMgr.Instance = new AccountMgr(); CharacterMgr.Instance = new CharacterMgr(); CacheMgr.Instance = new CacheMgr(); // Listening Client if (!TCPManager.Listen <RiftServer>(Config.WorldServerPort, "WorldServer")) { WaitAndExit(); } Realm Rm = CharacterMgr.Instance.RegisterRealm(Config.RealmId, Config.WorldServerIP, Config.WorldServerPort, RpcClient.GetRpcClientId("WorldServer")); if (Rm == null) { Log.Error("WorldServer", "Invalid Realm : " + Config.RealmId); WaitAndExit(); } ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "-------------------- Account Cacher -------------------", ConsoleColor.DarkRed); Log.Texte("", " █ █░ ▄▄▄ ██▀███ ▓█████ ███▄ ▄███▓ █ ██ ", ConsoleColor.Red); Log.Texte("", "▓█░ █ ░█░▒████▄ ▓██ ▒ ██▒▓█ ▀ ▓██▒▀█▀ ██▒ ██ ▓██▒", ConsoleColor.Red); Log.Texte("", "▒█░ █ ░█ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▓██░▓██ ▒██░", ConsoleColor.Red); Log.Texte("", "░█░ █ ░█ ░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄ ▒██ ▒██ ▓▓█ ░██░", ConsoleColor.Red); Log.Texte("", "░░██▒██▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒▒██▒ ░██▒▒▒█████▓ ", ConsoleColor.Red); Log.Texte("", "░ ▓░▒ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░░ ▒░ ░ ░░▒▓▒ ▒ ▒ ", ConsoleColor.Red); Log.Texte("", " ▒ ░ ░ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░░ ░ ░░░▒░ ░ ░ ", ConsoleColor.Red); Log.Texte("", " ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░░░ ░ ░ ", ConsoleColor.Red); Log.Texte("", " ░ ░ ░ ░ ░ ░ ░ ░ ", ConsoleColor.Red); Log.Texte("", "-------------------http://WarEmu.com-------------------", ConsoleColor.DarkRed); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <AccountConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "AccountCacher")) { ConsoleMgr.WaitAndExit(2000); } AccountMgr.Database = DBManager.Start(Config.AccountDB.Total(), ConnectionType.DATABASE_MYSQL, "Accounts"); if (AccountMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } Server = new RpcServer(Config.RpcInfo.RpcClientStartingPort, 1); if (!Server.Start(Config.RpcInfo.RpcIp, Config.RpcInfo.RpcPort)) { ConsoleMgr.WaitAndExit(2000); } AcctMgr = Server.GetLocalObject <AccountMgr>(); AcctMgr.LoadRealms(); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ Warhammer", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig<LauncherConfig>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "LauncherServer")) ConsoleMgr.WaitAndExit(2000); Client = new RpcClient("LauncherServer", Config.RpcInfo.RpcLocalIp, 1); if (!Client.Start(Config.RpcInfo.RpcServerIp, Config.RpcInfo.RpcServerPort)) ConsoleMgr.WaitAndExit(2000); Info = new FileInfo("Configs/mythloginserviceconfig.xml"); if (!Info.Exists) { Log.Error("Configs/mythloginserviceconfig.xml", "Config file missing !"); ConsoleMgr.WaitAndExit(5000); } StrInfo = Info.OpenText().ReadToEnd(); if (!TCPManager.Listen<TCPServer>(Config.LauncherServerPort, "LauncherServer")) ConsoleMgr.WaitAndExit(2000); Server = TCPManager.GetTcp<TCPServer>("LauncherServer"); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "-------------------- Lobby Server ---------------------", ConsoleColor.DarkRed); Log.Texte("", " █ █░ ▄▄▄ ██▀███ ▓█████ ███▄ ▄███▓ █ ██ ", ConsoleColor.Red); Log.Texte("", "▓█░ █ ░█░▒████▄ ▓██ ▒ ██▒▓█ ▀ ▓██▒▀█▀ ██▒ ██ ▓██▒", ConsoleColor.Red); Log.Texte("", "▒█░ █ ░█ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▓██░▓██ ▒██░", ConsoleColor.Red); Log.Texte("", "░█░ █ ░█ ░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄ ▒██ ▒██ ▓▓█ ░██░", ConsoleColor.Red); Log.Texte("", "░░██▒██▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒▒██▒ ░██▒▒▒█████▓ ", ConsoleColor.Red); Log.Texte("", "░ ▓░▒ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░░ ▒░ ░ ░░▒▓▒ ▒ ▒ ", ConsoleColor.Red); Log.Texte("", " ▒ ░ ░ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░░ ░ ░░░▒░ ░ ░ ", ConsoleColor.Red); Log.Texte("", " ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░░░ ░ ░ ", ConsoleColor.Red); Log.Texte("", " ░ ░ ░ ░ ░ ░ ░ ░ ", ConsoleColor.Red); Log.Texte("", "-------------------http://WarEmu.com-------------------", ConsoleColor.DarkRed); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <LobbyConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Client = new RpcClient("LobbyServer", Config.RpcInfo.RpcLocalIp, 1); if (!Client.Start(Config.RpcInfo.RpcServerIp, Config.RpcInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } if (!TCPManager.Listen <TCPServer>(Config.ClientPort, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("LobbyServer"); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ Warhammer", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <AccountConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "AccountCacher")) { ConsoleMgr.WaitAndExit(2000); } AccountMgr.Database = DBManager.Start(Config.AccountDB.Total(), ConnectionType.DATABASE_MYSQL, "Accounts"); if (AccountMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } Server = new RpcServer(Config.RpcInfo.RpcClientStartingPort, 1); if (!Server.Start(Config.RpcInfo.RpcIp, Config.RpcInfo.RpcPort)) { ConsoleMgr.WaitAndExit(2000); } AcctMgr = Server.GetLocalObject <AccountMgr>(); AcctMgr.LoadRealms(); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ APB-Char", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Assembly.Load("Common"); Log.Info("CharacterServer", "Starting..."); ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <CharacterServerConfig>(); if (!Log.InitLog(Config.LogLevel, "CharacterServer")) { ConsoleMgr.WaitAndExit(2000); } CharacterMgr.Database = DBManager.Start(Config.CharacterDatabase.Total(), ConnectionType.DATABASE_MYSQL, "CharDB"); if (CharacterMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } Server = new RpcServer(Config.RpcInfo.RpcClientStartingPort, 0); if (!Server.Start(Config.RpcInfo.RpcIp, Config.RpcInfo.RpcPort)) { ConsoleMgr.WaitAndExit(2000); } Log.Success("CharacterServer", "Server loaded."); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ Warhammer", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <LobbyConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Client = new RpcClient("LobbyServer", Config.RpcInfo.RpcLocalIp, 1); if (!Client.Start(Config.RpcInfo.RpcServerIp, Config.RpcInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } if (!TCPManager.Listen <TCPServer>(Config.ClientPort, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("LobbyServer"); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Log.Texte("", "-------------------- Lobby Server ---------------------", ConsoleColor.DarkRed); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <LobbyConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Client = new RpcClient("LobbyServer", Config.RpcInfo.RpcLocalIp, 1); if (!Client.Start(Config.RpcInfo.RpcServerIp, Config.RpcInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } if (!TCPManager.Listen <TCPServer>(Config.ClientPort, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("LobbyServer"); Log.Debug($"LobbyServer", $"RpcClient on Local Ip {Config.RpcInfo.RpcLocalIp}"); Log.Debug($"LobbyServer", $"RpcClient Connect (Start) to {Config.RpcInfo.RpcServerIp}:{ Config.RpcInfo.RpcServerPort}"); Log.Debug($"LobbyServer", $"TcpServer on Port {Config.ClientPort}"); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ Rift", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <ExtractorConfig>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "Cache")) { ConsoleMgr.WaitAndExit(2000); } WorldDB = DBManager.Start(Config.WorldDB.Total(), ConnectionType.DATABASE_MYSQL, "World"); if (WorldDB == null) { ConsoleMgr.WaitAndExit(2000); } PacketProcessor.RegisterDefinitions(); int Count = 0; foreach (string FileDir in Directory.EnumerateFiles(Config.CacheFolder)) { Log.Success("Extractor", "Opening Cache : " + FileDir); FileStream Str = File.Open(FileDir, FileMode.Open); byte[] Buff = new byte[Str.Length]; Str.Read(Buff, 0, Buff.Length); PacketInStream Pack = new PacketInStream(Buff, Buff.Length); ISerializablePacket Packet = PacketProcessor.ReadPacket(ref Pack); if (Packet != null && Packet is CacheUpdate) { CacheUpdate Cache = Packet as CacheUpdate; CacheTemplate Template = Cache.CacheDatas.Find(info => info.Opcode == (long)Opcodes.CacheTemplate) as CacheTemplate; CacheData Data = Cache.CacheDatas.Find(info => info.Opcode == (long)Opcodes.CacheData) as CacheData; if (Template != null) { Template.CacheID = Cache.CacheID; Template.CacheType = Cache.CacheType; WorldDB.AddObject(Template); } if (Data != null) { Data.CacheID = Cache.CacheID; Data.CacheType = Cache.CacheType; WorldDB.AddObject(Data); } ++Count; } Str.Dispose(); } Log.Success("Extractor", "" + Count + " Caches extracted"); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ APB-Lobby", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Info("LobbyServer", "Starting ..."); ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <LobbyServerConfig>(); if (!Log.InitLog(Config.LogLevel, "LobbyServer")) { ConsoleMgr.WaitAndExit(2000); } FileServerClient = new RpcClient("LobbyServer-File", Config.FileServerRpc.RpcLocalIp, 1); if (!FileServerClient.Start(Config.FileServerRpc.RpcServerIp, Config.FileServerRpc.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } CharacterServerClient = new RpcClient("LobbyServer-Char", Config.CharacterServerRpc.RpcLocalIp, 0); if (!CharacterServerClient.Start(Config.CharacterServerRpc.RpcServerIp, Config.CharacterServerRpc.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } if (!TCPManager.Listen <TcpServer>(Config.ClientServerPort, "Lobby")) { ConsoleMgr.WaitAndExit(2000); } CharMgr = CharacterServerClient.GetServerObject <CharacterMgr>(); FileMgr = FileServerClient.GetServerObject <FileManager>(); DBAccount Acct = CharMgr.GetAccount(1); string[] sVersion = Config.ClientVersion.Split('.'); Build = Config.ClientBuild; Version = new byte[sVersion.Length]; for (int i = 0; i < Version.Length; ++i) { Version[i] = byte.Parse(sVersion[i]); } Log.Info("LobbyServer", "Version = " + Version[0] + "." + Version[1] + "." + Version[2] + " : Build = " + Build); Log.Success("LobbyServer", "Server loaded."); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _____ _____ ", ConsoleColor.Cyan); Log.Texte("", " /\\ | __ \\ / ____|", ConsoleColor.Cyan); Log.Texte("", " / \\ | |__) | (___ ", ConsoleColor.Cyan); Log.Texte("", " / /\\ \\ | ___/ \\___ \\ ", ConsoleColor.Cyan); Log.Texte("", " / ____ \\| | ____) |", ConsoleColor.Cyan); Log.Texte("", "/_/ \\_\\_| |_____/ Rift", ConsoleColor.Cyan); Log.Texte("", "http://AllPrivateServer.com", ConsoleColor.DarkCyan); Log.Texte("", "-------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <RealmConfig>(); Config.RealmInfo.GenerateName(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "Realm")) { ConsoleMgr.WaitAndExit(2000); } CharactersMgr.CharactersDB = DBManager.Start(Config.CharactersDB.Total(), ConnectionType.DATABASE_MYSQL, "Characters"); if (CharactersMgr.CharactersDB == null) { ConsoleMgr.WaitAndExit(2000); } WorldMgr.WorldDB = DBManager.Start(Config.WorldDB.Total(), ConnectionType.DATABASE_MYSQL, "World"); if (WorldMgr.WorldDB == null) { ConsoleMgr.WaitAndExit(2000); } PacketProcessor.RegisterDefinitions(); // Starting Remote Client Client = new RpcClient("Realm-" + Config.RealmInfo.RealmId, Config.RpcCharacter.RpcLocalIp, 1); if (!Client.Start(Config.RpcCharacter.RpcServerIp, Config.RpcCharacter.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } Server = new RpcServer(Config.RpcMapServer.RpcClientStartingPort, 2); if (!Server.Start(Config.RpcMapServer.RpcIp, Config.RpcMapServer.RpcPort)) { ConsoleMgr.WaitAndExit(2000); } World = Client.GetLocalObject <WorldMgr>(); Accounts = Client.GetServerObject <AccountMgr>(); Characters = Client.GetLocalObject <CharactersMgr>(); // 1 : Loading WorldMgr World.Load(); // 2 : Loading CharactersMgr CharactersMgr.Client = Client; CharactersMgr.MyRealm = Config.RealmInfo; CharactersMgr.MyRealm.RpcInfo = Client.Info; Characters.Load(); // 3 : Loading AccountsMgr Accounts.RegisterRealm(Config.RealmInfo, Client.Info); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Console.CancelKeyPress += new ConsoleCancelEventHandler(OnClose); Log.Texte("", "-------------------- World Server ---------------------", ConsoleColor.DarkRed); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <WorldConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "WorldServer")) { ConsoleMgr.WaitAndExit(2000); } #if DEBUG API.Server api = null; if (Config.EnableAPI) { try { api = new API.Server(Config.APIAddress, Config.APIPort, 100); } catch (Exception e) { Log.Error("API", "Unable to start API server: " + e.Message); } } #endif CharMgr.Database = DBManager.Start(Config.CharacterDatabase.Total(), Config.CharacterDatabase.ConnectionType, "Characters", Config.CharacterDatabase.Database); if (CharMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } else if (!Config.PreloadAllCharacters) { CharMgr.Database.RegisterAction(CharMgr.LoadPendingCharacters); } _timer = new Timer(AuctionHouse.CheckAuctionExpiry, null, new TimeSpan(0, 12, 0, 0), new TimeSpan(0, 24, 0, 0)); WorldMgr.Database = DBManager.Start(Config.WorldDatabase.Total(), Config.CharacterDatabase.ConnectionType, "World", Config.WorldDatabase.Database); if (WorldMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } WorldMgr.StartingPairing = WorldMgr.Database.ExecuteQueryInt("SELECT FLOOR(RAND() * 3) + 1"); WorldMgr.UpperTierBattlefrontManager = new UpperTierBattlefrontManager(); WorldMgr.UpperTierBattlefrontManager.SetInitialPairActive(); Log.Texte("Creating Upper Tier Battlefront Manager", WorldMgr.UpperTierBattlefrontManager.GetActivePairing().PairingName, ConsoleColor.Cyan); WorldMgr.LowerTierBattlefrontManager = new LowerTierBattlefrontManager(); WorldMgr.LowerTierBattlefrontManager.SetInitialPairActive(); Log.Texte("Creating Lower Tier Battlefront Manager", WorldMgr.LowerTierBattlefrontManager.GetActivePairing().PairingName, ConsoleColor.Cyan); Log.Texte("StartingPairing: ", WorldMgr.StartingPairing.ToString(), ConsoleColor.Cyan); Client = new RpcClient("WorldServer-" + Config.RealmId, Config.AccountCacherInfo.RpcLocalIp, 1); if (!Client.Start(Config.AccountCacherInfo.RpcServerIp, Config.AccountCacherInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } Rm = AcctMgr.GetRealm(Config.RealmId); if (Rm == null) { Log.Error("WorldServer", "Realm (" + Config.RealmId + ") not found"); return; } LoaderMgr.Start(); if (!TCPManager.Listen <TCPServer>(Rm.Port, "World")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("World"); AcctMgr.UpdateRealm(Client.Info, Rm.RealmId); AcctMgr.UpdateRealmCharacters(Rm.RealmId, (uint)CharMgr.Database.GetObjectCount <Character>("Realm=1"), (uint)CharMgr.Database.GetObjectCount <Character>("Realm=2")); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Console.CancelKeyPress += new ConsoleCancelEventHandler(OnClose); Log.Texte("", "-------------------- World Server ---------------------", ConsoleColor.DarkRed); Log.Texte("", " █ █░ ▄▄▄ ██▀███ ▓█████ ███▄ ▄███▓ █ ██ ", ConsoleColor.Red); Log.Texte("", "▓█░ █ ░█░▒████▄ ▓██ ▒ ██▒▓█ ▀ ▓██▒▀█▀ ██▒ ██ ▓██▒", ConsoleColor.Red); Log.Texte("", "▒█░ █ ░█ ▒██ ▀█▄ ▓██ ░▄█ ▒▒███ ▓██ ▓██░▓██ ▒██░", ConsoleColor.Red); Log.Texte("", "░█░ █ ░█ ░██▄▄▄▄██ ▒██▀▀█▄ ▒▓█ ▄ ▒██ ▒██ ▓▓█ ░██░", ConsoleColor.Red); Log.Texte("", "░░██▒██▓ ▓█ ▓██▒░██▓ ▒██▒░▒████▒▒██▒ ░██▒▒▒█████▓ ", ConsoleColor.Red); Log.Texte("", "░ ▓░▒ ▒ ▒▒ ▓▒█░░ ▒▓ ░▒▓░░░ ▒░ ░░ ▒░ ░ ░░▒▓▒ ▒ ▒ ", ConsoleColor.Red); Log.Texte("", " ▒ ░ ░ ▒ ▒▒ ░ ░▒ ░ ▒░ ░ ░ ░░ ░ ░░░▒░ ░ ░ ", ConsoleColor.Red); Log.Texte("", " ░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░░░ ░ ░ ", ConsoleColor.Red); Log.Texte("", " ░ ░ ░ ░ ░ ░ ░ ░ ", ConsoleColor.Red); Log.Texte("", "-------------------http://WarEmu.com-------------------", ConsoleColor.DarkRed); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <WorldConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "WorldServer")) { ConsoleMgr.WaitAndExit(2000); } CharMgr.Database = DBManager.Start(Config.CharacterDatabase.Total(), ConnectionType.DATABASE_MYSQL, "Characters"); if (CharMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } WorldMgr.Database = DBManager.Start(Config.WorldDatabase.Total(), ConnectionType.DATABASE_MYSQL, "World"); if (WorldMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } AbilityMgr.Database = WorldMgr.Database; Client = new RpcClient("WorldServer-" + Config.RealmId, Config.AccountCacherInfo.RpcLocalIp, 1); if (!Client.Start(Config.AccountCacherInfo.RpcServerIp, Config.AccountCacherInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } Rm = Program.AcctMgr.GetRealm(Config.RealmId); if (Rm == null) { Log.Error("WorldServer", "Realm (" + Config.RealmId + ") not found"); return; } LoaderMgr.Start(); if (!TCPManager.Listen <TCPServer>(Rm.Port, "World")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("World"); AcctMgr.UpdateRealm(Client.Info, Rm.RealmId); AcctMgr.UpdateRealmCharacters(Rm.RealmId, (uint)CharMgr.Database.GetObjectCount <Character>("Realm=1"), (uint)CharMgr.Database.GetObjectCount <Character>("Realm=2")); ConsoleMgr.Start(); }
static void Main(string[] args) { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(onError); Console.CancelKeyPress += new ConsoleCancelEventHandler(OnClose); Log.Info("", "-------------------- World Server ---------------------", ConsoleColor.DarkRed); // Default the server to DEV mode. if (args.Length == 0) { WorldMgr.ServerMode = "DEV"; } else { if (args.Length == 1) { if (args[0] == "DEV") { WorldMgr.ServerMode = "DEV"; } if (args[0] == "PRD") { WorldMgr.ServerMode = "PRD"; } } else { WorldMgr.ServerMode = "DEV"; } } Log.Info("", "SERVER running in " + WorldMgr.ServerMode + " mode", ConsoleColor.Cyan); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <WorldConfigs>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "WorldServer")) { ConsoleMgr.WaitAndExit(2000); } #if DEBUG API.Server api = null; if (Config.EnableAPI) { try { api = new API.Server(Config.APIAddress, Config.APIPort, 100); } catch (Exception e) { Log.Error("API", "Unable to start API server: " + e.Message); } } #endif CharMgr.Database = DBManager.Start(Config.CharacterDatabase.Total(), Config.CharacterDatabase.ConnectionType, "Characters", Config.CharacterDatabase.Database); if (CharMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } else if (!Config.PreloadAllCharacters) { CharMgr.Database.RegisterAction(CharMgr.LoadPendingCharacters); } _timer = new Timer(AuctionHouse.CheckAuctionExpiry, null, new TimeSpan(0, 12, 0, 0), new TimeSpan(0, 24, 0, 0)); WorldMgr.Database = DBManager.Start(Config.WorldDatabase.Total(), Config.CharacterDatabase.ConnectionType, "World", Config.WorldDatabase.Database); if (WorldMgr.Database == null) { ConsoleMgr.WaitAndExit(2000); } WorldMgr.StartingPairing = WorldMgr.Database.ExecuteQueryInt("SELECT FLOOR(RAND() * 3) + 1"); // Ensure directory structure is correct if (!Directory.Exists("Zones")) { Log.Error("Directory Check", "Zones directory does not exist"); ConsoleMgr.WaitAndExit(2000); } if (!Directory.Exists("Scripts")) { Log.Error("Directory Check", "Scripts directory does not exist"); ConsoleMgr.WaitAndExit(2000); } if (!Directory.Exists("World")) { Log.Error("Directory Check", "World directory does not exist"); ConsoleMgr.WaitAndExit(2000); } if (!Directory.Exists("Abilities")) { Log.Error("Directory Check", "Abilities directory does not exist"); ConsoleMgr.WaitAndExit(2000); } Client = new RpcClient("WorldServer-" + Config.RealmId, Config.AccountCacherInfo.RpcLocalIp, 1); if (!Client.Start(Config.AccountCacherInfo.RpcServerIp, Config.AccountCacherInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } Rm = AcctMgr.GetRealm(Config.RealmId); if (Rm == null) { Log.Error("WorldServer", "Realm (" + Config.RealmId + ") not found"); return; } LoaderMgr.Start(); // Clean up rvr_metrics Log.Info("Battlefront Manager", "Clearing rvr_metrics", ConsoleColor.Cyan); WorldMgr.Database.ExecuteNonQuery("DELETE FROM rvr_metrics WHERE TIMESTAMP NOT BETWEEN DATE_SUB(UTC_TIMESTAMP(), INTERVAL 60 DAY) AND UTC_TIMESTAMP()"); Log.Info("Battlefront Manager", "Creating Upper Tier Campaign Manager", ConsoleColor.Cyan); if (RVRProgressionService._RVRProgressions.Count == 0) { Log.Error("RVR Progression", "NO RVR Progressions in DB"); return; } WorldMgr.UpperTierCampaignManager = new UpperTierCampaignManager(RVRProgressionService._RVRProgressions.Where(x => x.Tier == 4).ToList(), WorldMgr._Regions); Log.Info("Battlefront Manager", "Creating Lower Tier Campaign Manager", ConsoleColor.Cyan); WorldMgr.LowerTierCampaignManager = new LowerTierCampaignManager(RVRProgressionService._RVRProgressions.Where(x => x.Tier == 1).ToList(), WorldMgr._Regions); Log.Info("Battlefront Manager", "Getting Progression based upon rvr_progression.LastOpenedZone", ConsoleColor.Cyan); WorldMgr.UpperTierCampaignManager.GetActiveBattleFrontFromProgression(); WorldMgr.LowerTierCampaignManager.GetActiveBattleFrontFromProgression(); Log.Info("Battlefront Manager", "Attaching Campaigns to Regions", ConsoleColor.Cyan); // Attach Battlefronts to regions WorldMgr.AttachCampaignsToRegions(); Log.Info("Battlefront Manager", "Locking Battlefronts", ConsoleColor.Cyan); WorldMgr.UpperTierCampaignManager.LockBattleFrontsAllRegions(4); WorldMgr.LowerTierCampaignManager.LockBattleFrontsAllRegions(1); Log.Info("Battlefront Manager", "Opening Active battlefronts", ConsoleColor.Cyan); WorldMgr.UpperTierCampaignManager.OpenActiveBattlefront(); WorldMgr.LowerTierCampaignManager.OpenActiveBattlefront(); WorldMgr.UpdateRegionCaptureStatus(WorldMgr.LowerTierCampaignManager, WorldMgr.UpperTierCampaignManager); if (!TCPManager.Listen <TCPServer>(Rm.Port, "World")) { ConsoleMgr.WaitAndExit(2000); } Server = TCPManager.GetTcp <TCPServer>("World"); AcctMgr.UpdateRealm(Client.Info, Rm.RealmId); AcctMgr.UpdateRealmCharacters(Rm.RealmId, (uint)CharMgr.Database.GetObjectCount <Character>("Realm=1"), (uint)CharMgr.Database.GetObjectCount <Character>("Realm=2")); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "---------------------------------------------------------------", ConsoleColor.DarkBlue); Log.Texte("", " _______ _________ _______ _________ _______ _______ ", ConsoleColor.Cyan); Log.Texte("", "( ____ )\__ __/( ____ \\__ __/( ____ \( )|\ /|", ConsoleColor.Cyan); Log.Texte("", "| ( )| ) ( | ( \/ ) ( | ( \/| () () || ) ( |", ConsoleColor.Cyan); Log.Texte("", "| (____)| | | | (__ | | | (__ | || || || | | |", ConsoleColor.Cyan); Log.Texte("", "| __) | | | __) | | | __) | |(_)| || | | |", ConsoleColor.Cyan); Log.Texte("", "| (\ ( | | | ( | | | ( | | | || | | |", ConsoleColor.Cyan); Log.Texte("", "| ) \ \_____) (___| ) | | | (____/\| ) ( || (___) |", ConsoleColor.Cyan); Log.Texte("", "|/ \__/\_______/|/ )_( (_______/|/ \|(_______)", ConsoleColor.Cyan); Log.Texte("", "www.Strawberry-Pr0jcts.com", ConsoleColor.DarkCyan); Log.Texte("", "---------------------------------------------------------------", ConsoleColor.DarkBlue); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <MapConfig>(); // Loading log level from file if (!Log.InitLog(Config.LogLevel, "Map")) { ConsoleMgr.WaitAndExit(2000); } FileStream Str = File.Open("player.cache", FileMode.Open); BuildPlayer = new byte[Str.Length]; Str.Read(BuildPlayer, 0, BuildPlayer.Length); /*// Listening Client * if (!TCPManager.Listen<RiftServer>(Config.ServerInfo.MapPort, "CharacterServer")) * ConsoleMgr.WaitAndExit(2000); * * PacketInStream Entity = new PacketInStream(BuildPlayer,BuildPlayer.Length); * WorldEntityUpdate Update = PacketProcessor.ReadPacket(ref Entity) as WorldEntityUpdate; * Log.Info("Entity", "GUID = " + Update.GUID + " List Lengh = " + Update.Field1.Count); * Console.ReadKey(); * Environment.Exit(0);*/ // Starting Remote Client Client = new RpcClient("Map-" + Config.ServerInfo.MapAdress, Config.ClientInfo.RpcLocalIp, 2); if (!Client.Start(Config.ClientInfo.RpcServerIp, Config.ClientInfo.RpcServerPort)) { ConsoleMgr.WaitAndExit(2000); } // Listening Client if (!TCPManager.Listen <RiftServer>(Config.ServerInfo.MapPort, "CharacterServer")) { ConsoleMgr.WaitAndExit(2000); } MapMgr.Client = Client; MapMgr.MapInfo = Config.ServerInfo; MapMgr.MapInfo.RpcInfo = Client.Info; Rm = Client.GetServerObject <CharactersMgr>().GetRealm(); Log.Success("Realm", "Connected to : " + Rm.Name); World.RegisterMaps(Config.ServerInfo, Client.Info); ConsoleMgr.Start(); }
static void Main(string[] args) { Log.Texte("", "[CTRL + C] To shutdown the server.", ConsoleColor.Cyan); Log.Texte("", "-------------------------------", ConsoleColor.Cyan); Log.Texte("", ",---.o", ConsoleColor.Cyan); Log.Texte("", "`---..,---.,---.,---.,---.", ConsoleColor.Cyan); Log.Texte("", " |||---'| || |,---|", ConsoleColor.Cyan); Log.Texte("", "`---'``---'` '` '`---^ Core", ConsoleColor.Cyan); Log.Texte("", "http://twitter.com/ChameleonGeek", ConsoleColor.Cyan); Log.Texte("", "-------------------------------", ConsoleColor.Cyan); // Loading all configs files ConfigMgr.LoadConfigs(); Config = ConfigMgr.GetConfig <CharacterConfig>(); // Loading log level from file if (!Log.InitLog("Configs/Characters.log", Config.LogInfo.LogsDir, Config.LogInfo.LogFile)) { WaitAndExit(Config.ShutDownTimer); } // Starting Remoting Server if (!RpcServer.InitRpcServer("CharacterServer", Config.RpcKey, Config.RpcPort)) { WaitAndExit(Config.ShutDownTimer); } // Creating Remote objects new AccountMgr(); AccountMgr.AccountDB = DBManager.Start(Config.AccountsDB.Total(), ConnectionType.DATABASE_MYSQL, "Accounts"); if (AccountMgr.AccountDB == null) { WaitAndExit(Config.ShutDownTimer); } new CharacterMgr(); CharacterMgr.CharacterDB = DBManager.Start(Config.CharactersDB.Total(), ConnectionType.DATABASE_MYSQL, "Characters"); if (CharacterMgr.CharacterDB == null) { WaitAndExit(Config.ShutDownTimer); } new CacheMgr(); CacheMgr.CharacterDB = DBManager.Start(Config.CharactersDB.Total(), ConnectionType.DATABASE_MYSQL, "Characters"); if (CacheMgr.CharacterDB == null) { WaitAndExit(Config.ShutDownTimer); } CharacterMgr.Instance.LoadRealms(); CharacterMgr.Instance.LoadCreation_Names(); // Listening Client if (!TCPManager.Listen <RiftServer>(Config.CharacterServerPort, "CharacterServer")) { WaitAndExit(Config.ShutDownTimer); } System.Console.CancelKeyPress += new ConsoleCancelEventHandler(ShutdownEvent); ConsoleMgr.Start(); }