public override void run() { AuthThread.getInstance().setInGameAccount(Client.AccountName, false); L2Player player = Client.CurrentPlayer; if (player == null) //re-login на выборе чаров { return; } if (player._p_block_act == 1) { player.sendActionFailed(); return; } if (player.isInCombat()) { player.sendSystemMessage(101);//You cannot exit the game while in combat. player.sendActionFailed(); return; } player.Termination(); player.sendPacket(new LeaveWorld()); }
public override void run() { AccountModel ta = new AccountModel(); ta.Login = account; AuthThread.getInstance().awaitAccount(ta); }
public override void run() { if (getClient().AccountName == null) { getClient().AccountName = _loginName; List <int> players = accountService.GetPlayerIdsListByAccountName(_loginName); int slot = 0; foreach (int id in players) { L2Player p = new L2Player().RestorePlayer(id, getClient()); p.CharSlot = slot; slot++; Client._accountChars.Add(p); } getClient().sendPacket(new CharacterSelectionInfo(getClient().AccountName, getClient()._accountChars, getClient()._sessionId)); AuthThread.getInstance().setInGameAccount(getClient().AccountName, true); } else { getClient().termination(); } }
public void Start() { Console.Title = "L2dotNET Gameserver"; CLogger.form(); Cfg.init("all"); CharTemplateTable.Instance.Initialize(); NetworkBlock.getInstance(); GameTime.getInstance(); IdFactory.Instance.Initialize(); L2World.Instance.Initialize(); // MapRegionTable.getInstance(); ZoneTable.getInstance(); NpcTable.getInstance(); NpcData.getInstance(); // SpawnTable.getInstance(); StaticObjTable.getInstance().read(); StructureTable.getInstance().read(); // TSkillTable.getInstance(); ItemTable.getInstance(); ItemHandler.getInstance(); MultiSell.getInstance(); Capsule.getInstance(); RecipeTable.getInstance(); MonsterRace.getInstance(); AIManager.getInstance(); BlowFishKeygen.genKey(); CLogger.info("generated 20 blowfish keys"); AdminAccess.Instance.Initialize();; QuestManager.getInstance(); AnnouncementManager.Instance.Initialize(); AllianceTable.getInstance(); ClanTable.getInstance(); CLogger.info("NpcServer: "); StaticObjTable.getInstance().Spawn(); MonsterRace.getInstance().Spawn(); // SpawnTable.getInstance().Spawn(); StructureTable.getInstance().init(); HtmCache.getInstance(); AuthThread.getInstance(); // GeoData.getInstance(); CLogger.extra_info("listening game clients on port " + Cfg.SERVER_PORT); _listener = new TcpListener(Cfg.SERVER_PORT); _listener.Start(); TcpClient clientSocket = default(TcpClient); while (true) { clientSocket = _listener.AcceptTcpClient(); accept(clientSocket); } }