public static void StartUpServer() { GameServer.Managers.PacketManager.setup(); if (_RunningServer) { return; } _RunningServer = true; DateTime Start = DateTime.Now; Log.AppendText(""); Log.AppendText("WarRocK GameServer started!"); LookupModule = new LookupService("GeoIP.dat", LookupService.GEOIP_MEMORY_CACHE); Log.AppendText("GeoIP module initialized."); DB.runQuery("UPDATE users SET online='0'"); Log.AppendText("All accounts have been set offline"); _ServerThread = new Thread(new ThreadStart(Structure.serverLoop)); _ServerThread.Priority = ThreadPriority.BelowNormal; _ServerThread.Start(); _CommandThread = new Thread(new ThreadStart(Structure.commandLoop)); _CommandThread.Priority = ThreadPriority.BelowNormal; _CommandThread.Start(); //ItemManager.InitializeHexTable(); Log.WriteBlank(); ClanManager.Load(); GameServer.Managers.BanManager.load(); UserManager.setup(); RoomManager.setup(); virtualMapData.Load(); EventManager.Load(); NoticeManager.load(); MapVehicleSeats.Load(); VehicleManager.Load(); WordManager.Load(); //VehicleManagers2.Load(); MapVehicles.Load(); ZombieManager.Load(); Thread EventThread = new Thread(Event); EventThread.Priority = ThreadPriority.AboveNormal; EventThread.Start(); Thread LoginEventThread = new Thread(LoginEventCheckLoop); LoginEventThread.Priority = ThreadPriority.AboveNormal; LoginEventThread.Start(); Thread CouponCheckThread = new Thread(CheckCouponLoop); CouponCheckThread.Priority = ThreadPriority.AboveNormal; CouponCheckThread.Start(); //MapManager.load(); DateTime current = DateTime.Now; long StartTime = long.Parse(String.Format("{0:yyMMdd}", current)); BootTime = Convert.ToInt32(StartTime.ToString()); FormCalling.frm1.AppendColorLabelBox2(""); FormCalling.frm1.AppendLabelBox2("Started"); TimeSpan bootTime = DateTime.Now - Start; Log.AppendText("Emulator has booted in " + bootTime.TotalMilliseconds + " milliseconds.."); Log.WriteBlank(); if (GameServer.NetworkSocket.openSocket(5340, 999999999) == false) { return; } GC.Collect(); }
public static void Main(string[] args) { { Application.Run((Form) new ip()); } Console.Clear(); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Programm.CurrentDomainOnUnhandledException); Console.Title = "Iniciando o Point Blank Game Server..."; Logger.StartedFor = "game"; Logger.checkDirectorys(); StringUtil stringUtil = new StringUtil(); stringUtil.AppendLine(" ________ _____ __ ______ _______ "); stringUtil.AppendLine(" / ____/ |/ / / / / / / / / / / / "); stringUtil.AppendLine(" / __/ / /|_/ / / / / / /__/_/ /__/ / "); stringUtil.AppendLine(" / /___/ / / / /_/ / _ / / / / / / "); stringUtil.AppendLine(" "); string str = ComDiv.GetLinkerTime(Assembly.GetExecutingAssembly(), (TimeZoneInfo)null).ToString("dd/MM/yyyy HH:mm"); stringUtil.AppendLine(" Data de Inicialização: " + str + " "); Logger.info(stringUtil.getString()); ConfigGS.Load(); ComDiv.GetDate(); BasicInventoryXML.Load(); ServerConfigSyncer.GenerateConfig(ConfigGS.configId); ServersXML.Load(); ChannelsXML.Load(ConfigGS.serverId); EventLoader.LoadAll(); TitlesXML.Load(); TitleAwardsXML.Load(); ClanManager.Load(); NickFilter.Load(); MissionCardXML.LoadBasicCards(1); BattleServerXML.Load(); RankXML.Load(); RankXML.LoadAwards(); ClanRankXML.Load(); MissionAwards.Load(); MissionsXML.Load(); Translation.Load(); ShopManager.Load(1); TorunamentRulesManager.LoadList(); RandomBoxXML.LoadBoxes(); CupomEffectManager.LoadCupomFlags(); bool flag1 = true; foreach (string text in args) { if (ComDiv.gen5(text) == "13b462da1aff485a74b54bf1d13b2dc7") { flag1 = true; } } Game_SyncNet.Start(); if (flag1) { bool flag2 = GameManager.Start(); Logger.warning("[Aviso] Padrão de textos: " + ConfigGB.EncodeText.EncodingName); Logger.warning("[Aviso] Modo atual: " + (ConfigGS.isTestMode ? "Testes" : "Público")); Logger.warning(Programm.StartSuccess()); if (flag2) { LoggerGS.updateRAM(); } } Process.GetCurrentProcess().WaitForExit(); }
public static void Main(string[] args) { Printf.blue("[Licença de uso]", false); Printf.blue("[+] Esta é uma versão compilada para Project Bloodi!!!", false); Printf.blue("[+] https://github.com/luisfeliperm", false); Printf.info("\n\n\n Iniciando servidor...", false); Thread.Sleep(5000); Console.Clear(); TimeStarted = DateTime.Now; SaveLog.aplication = "game"; Console.Title = "PointBlank - Game"; header(true); // Validações System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); FileVersionInfo fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location); if (!Compatible.Check(fileVersion.FileVersion, "game") || !ServerLicense.check() || !ServerPasswd.Compare(args)) { Console.ReadKey(); return; } SaveLog.checkDirectorys(); ConfigGS.Load(); WelcomeXML.Load(); BasicInventoryXML.Load(); ServerConfig.Load(); ServersXML.Load(); ChannelsXML.Load(ConfigGS.serverId); EventLoader.LoadAll(); RankUp.load(); TitlesXML.Load(); TitleAwardsXML.Load(); ClanManager.Load(); NickFilter.Load(); MissionCardXML.LoadBasicCards(1); BattleServerJSON.Load(); RankXML.Load(); RankXML.LoadAwards(); ClanRankXML.Load(); MissionAwards.Load(); MissionsXML.Load(); Translation.Load(); ShopManager.Load(1); ClassicModeManager.LoadList(); RandomBoxXML.LoadBoxes(); CupomEffectManager.LoadCupomFlags(); Game_SyncNet.Start(); bool started = GameManager.Start(); if (started) { cpuMonitor.updateRAM(); } header(false); while (true) { Console.ForegroundColor = ConsoleColor.Red; Console.Write("[SHELL]# "); Console.ForegroundColor = ConsoleColor.White; String input = Console.ReadLine(); if (string.IsNullOrEmpty(input)) { continue; } Comandos.checkCmd(input); } //Process.GetCurrentProcess().WaitForExit(); }