public static string SetPlayerRank(string str) { string[] strArray = str.Substring(str.IndexOf(" ") + 1).Split(' '); long int64 = Convert.ToInt64(strArray[0]); int int32 = Convert.ToInt32(strArray[1]); if (int32 > 60 || int32 == 56 || (int32 < 0 || int64 <= 0L)) { return(Translation.GetLabel("ChangePlyRankWrongValue")); } Account account = AccountManager.getAccount(int64, 0); if (account == null) { return(Translation.GetLabel("ChangePlyRankFailPlayer")); } if (!ComDiv.updateDB("accounts", "rank", (object)int32, "player_id", (object)account.player_id)) { return(Translation.GetLabel("ChangePlyRankFailUnk")); } RankModel rank = RankXML.getRank(int32); account._rank = int32; SEND_ITEM_INFO.LoadGoldCash(account); account.SendPacket((SendPacket) new BASE_RANK_UP_PAK(account._rank, rank != null ? rank._onNextLevel : 0), false); if (account._room != null) { account._room.updateSlotsInfo(); } return(Translation.GetLabel("ChangePlyRankSuccess", (object)int32)); }
public static string SetPlayerRank(string str) { string text = str.Substring(str.IndexOf(" ") + 1); string[] split = text.Split(' '); long player_id = Convert.ToInt64(split[0]); int rank = Convert.ToInt32(split[1]); if (rank > 60 || rank == 56 || rank < 0 || player_id <= 0) { return(Translation.GetLabel("ChangePlyRankWrongValue")); } else { Account pE = AccountManager.getAccount(player_id, 0); if (pE != null) { if (ComDiv.updateDB("contas", "rank", rank, "player_id", pE.player_id)) { RankModel model = RankXML.getRank(rank); pE._rank = rank; SEND_ITEM_INFO.LoadGoldCash(pE); pE.SendPacket(new BASE_RANK_UP_PAK(pE._rank, model != null ? model._onNextLevel : 0), false); if (pE._room != null) { pE._room.updateSlotsInfo(); } return(Translation.GetLabel("ChangePlyRankSuccess", rank)); } return(Translation.GetLabel("ChangePlyRankFailUnk")); } return(Translation.GetLabel("ChangePlyRankFailPlayer")); } }
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(); }