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) { 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("", "/_/ \\_\\_| |_____/ 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("", ",---.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) { 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("", "/_/ \\_\\_| |_____/ 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 ReadArguments(string[] args) { for (int i = 1; i < args.Length; i += 2) { switch (args[i - 1]) { case "-config": CharacterConfig.Initialize(args[i]); break; default: Log.Error($"'{args[i - 1]}' isn't a valid argument."); break; } } if (!CharacterConfig.IsInitialized) { CharacterConfig.Initialize($"./Configs/{serverName}.conf"); } }
static void ReadArguments(string[] args) { for (int i = 1; i < args.Length; i += 2) { switch (args[i - 1]) { case "-config": CharacterConfig.Initialize(args[i]); break; default: Log.Message(LogType.Error, "'{0}' isn't a valid argument.", args[i - 1]); break; } } if (!CharacterConfig.IsInitialized) { CharacterConfig.Initialize("./Configs/CharacterServer.conf"); } }
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(); }