Package com.l2jfrozen.gameserver.network

Examples of com.l2jfrozen.gameserver.network.L2GameClient


    SessionKey key = new SessionKey(_loginKey1, _loginKey2, _playKey1, _playKey2);

    if (Config.DEBUG)
      _log.info("DEBUG "+getType()+": user: " + _loginName + " key:" + key);

    L2GameClient client = getClient();

           // avoid potential exploits
        if (client.getAccountName() == null)
        {
        // Preventing duplicate login in case client login server socket was
        // disconnected or this packet was not sent yet
        if (LoginServerThread.getInstance().addGameServerLogin(_loginName,client))
        {
          client.setAccountName(_loginName);
          LoginServerThread.getInstance().addWaitingClientAndSendRequest(_loginName, client, key);
          }
            else
          {
          client.close((L2GameServerPacket) null);
          }
        }
      }
View Full Code Here


        L2PcInstance player = null;

        try
        {
          L2GameClient client = new L2GameClient(null);
          player = L2PcInstance.load(rs.getInt("charId"));
          client.setActiveChar(player);
          client.setAccountName(player.getAccountName());
          client.setState(GameClientState.IN_GAME);
          player.setClient(client);
          player.setOffline(true);
          player.setOfflineStartTime(time);
          if (Config.OFFLINE_SLEEP_EFFECT)
            player.startAbnormalEffect(L2Character.ABNORMAL_EFFECT_SLEEP);
View Full Code Here

      L2LoginClient login_cl = (L2LoginClient) client;
      account = login_cl.getAccount();     
    }
    else if (client instanceof L2GameClient)
    {     
      L2GameClient game_cl = (L2GameClient) client;
      account = game_cl.accountName;     
    }
   
    if (account == null)
      return true;
View Full Code Here

     
      //_log.warning("Player with account " + login_cl.getAccount() + " kicked for flooding with packet " + Integer.toHexString(opcode));     
    }
    else if (_client instanceof L2GameClient)
    {   
      L2GameClient game_cl = (L2GameClient) _client;
      game_cl.closeNow();
     
      //_log.warning("Player with account " + game_cl.accountName + " kicked for flooding with packet " + Integer.toHexString(opcode));     
    }   
  }
View Full Code Here

     
      //_log.warning("Player with account " + login_cl.getAccount() + " banned for flooding forever with packet " + Integer.toHexString(opcode));     
    }
    else if (_client instanceof L2GameClient)
    {     
      L2GameClient game_cl = (L2GameClient) _client;
     
      if (game_cl.getActiveChar() != null)
      {
        game_cl.getActiveChar().setPunishLevel(L2PcInstance.PunishLevel.ACC, 0);     
        //_log.warning("Player " + game_cl.getActiveChar() + " of account " + game_cl.accountName + " banned forever for flooding with packet " + Integer.toHexString(opcode));       
        game_cl.getActiveChar().logout();
      }
     
      game_cl.closeNow();
      //_log.warning("Player with account " + game_cl.accountName + " kicked for flooding with packet " + Integer.toHexString(opcode));     
    }   
  } 
View Full Code Here

    pl = null;
  }

      public boolean addGameServerLogin(String account, L2GameClient client)
    {
      L2GameClient savedClient = _accountsInGameServer.get(account);
    if (savedClient != null)
    {
      if (savedClient.isDetached())
      {
        if (Config.DEBUG)
          _log.info("Old Client was disconnected: Offline or OfflineMode --> Login Again");
        ((FastMap<String, L2GameClient>) _accountsInGameServer).put(account, client);
        return true;
      }
      if (Config.DEBUG)
        _log.info("Old Client was online --> Close Old Client Connection");
      savedClient.closeNow();
      _accountsInGameServer.remove(account);
      return false;
    }
    if (Config.DEBUG)
      _log.info("Client was not online --> New Client Connection");
View Full Code Here

    //delete box from the world
    if(player._active_boxes!=-1){
      player.decreaseBoxes();
    }
   
    L2GameClient client = getClient();

   
    player.setClient(null);

    RegionBBSManager.getInstance().changeCommunityBoard();

    // removing player from the world
    player.deleteMe();
    player.store();

    getClient().setActiveChar(null);

    // return the client to the authed status
    client.setState(GameClientState.AUTHED);
   
    //before the char selection, check shutdown status
    if(GameServer.getSelectorThread().isShutdown())
    {
      getClient().closeNow();
      return;
    }
   
    // Restart true
    sendPacket(RestartResponse.valueOf(true));
   
    // send char list
    CharSelectInfo cl = new CharSelectInfo(client.getAccountName(), client.getSessionId().playOkID1);
    sendPacket(cl);
    client.setCharSelection(cl.getCharInfo());
  }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.network.L2GameClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.